Skip to content

Commit

Permalink
chore: update github links (#2)
Browse files Browse the repository at this point in the history
* Update config.ts

* Update about.vue

* Update Footer.vue
  • Loading branch information
dragon-fish authored Jun 21, 2021
1 parent 34f2b6f commit bf60468
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ footer.globalFooter
p
| © Copyright {{ yearStr }}
|
a(:href="GITHUB_REPO" target="_blank").
PixivNow
a(:href="GITHUB_URL" target="_blank").
{{ PROJECT_NAME }}
|
em v{{ version }}
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { GITHUB_REPO } from '../config'
import { GITHUB_URL, PROJECT_NAME } from '../config'
import { version } from '../../package.json'
export default defineComponent({
Expand All @@ -22,6 +22,7 @@ export default defineComponent({
version,
yearStr: 2021 === year ? year : `(2021 - ${year})`,
GITHUB_REPO,
PROJECT_NAME,
}
},
})
Expand Down
12 changes: 11 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// Default front-end AJAX timeout
import axios from 'axios'
axios.defaults.timeout = 45 * 1000

// API endpoint
export const API_BASE =
process.env.NODE_ENV === 'development' ? 'https://pixiv.js.org' : ''
export const GITHUB_REPO = 'https://github.com/PixivNow/PixivNow'

// Copyright links
// Do not modify please
export const GITHUB_OWNER = 'GratisNow'
export const GITHUB_REPO = 'PixivNow'
export const GITHUB_URL = `https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}`

// Site name
export const PROJECT_NAME = 'PixivNow'
9 changes: 6 additions & 3 deletions src/view/about.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template lang="pug">
mixin repoLink
a(:href="GITHUB_REPO" target="_blank") PixivNow/PixivNow
a(:href="GITHUB_URL" target="_blank") {{ GITHUB_OWNER }}/{{ GITHUB_REPO }}

h1 关于我们
section.intro
card(title="简介")
p
strong PixivNow
strong {{ PROJECT_NAME }}
| 是一个 Pixiv 代理服务,旨在为某些无法直接访问 Pixiv 地区的 ACGN 爱好者提供一个欣赏 P 站插画的途径。

card(title="使用方法")
Expand Down Expand Up @@ -40,13 +40,16 @@ section.intro

<script lang="ts">
import Card from '../components/Card.vue'
import { GITHUB_REPO } from '../config'
import { PROJECT_NAME, GITHUB_OWNER, GITHUB_REPO, GITHUB_URL } from '../config'
export default {
components: { Card },
data() {
return {
PROJECT_NAME,
GITHUB_OWNER,
GITHUB_REPO,
GITHUB_URL,
}
},
mounted() {
Expand Down

0 comments on commit bf60468

Please sign in to comment.