Skip to content

Commit 0f3db95

Browse files
committed
refactor: format all code
1 parent d4a2941 commit 0f3db95

31 files changed

+2532
-2072
lines changed

babel.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module.exports = {
22
presets: [
33
[
4-
'@vue/app',
4+
"@vue/app",
55
{
6-
useBuiltIns: 'entry'
7-
}
8-
]
6+
useBuiltIns: "entry",
7+
},
8+
],
99
],
1010
};

public/index.dev.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
88
<title>SafeU | 云U盘</title>
99
</head>
1010
<body>
1111
<noscript>
12-
<strong>We're sorry but safeu-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
12+
<strong
13+
>We're sorry but safeu-frontend doesn't work properly without JavaScript
14+
enabled. Please enable it to continue.</strong
15+
>
1316
</noscript>
1417
<div id="app"></div>
1518
<!-- built files will be auto injected -->
1619
</body>
17-
</html>
20+
</html>

public/index.prod.html

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
88
<title>SafeU | 云U盘</title>
9-
<meta name="keywords" content="云U盘,safeu">
9+
<meta name="keywords" content="云U盘,safeu" />
1010
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.6/dist/vue.min.js"></script>
1111
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.3/dist/vue-router.min.js"></script>
1212
<script src="https://cdn.jsdelivr.net/npm/ant-design-vue@1.3.4/dist/antd.min.js"></script>
13-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107867782-4"></script>
14-
<script>
15-
window.dataLayer = window.dataLayer || [];
16-
function gtag(){dataLayer.push(arguments);}
17-
gtag('js', new Date());
18-
19-
gtag('config', 'UA-107867782-4');
13+
<script
14+
async
15+
src="https://www.googletagmanager.com/gtag/js?id=UA-107867782-4"
16+
></script>
17+
<script>
18+
window.dataLayer = window.dataLayer || [];
19+
function gtag() {
20+
dataLayer.push(arguments);
21+
}
22+
gtag("js", new Date());
23+
24+
gtag("config", "UA-107867782-4");
2025
</script>
2126
<script>
22-
(function(){
23-
var bp = document.createElement('script');
24-
var curProtocol = window.location.protocol.split(':')[0];
25-
if (curProtocol === 'https') {
26-
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
27-
}
28-
else {
29-
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
30-
}
31-
var s = document.getElementsByTagName("script")[0];
32-
s.parentNode.insertBefore(bp, s);
27+
(function () {
28+
var bp = document.createElement("script");
29+
var curProtocol = window.location.protocol.split(":")[0];
30+
if (curProtocol === "https") {
31+
bp.src = "https://zz.bdstatic.com/linksubmit/push.js";
32+
} else {
33+
bp.src = "http://push.zhanzhang.baidu.com/push.js";
34+
}
35+
var s = document.getElementsByTagName("script")[0];
36+
s.parentNode.insertBefore(bp, s);
3337
})();
3438
</script>
35-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ant-design-vue@1.3.4/dist/antd.min.css">
39+
<link
40+
rel="stylesheet"
41+
href="https://cdn.jsdelivr.net/npm/ant-design-vue@1.3.4/dist/antd.min.css"
42+
/>
3643
</head>
3744
<body>
3845
<noscript>
39-
<strong>We're sorry but safeu-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
46+
<strong
47+
>We're sorry but safeu-frontend doesn't work properly without JavaScript
48+
enabled. Please enable it to continue.</strong
49+
>
4050
</noscript>
4151
<div id="app"></div>
4252
<!-- built files will be auto injected -->
4353
</body>
44-
</html>
54+
</html>

src/About.vue

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,62 @@
11
<template>
2-
<div class="about-container">
3-
<div class="about">
4-
<h1 style="align-self: center">关于 SafeU 云U盘</h1>
5-
<h2>简介</h2>
6-
<p>
7-
这里是 SafeU 云U盘,一款好用、快捷、安全的文件分享服务。<br>
8-
我们为文件的便捷、安全传输而来。<br>
9-
虽然还处于起步阶段,但是我们仍然提供了非常安全及高效的文件传输服务,简单来说:我们可以完胜并取代 90% 的 U 盘应用场景。我们使用国际标准的 TLS 技术,使您的文件在传输时经过严格加密。在下载时,只有知道文件提取码及其密钥(如果您设置了密钥)的人才能获取此文件。同时,您可以设置文件过期时间以及最大下载次数以保证文件的安全性。更多的是,您的一切活动都是匿名的,完全不必担心隐私问题。<br>
10-
</p>
11-
<h2>开发组成员</h2>
12-
<ul>
13-
<li><a href="https://github.com/Triple-Z">@TripleZ</a></li>
14-
<li><a href="https://github.com/arcosx">@arcosx</a></li>
15-
<li><a href="https://github.com/RayZhao1998">@ninjiacoder</a></li>
16-
<li><a href="https://github.com/Villivateur">@vvzero</a></li>
17-
</ul>
18-
</div>
19-
</div >
2+
<div class="about-container">
3+
<div class="about">
4+
<h1 style="align-self: center;">关于 SafeU 云U盘</h1>
5+
<h2>简介</h2>
6+
<p>
7+
这里是 SafeU 云U盘,一款好用、快捷、安全的文件分享服务。<br />
8+
我们为文件的便捷、安全传输而来。<br />
9+
虽然还处于起步阶段,但是我们仍然提供了非常安全及高效的文件传输服务,简单来说:我们可以完胜并取代
10+
90% 的 U 盘应用场景。我们使用国际标准的 TLS
11+
技术,使您的文件在传输时经过严格加密。在下载时,只有知道文件提取码及其密钥(如果您设置了密钥)的人才能获取此文件。同时,您可以设置文件过期时间以及最大下载次数以保证文件的安全性。更多的是,您的一切活动都是匿名的,完全不必担心隐私问题。<br />
12+
</p>
13+
<h2>开发组成员</h2>
14+
<ul>
15+
<li><a href="https://github.com/Triple-Z">@TripleZ</a></li>
16+
<li><a href="https://github.com/arcosx">@arcosx</a></li>
17+
<li><a href="https://github.com/RayZhao1998">@ninjiacoder</a></li>
18+
<li><a href="https://github.com/Villivateur">@vvzero</a></li>
19+
</ul>
20+
</div>
21+
</div>
2022
</template>
2123

2224
<script>
2325
export default {
24-
name: "about",
25-
}
26+
name: "about",
27+
};
2628
</script>
2729

2830
<style>
2931
.about-container {
30-
width: 100%;
31-
height: 100%;
32-
display: flex;
33-
flex-direction: column;
34-
align-items: center;
32+
width: 100%;
33+
height: 100%;
34+
display: flex;
35+
flex-direction: column;
36+
align-items: center;
3537
}
3638
@media (max-width: 700px) {
37-
.about {
38-
width: 90%;
39-
display: flex;
40-
flex-direction: column;
41-
align-items: flex-start;
42-
}
39+
.about {
40+
width: 90%;
41+
display: flex;
42+
flex-direction: column;
43+
align-items: flex-start;
44+
}
4345
}
4446
4547
@media (min-width: 700px) {
46-
.about {
47-
width: 680px;
48-
display: flex;
49-
flex-direction: column;
50-
align-items: flex-start;
51-
}
48+
.about {
49+
width: 680px;
50+
display: flex;
51+
flex-direction: column;
52+
align-items: flex-start;
53+
}
5254
}
5355
.about-container ol {
54-
padding-left: 1em;
56+
padding-left: 1em;
5557
}
5658
5759
.about-container ul {
58-
padding-left: 1em;
60+
padding-left: 1em;
5961
}
6062
</style>

src/App.vue

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div id="app">
3-
<Navbar/>
3+
<Navbar />
44
<div class="app-container">
55
<router-view></router-view>
66
</div>
@@ -10,49 +10,52 @@
1010
<a v-on:click="gotoprivacy">隐私政策</a>
1111
<a v-on:click="gotoabout">关于</a>
1212
</div>
13-
<div style="text-align: center; margin: 2px 0px 10px">
14-
<p>&copy; <a href="https://a2os.club" style="color: #2c3e50;">A²OS</a> 2018-2020 All rights reserved.</p>
13+
<div style="text-align: center; margin: 2px 0px 10px;">
14+
<p>
15+
&copy;
16+
<a href="https://a2os.club" style="color: #2c3e50;">A²OS</a> 2018-2020
17+
All rights reserved.
18+
</p>
1519
</div>
1620
</div>
1721
</div>
1822
</template>
1923
<script>
20-
import Navbar from './components/Navbar.vue'
21-
import _global from './Global.vue'
24+
import Navbar from "./components/Navbar.vue";
25+
import _global from "./Global.vue";
2226
export default {
23-
name: 'app',
27+
name: "app",
2428
components: {
2529
Navbar,
2630
},
27-
created() {
28-
},
31+
created() {},
2932
mounted() {
30-
this.$axios.defaults.withCredentials = true
31-
this.$axios.get(_global.api_domain_url + "csrf")
32-
.then(function(response) {
33-
var csrf_token = response.headers["x-csrf-token"]
34-
sessionStorage.setItem("csrf_token", csrf_token)
35-
})
36-
this.$axios.get(_global.behavior_api_domain_url + "csrf")
37-
.then(function(response) {
38-
var csrf_token = response.headers["x-csrf-token"]
39-
sessionStorage.setItem("behavior_csrf_token", csrf_token)
40-
})
33+
this.$axios.defaults.withCredentials = true;
34+
this.$axios.get(_global.api_domain_url + "csrf").then(function (response) {
35+
var csrf_token = response.headers["x-csrf-token"];
36+
sessionStorage.setItem("csrf_token", csrf_token);
37+
});
38+
this.$axios
39+
.get(_global.behavior_api_domain_url + "csrf")
40+
.then(function (response) {
41+
var csrf_token = response.headers["x-csrf-token"];
42+
sessionStorage.setItem("behavior_csrf_token", csrf_token);
43+
});
4144
},
4245
methods: {
4346
gototerms() {
44-
this.$router.push({path: '/terms'})
47+
this.$router.push({ path: "/terms" });
4548
},
4649
4750
gotoprivacy() {
48-
this.$router.push({path: '/privacy'})
51+
this.$router.push({ path: "/privacy" });
4952
},
5053
5154
gotoabout() {
52-
this.$router.push({path: '/about'})
55+
this.$router.push({ path: "/about" });
5356
},
54-
}
55-
}
57+
},
58+
};
5659
</script>
5760
<style>
5861
body {
@@ -67,10 +70,11 @@ body {
6770
display: flex;
6871
flex-direction: column;
6972
margin-top: 0;
70-
background: url('./assets/background.svg') no-repeat;
73+
background: url("./assets/background.svg") no-repeat;
7174
background-size: 100%;
7275
width: 100%;
73-
font-family: -apple-system,BlinkMacSystemFont,SF Pro Text,segoe ui,helvetica neue,helvetica,ubuntu,roboto,noto,arial,sans-serif;
76+
font-family: -apple-system, BlinkMacSystemFont, SF Pro Text, segoe ui,
77+
helvetica neue, helvetica, ubuntu, roboto, noto, arial, sans-serif;
7478
-webkit-font-smoothing: antialiased;
7579
-moz-osx-font-smoothing: grayscale;
7680
color: #2c3e50;
@@ -83,8 +87,8 @@ body {
8387
margin-top: 80px;
8488
flex: 1;
8589
}
86-
.link-container a{
87-
margin:0px 1% 0px;
90+
.link-container a {
91+
margin: 0px 1% 0px;
8892
color: rgb(109, 109, 109);
8993
font-weight: bold;
9094
}
@@ -96,8 +100,8 @@ body {
96100
}
97101
@media (max-width: 700px) {
98102
.link-container {
99-
text-align:center;
103+
text-align: center;
100104
margin-bottom: 20px;
101-
}
105+
}
102106
}
103107
</style>

src/DownloadView.vue

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
<template>
2-
<div id="downloadview">
3-
<Download :code="this.$route.params.recode"/>
4-
</div>
2+
<div id="downloadview">
3+
<Download :code="this.$route.params.recode" />
4+
</div>
55
</template>
66

77
<script>
8-
import Download from './components/Download.vue'
8+
import Download from "./components/Download.vue";
99
export default {
10-
name: 'downloadview',
11-
components: {
12-
Download,
13-
},
14-
mounted() {
15-
this.$event("download", this.$route.query.from)
16-
}
17-
}
10+
name: "downloadview",
11+
components: {
12+
Download,
13+
},
14+
mounted() {
15+
this.$event("download", this.$route.query.from);
16+
},
17+
};
1818
</script>
1919
<style>
2020
#downloadview {
21-
display: flex;
22-
flex-direction: column;
23-
align-items: center;
24-
width: 100%;
25-
height: 100%;
21+
display: flex;
22+
flex-direction: column;
23+
align-items: center;
24+
width: 100%;
25+
height: 100%;
2626
}
2727
</style>
28-

0 commit comments

Comments
 (0)