Skip to content

Commit

Permalink
Merge pull request #272 from penguin-statistics/dev
Browse files Browse the repository at this point in the history
v1.1.9 Release
  • Loading branch information
AlvISsReimu authored Apr 23, 2020
2 parents 914e644 + 7818c93 commit 779af27
Show file tree
Hide file tree
Showing 60 changed files with 1,123 additions and 400 deletions.
10 changes: 10 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com

[penguin-statistics-website.main]
file_filter = src/locales/<lang>.json
minimum_perc = 0
source_file = src/locales/zh.json
source_lang = zh
type = KEYVALUEJSON

9 changes: 0 additions & 9 deletions build/serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
"value": "public, max-age=0, must-revalidate"
}
]
},
{
"source": "**",
"headers": [
{
"key": "Content-Security-Policy",
"value": "default-src 'self'; script-src 'self' 'unsafe-inline' https://client.crisp.chat https://settings.crisp.chat https://www.google-analytics.com/; script-src-attr 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://client.crisp.chat; img-src 'self' data: blob: https://penguin.upyun.galvincdn.com https://www.google-analytics.com https://stats.g.doubleclick.net https://image.crisp.chat https://client.crisp.chat; font-src 'self' https://fonts.gstatic.com https://fonts.gstatic.cn https://client.crisp.chat; connect-src 'self' https://penguin-stats.io https://penguin.upyun.galvincdn.com https://sentry.io https://client.crisp.chat wss://client.relay.crisp.chat https://storage.crisp.chat; prefetch-src 'self' https://penguin.upyun.galvincdn.com; upgrade-insecure-requests; block-all-mixed-content"
}
]
}
],
"rewrites": [
Expand Down
9 changes: 0 additions & 9 deletions now.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
"value": "public, max-age=0, must-revalidate"
}
]
},
{
"source": "(.*)",
"headers": [
{
"key": "Content-Security-Policy",
"value": "default-src 'self'; script-src 'self' 'unsafe-inline' https://client.crisp.chat https://settings.crisp.chat https://www.google-analytics.com/; script-src-attr 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://client.crisp.chat; img-src 'self' data: blob: https://penguin.upyun.galvincdn.com https://www.google-analytics.com https://stats.g.doubleclick.net https://image.crisp.chat https://client.crisp.chat; font-src 'self' https://fonts.gstatic.com https://fonts.gstatic.cn https://client.crisp.chat; connect-src 'self' https://penguin-stats.io https://penguin.upyun.galvincdn.com https://sentry.io https://client.crisp.chat wss://client.relay.crisp.chat https://storage.crisp.chat; prefetch-src 'self' https://penguin.upyun.galvincdn.com; upgrade-insecure-requests; block-all-mixed-content"
}
]
}
]
}
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"name": "penguin-stats-frontend",
"version": "1.1.7",
"version": "1.1.8",
"private": true,
"homepage": "https://github.com/penguin-statistics/frontend-v2#readme",
"bugs": {
"url": "https://github.com/penguin-statistics/frontend-v2/issues"
},
"license" : "MIT",
"author": "All Contributors <*@*.*> (https://github.com/*)",
"contributors": [
"AlvISs_Reimu <alvissreimu@gmail.com> (https://github.com/AlvISsReimu)",
"Galvin Gao <me@galvingao.com> (https://github.com/GalvinGao)",
"Asahi <asahi@alpgo.cc> (https://github.com/AsahiLuna)",
"Blealtan <blealtan@outlook.com> (https://github.com/Blealtan)"
],
"scripts": {
"serve": "vue-cli-service serve",
"build": "npx --max_old_space_size=4096 vue-cli-service build --modern",
Expand Down
18 changes: 17 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,viewport-fit=cover">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" crossorigin="anonymous">
<link rel="icon" href="/favicon.ico">
<title>企鹅物流数据统计</title>
<link rel="preconnect" href="https://penguin.upyun.galvincdn.com">
<link rel="preconnect" href="https://penguin-stats.s3.amazonaws.com">
<style>#app,body,html{height:100vh;margin:0;padding:0;transition:background .3s cubic-bezier(.25,.8,.5,1)!important}body{background:#121212}#loader-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;background:#121212;background:linear-gradient(to top right,#294266 30%,#00608c)}#loader-logo{top:20%;height:100px;width:100px;margin:-50px 0 0 -50px}#loader-logo,.sk-chase{display:block;position:relative;left:50%}.sk-chase{top:50%;width:72px;height:72px;margin:-152px 0 0 -36px;animation:sk-chase 2.5s infinite linear both}.sk-chase-dot{width:100%;height:100%;position:absolute;left:0;top:0;animation:sk-chase-dot 2s infinite cubic-bezier(.455,.03,.515,.955) both}.sk-chase-dot:before{content:'';display:block;width:25%;height:25%;background-color:#f0f0f0;border-radius:100%;animation:sk-chase-dot-before 2s infinite cubic-bezier(.455,.03,.515,.955) both}.sk-chase-dot:nth-child(1){animation-delay:-1.1s}.sk-chase-dot:nth-child(2){animation-delay:-1s}.sk-chase-dot:nth-child(3){animation-delay:-.9s}.sk-chase-dot:nth-child(4){animation-delay:-.8s}.sk-chase-dot:nth-child(5){animation-delay:-.7s}.sk-chase-dot:nth-child(6){animation-delay:-.6s}.sk-chase-dot:nth-child(1):before{animation-delay:-1.1s}.sk-chase-dot:nth-child(2):before{animation-delay:-1s}.sk-chase-dot:nth-child(3):before{animation-delay:-.9s}.sk-chase-dot:nth-child(4):before{animation-delay:-.8s}.sk-chase-dot:nth-child(5):before{animation-delay:-.7s}.sk-chase-dot:nth-child(6):before{animation-delay:-.6s}@keyframes sk-chase{to{transform:rotate(360deg)}}@keyframes sk-chase-dot{80%,to{transform:rotate(360deg)}}@keyframes sk-chase-dot-before{50%{transform:scale(.4)}0%,to{transform:scale(1)}}#loader-wrapper .load_text{font-family:Open Sans,sans-serif;color:#f0f0f0;font-size:19px;width:100%;text-align:center;z-index:9999999999999;position:absolute;opacity:1;line-height:30px}#loader-wrapper .load_title{top:55%}#loader-wrapper .load_footer{bottom:15%;opacity:.7;font-size:13px}#loader-wrapper .load_text span.load_caption{line-height:16px;font-weight:400;font-size:13px;color:#f0f0f0;opacity:.5}</style>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
Expand All @@ -20,6 +21,21 @@
<link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#2d66ba">
<meta name="msapplication-TileImage" content="/favicon/mstile-150x150.png">
<meta name="msapplication-TileColor" content="#1d499b">

<meta name="description" content="Penguin Statistics is the Department of Data Analysis of Penguin Logistics." />

<meta name="robots" content="index,follow" />
<meta name="googlebot" content="index,follow" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:creator" content="@AlvISs_Reimu" />
<meta property="og:url" content="https://penguin-stats.io" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Penguin Statistics" />
<meta property="og:description" content="Penguin Statistics is the Department of Data Analysis of Penguin Logistics." />
<meta property="og:image" content="https://penguin.upyun.galvincdn.com/logos/penguin_stats_logo.png" />
<meta property="og:image:alt" content="Penguin Statistics" />
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="600" />
</head>
<body>
<noscript><style type="text/css">body{background:#4d2222}.nojs h1{font-size:48px}.nojs h2{font-size:36px}.nojs hr{margin:48px 0;border:1px solid #000}.nojs{vertical-align:middle;margin:32px 13%;width:70%;font-weight:700;font-size:18px;font-family:-apple-system,Noto Sans SC,BlinkMacSystemFont,"Segoe UI",Microsoft YaHei UI,Microsoft Yahei,微软雅黑,Helvetica,Arial,sans-serif;padding:36px 48px;word-break:break-all;text-align:center;line-height:2;border-radius:8px;background:#cc696f;border:4px solid #ff878f;color:#261415}.nojs a{display:inline-block;border:2px solid #000;padding:16px 24px;margin:0 8px;text-decoration:none;background:#3375e0;color:#fff;font-family:sans-serif;font-size:14px;cursor:pointer;text-align:center;transition:background 50ms ease-out,transform 150ms ease;-webkit-appearance:none;-moz-appearance:none}.nojs a:focus,.nojs a:hover{background:#368dff;color:#000;transform:scale(1.05)}.nojs a:focus{outline:1px solid #fff;outline-offset:-4px}.nojs a:active{transform:scale(.99)}.nojs del{padding:4px 8px;background:#000;color:#fff}</style><div class="nojs"><h1>JavaScript 已被禁用</h1><p>很抱歉,但企鹅物流数据统计需要您启用 <del>等离子发动机(不是)</del> JavaScript 以提供服务。若您确信自己已开启相关技术,那么可能是您的浏览器版本太低了;请点击下方按钮升级浏览器。</p><hr><a href="https://www.google.cn/chrome/" title="得益于内置的 Google 智能工具,Chrome 现在更易用、更安全、更快速。" target="_blank">使用 Google Chrome (推荐)</a> <a href="https://www.mozilla.org/zh-CN/firefox/new/" title="使用我们一系列隐私优先产品,得回您应受到的重视。" target="_blank">使用 Mozilla Firefox</a><br><p>&copy; 企鹅物流</p></div></noscript>
Expand Down
57 changes: 16 additions & 41 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,14 @@
<!-- </v-overlay>-->
<GlobalSnackbar />
<PWAPopups />
<MirrorSelector />
<v-navigation-drawer
v-model="drawer"
app
:style="{'filter': isInSpecialUI ? 'grayscale(1)' : ''}"
width="calc(env(safe-area-inset-left) + 300px)"
>
<div
:class="{
'drawer-logo blue': true,
'darken-4': dark,
'darken-3': !dark,
'drawer-logo--two-line': $t('app.name_line2') !== ''
}"
style="padding-left: calc(max(env(safe-area-inset-left), 32px))"
>
<v-img
:src="cdnResource('/logos/penguin_stats_logo.png')"
aspect-ratio="1"
height="192px"
contain
/>
<div class="white--text description">
<v-row
align="center"
justify="center"
>
<span>{{ $t('app.name_line1') }}</span>
<span>{{ $t('app.name_line2') }}</span>
</v-row>
</div>
</div>
<Logo />
<v-list
dense
nav
Expand All @@ -72,15 +49,17 @@
:route="route"
/>

<v-divider class="my-2" />
<v-divider class="mt-2 mb-1" />

<v-container>
<!-- This is to fix that s**tty Safari doesn't allow me to scroll down as I want. 128px is just the right amount-->
<v-container style="margin-bottom: 120px">
<v-row
justify="space-around"
>
<v-btn
class="mx-1"
outlined
text
class="flex-grow-1 mr-1"
@click="refreshData"
>
<v-icon left>
Expand All @@ -89,9 +68,7 @@
{{ $t('menu.refreshData') }}
</v-btn>

<ThemeSwitcher />

<LocaleSwitcher />
<SettingsDialog />
</v-row>
</v-container>
</v-list>
Expand All @@ -102,7 +79,7 @@
:color="primaryColor"
style="min-height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top)"
:style="{'filter': isInSpecialUI ? 'grayscale(1)' : ''}"
class="x--safe-area toolbar--safe-area"
class="x--safe-area toolbar--safe-area flex-column"
>
<v-app-bar-nav-icon
@click.stop="drawer = !drawer"
Expand Down Expand Up @@ -157,26 +134,27 @@
import NetworkStateIndicator from "@/components/toolbar/NetworkStateIndicator";

import Navigation from "@/components/drawer/Navigation";
import LocaleSwitcher from "@/components/drawer/LocaleSwitcher";
import ThemeSwitcher from "@/components/drawer/ThemeSwitcher";

import GlobalEntry from "@/mixins/hooks/GlobalEntry";

import './styles/global.css'
import {mapGetters} from "vuex";
import PWAPopups from "@/components/global/PWAPopups";
import Footer from "@/components/global/Footer";
import CDN from "@/mixins/CDN";
import Mirror from "@/mixins/Mirror";
import SpecialUI from "@/mixins/SpecialUI";
import SettingsDialog from "@/components/drawer/SettingsDialog";
import MirrorSelector from "@/components/global/MirrorSelector";
import Logo from "@/components/drawer/Logo";

export default {
name: 'App',
components: {
Logo,
MirrorSelector,
SettingsDialog,
Footer,
PWAPopups,
LocaleSwitcher,
ThemeSwitcher,
Navigation,
GlobalSnackbar,
NetworkStateIndicator,
Expand All @@ -191,9 +169,6 @@ export default {
showLicenseDialog: false
}
},
computed: {
...mapGetters('settings', ['dark']),
},
created () {
this.routes = this.$router.options.routes.filter(el => !el.meta.hide);
this.$store.dispatch("data/fetch", false);
Expand All @@ -202,6 +177,6 @@ export default {
async refreshData () {
await this.$store.dispatch("data/fetch", true);
},
}
},
}
</script>
9 changes: 9 additions & 0 deletions src/apis/external.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import service from '@/utils/service'

export default {
geoip () {
return service.get("https://ipapi.co/json/", {
withCredentials: false
})
}
}
4 changes: 3 additions & 1 deletion src/apis/planner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import service from '@/utils/service'

export default {
plan (data) {
return service.post("https://planner.penguin-stats.io/plan", data)
return service.post("https://planner.penguin-stats.io/plan", data, {
withCredentials: false
})
}
}
1 change: 1 addition & 0 deletions src/assets/qrcodes/alipay-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit 779af27

@vercel
Copy link

@vercel vercel bot commented on 779af27 Apr 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment has failed due to an internal error. (code: Qtdoeb7)

Contact our support with support@vercel.com for more information.

Please sign in to comment.