Skip to content

Commit 6745830

Browse files
committed
chore(passport): add main footer
1 parent 9066135 commit 6745830

10 files changed

Lines changed: 146 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ develop-eggs
1313
.installed.cfg
1414
lib
1515
lib64
16+
.env
1617

1718
# coverage reports
1819
.coverage

rootfs/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<link rel='stylesheet' href='http://download.drycc.cc/static/bluecss/bulecss.css'>
5+
<link rel='stylesheet' href='https://download.drycc.cc/static/bluecss/bulecss.css'>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<title>Drycc Passport</title>
88
</head>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {toRefs, reactive} from 'vue'
2+
3+
export default {
4+
name: "Footer",
5+
setup(props) {
6+
const state = reactive({
7+
year: new Date().getFullYear(),
8+
legalEnabled: false,
9+
})
10+
state.legalEnabled = process.env.VUE_APP_LEGAL_ENABLED == "true" ? true : false;
11+
return {
12+
...toRefs(state),
13+
}
14+
},
15+
16+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<template>
2+
<div class="outer-footer">
3+
<div app bottom fixed class="allow-if-delinquent ember-view footer" padless>
4+
<div class="w-100 flex flex-column flex-row-l items-center bg-white bt b--light-silver ph3-l">
5+
<template v-if="legalEnabled">
6+
<ul class="list flex ma0 pa0 f6 order-0 pv2">
7+
<li class="dn flex-l mr3">
8+
<a class="hk-link no-underline gray" href="http://www.drycc.com">drycc.com</a>
9+
</li>
10+
<li class="mr3">
11+
<a class="hk-link no-underline gray" href="https://github.com/drycc">Open Source</a>
12+
</li>
13+
<li class="mr3">
14+
<a class="hk-link no-underline gray" href="https://drycc.slack.com/">Community</a>
15+
</li>
16+
<li class="">
17+
<a class="hk-link no-underline gray" href="https://drycc.cc/">Documentation</a>
18+
</li>
19+
</ul>
20+
21+
<div class="bt b--light-silver w-100 dn-l"></div>
22+
23+
<div class="flex pv2 ph3 f6 order-5 order-1-l">
24+
<a class="hk-button-sm--primary" href="https://tawk.to/chat/6234b5491ffac05b1d7f4669/1fueu8a9t"
25+
target="_blank">Support</a>
26+
</div>
27+
28+
<div class="dn flex-l flex-auto order-3"></div>
29+
30+
<ul class="list flex ma0 pa0 pv2 f6 order-2 order-4-l">
31+
<li class="">
32+
<a class="hk-link no-underline gray"
33+
href="https://legal.doopai.com/#/cloud-services-terms">Terms of Service</a>
34+
</li>
35+
<li class="ml3">
36+
<a class="hk-link no-underline gray"
37+
href="https://legal.doopai.com/#/doopai-privacy-policy">Privacy</a>
38+
</li>
39+
<li class="ml3">
40+
<a class="hk-link no-underline gray"
41+
href="https://legal.doopai.com/#/doopai-cookie-policy">Cookies</a>
42+
</li>
43+
<li class="ml3 gray">© {{year}} drycc.com</li>
44+
</ul>
45+
</template>
46+
<template v-else>
47+
<ul class="list flex ma0 pa0 f6 order-0 pv2">
48+
<li class="mr3">
49+
<a class="hk-link no-underline gray" href="https://github.com/drycc">Open Source</a>
50+
</li>
51+
<li class="mr3">
52+
<a class="hk-link no-underline gray" href="https://drycc.slack.com/">Community</a>
53+
</li>
54+
<li class="">
55+
<a class="hk-link no-underline gray" href="https://drycc.cc/">Documentation</a>
56+
</li>
57+
</ul>
58+
59+
<div class="bt b--light-silver w-100 dn-l"></div>
60+
61+
<div class="dn flex-l flex-auto order-3"></div>
62+
63+
<ul class="list flex ma0 pa0 pv2 f6 order-2 order-4-l">
64+
<li class="">
65+
<a class="hk-link no-underline gray"
66+
href="https://tawk.to/chat/6234b5491ffac05b1d7f4669/1fueu8a9t">Support</a>
67+
</li>
68+
<li class="ml3">
69+
<a class="hk-link no-underline gray"
70+
href="https://github.com/drycc/workflow/issues">Issues</a>
71+
</li>
72+
<li class="ml3 gray">© {{year}} drycc.cc</li>
73+
</ul>
74+
</template>
75+
<div class="bt b--light-silver w-100 order-4 dn-l"></div>
76+
</div>
77+
</div>
78+
</div>
79+
</template>
80+
81+
<script>
82+
import MainFooter from "./MainFooter"
83+
export default MainFooter
84+
</script>
85+
<style scoped>
86+
.footer {
87+
width: 100%;
88+
position: fixed;
89+
bottom: 0;
90+
}
91+
92+
.outer-footer{
93+
min-height: 68px;
94+
}
95+
</style>

rootfs/web/src/utils/axios.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import axios from 'axios'
22
import { Toast } from 'vant'
33
import {getCookie} from "./array";
44

5-
axios.defaults.baseURL = import.meta.env.VITE_APP_BASE_API
5+
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL
66
axios.defaults.withCredentials = true
7-
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
87
axios.defaults.headers.post['Content-Type'] = 'application/json'
98
const loadingToast = [];
109

rootfs/web/src/views/AccessTokenList.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import NavBar from "../components/NavBar.vue";
22
import NavBox from "../components/NavBox.vue";
33
import {onBeforeMount, reactive, toRefs} from 'vue'
44
import MainNav from "../components/MainNav.vue";
5+
import MainFooter from "../components/MainFooter.vue";
56
import AccessTokenDelete from "../components/AccessTokenDelete.vue"
7+
68
import {dealAccessTokenList, getAccessTokenList, deleteAccessToken} from "../services/tokens";
79

810
export default {
@@ -11,6 +13,7 @@ export default {
1113
'nav-bar': NavBar,
1214
'nav-box': NavBox,
1315
'main-nav': MainNav,
16+
'main-footer': MainFooter,
1417
'access-token-delete': AccessTokenDelete
1518
},
1619
setup() {

rootfs/web/src/views/AccessTokenList.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
</div>
4848
</div>
4949
</div>
50+
<main-footer />
5051
</div>
5152
</template>
5253

rootfs/web/src/views/AccountSetting.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import NavBar from "../components/NavBar.vue";
22
import NavBox from "../components/NavBox.vue";
33
import {onBeforeMount, reactive, toRefs} from 'vue'
44
import MainNav from "../components/MainNav.vue";
5+
import MainFooter from "../components/MainFooter.vue";
56
import { useRouter } from 'vue-router'
67
import { putAccount, putAccountPassword } from "../services/user";
78
import { Toast } from "vant"
@@ -12,6 +13,7 @@ export default {
1213
'nav-bar': NavBar,
1314
'nav-box': NavBox,
1415
'main-nav': MainNav,
16+
'main-footer': MainFooter,
1517
},
1618
setup() {
1719
const showBTN = "flex items-center mb2"

rootfs/web/src/views/AccountSetting.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
</ul>
174174
</div>
175175
</div>
176+
<main-footer />
176177
</div>
177178
</template>
178179

rootfs/web/vite.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
import { defineConfig } from 'vite'
22
import vue from '@vitejs/plugin-vue'
33

4+
VUE_APP_BASE_URL = process.env.VUE_APP_BASE_URL ? process.env.VUE_APP_BASE_URL : ''
5+
VUE_APP_LEGAL_ENABLED = process.env.VUE_APP_LEGAL_ENABLED ? process.env.VUE_APP_LEGAL_ENABLED : "false"
6+
47
// https://vitejs.dev/config/
58
export default defineConfig({
69
plugins: [vue()],
710
build: {
811
minify: true,
912
chunkSizeWarningLimit: 3000
13+
},
14+
server:{
15+
proxy: { // 代理配置
16+
'/avatar': {
17+
target: VUE_APP_BASE_URL,
18+
changeOrigin: true,
19+
},
20+
'/user': {
21+
target: VUE_APP_BASE_URL,
22+
changeOrigin: true,
23+
},
24+
'/assets': {
25+
target: VUE_APP_BASE_URL,
26+
changeOrigin: true,
27+
}
28+
},
29+
},
30+
define: {
31+
'process.env': {
32+
VUE_APP_BASE_URL: VUE_APP_BASE_URL,
33+
VUE_APP_LEGAL_ENABLED: VUE_APP_LEGAL_ENABLED,
34+
},
1035
}
1136
})

0 commit comments

Comments
 (0)