Skip to content

Commit

Permalink
Merge pull request #326 from penguin-statistics/dev
Browse files Browse the repository at this point in the history
Release 3.1.0
  • Loading branch information
AlvISsReimu authored May 22, 2020
2 parents aaae806 + 4936bfc commit 0db50c2
Show file tree
Hide file tree
Showing 63 changed files with 2,540 additions and 602 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@sentry/integrations": "^5.6.1",
"animejs": "^3.1.0",
"clipboard-polyfill": "^2.8.6",
"dayjs": "^1.8.23",
"dayjs": "1.8.27",
"extract-domain": "^2.2.1",
"highcharts": "^8.1.0",
"highcharts-vue": "^1.3.5",
Expand All @@ -49,7 +49,7 @@
},
"devDependencies": {
"@kazupon/vue-i18n-loader": "^0.3.0",
"@mdi/font": "4",
"@mdi/font": "4.9.95",
"@vue/cli-plugin-babel": "^3.9.0",
"@vue/cli-plugin-eslint": "^3.9.0",
"@vue/cli-service": "^3.9.0",
Expand Down
1 change: 1 addition & 0 deletions public/under-deploy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="robots" content="noindex,nofollow"><meta name="googlebot" content="noindex,nofollow"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="refresh" content="15"><meta name="penguin:exception" content="type=deploying"><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0"><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,rgba(102,61,20,.9),rgba(237,142,47,.9))}#loader-logo{top:20%;height:100px;width:100px;margin:-50px 0 0 -50px}#loader-logo,.spinner{display:block;position:relative;left:50%}.spinner{top:50%;width:72px;height:72px;margin:-152px 0 0 -36px;position:relative;text-align:center;-webkit-animation:sk-rotate 2s infinite linear;animation:sk-rotate 2s infinite linear}.dot1,.dot2{width:60%;height:60%;display:inline-block;position:absolute;top:0;background-color:#fff;border-radius:100%;-webkit-animation:sk-bounce 2s infinite ease-in-out;animation:sk-bounce 2s infinite ease-in-out}.dot2{top:auto;bottom:0;-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes sk-rotate{100%{-webkit-transform:rotate(360deg)}}@keyframes sk-rotate{100%{transform:rotate(360deg);-webkit-transform:rotate(360deg)}}@-webkit-keyframes sk-bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes sk-bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}#loader-wrapper .load_text{font-family:Open Sans,sans-serif;color:#f0f0f0;font-size:19px;width:90%;left:5%;text-align:center;z-index:9999999999999;position:absolute;opacity:1;line-height:24px;transition:all .3s cubic-bezier(.25,.8,.5,1)!important}#loader-wrapper .load_title{top:50%}#loader-wrapper .load_footer{bottom:15%;opacity:.7;font-size:13px}#loader-wrapper .load_text span.load_caption{line-height:14px;font-weight:400;font-size:13px;color:#f0f0f0;opacity:.5;margin-top:24px}</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"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#1565c0"><title>正在部署 | 企鹅物流数据统计</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900"></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><div id="loader-wrapper"><img id="loader-logo" alt="Logo" src="https://penguin.upyun.galvincdn.com/logos/penguin_stats_logo.png"><div class="spinner"><div class="dot1"></div><div class="dot2"></div></div><div class="load_text load_title"><span id="deploy_title--text">部署进行中</span><br><br><span class="load_caption" id="deploy_caption--text">新版本部署最多将持续5分钟<br>部署完成后页面将自动刷新。请耐心等待。</span></div><div class="load_text load_footer"><span id="deploy_copyright--text">企鹅物流数据统计</span> &copy; <span id="deploy_copyright_year--text">2020</span></div></div><script type="text/javascript">window.$crisp=[],window.CRISP_WEBSITE_ID="2aa1bf4c-8c34-4028-9e1c-ca1f6c330779",d=document,s=d.createElement("script"),s.src="https://client.crisp.chat/l.js",s.async=1,d.getElementsByTagName("head")[0].appendChild(s)</script><script>"use strict";var _i18n={getFirstBrowserLanguageWithRegionCode:function getFirstBrowserLanguageWithRegionCode(){var nav=window.navigator,browserLanguagePropertyKeys=['language','browserLanguage','systemLanguage','userLanguage'],i,language,len,shortLanguage=null;if(Array.isArray(nav.languages)){for(i=0;i<nav.languages.length;i++){language=nav.languages[i];len=language.length;if(!shortLanguage&&len){shortLanguage=language}if(language&&len>2){return language}}}for(i=0;i<browserLanguagePropertyKeys.length;i++){language=nav[browserLanguagePropertyKeys[i]];if(language==null){continue}len=language.length;if(!shortLanguage&&len){shortLanguage=language}if(language&&len>2){return language}}return shortLanguage},getFirstBrowserLanguage:function getFirstBrowserLanguage(){var language=this.getFirstBrowserLanguageWithRegionCode().replace("_","-");if(!language)return"zh";var languages=language.split("-");if(languages.length===1){return language}else if(languages.length===2){return languages[0]}else{return language}},data:{"en":{"deploy_title--text":"Deploying","deploy_caption--text":"Deployment may last up to 5 minutes.<br>After the deployment, the page will automatically refresh. Please wait.","deploy_copyright--text":"Penguin Statistics"},"ja":{"deploy_title--text":"Deploying","deploy_caption--text":"Deployment may last up to 5 minutes.<br>After the deployment, the page will automatically refresh. Please wait.","deploy_copyright--text":"Penguin Statistics"},"ko":{"deploy_title--text":"Deploying","deploy_caption--text":"Deployment may last up to 5 minutes.<br>After the deployment, the page will automatically refresh. Please wait.","deploy_copyright--text":"Penguin Statistics"}},fill:function fill(key,content){document.querySelector("#"+key).innerHTML=content},render:function(){document.querySelector("#deploy_copyright_year--text").textContent=new Date().getFullYear().toString();let language=this.getFirstBrowserLanguage();if(language in this.data&&typeof language==="string"&&language.length<=2){let messages=this.data[language];for(let[key,value]of Object.entries(messages)){this.fill(key,value)}}}};try{_i18n.render()}catch(e){console.error(e)}</script></body></html>
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
name="slide-fade"
mode="out-in"
>
<router-view class="x--safe-area" />
<router-view />
</transition>
<Footer />
</v-content>
Expand Down
7 changes: 7 additions & 0 deletions src/apis/query.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import service from "@/utils/service";

export default {
advancedQuery (queries) {
return service.post("/result/advanced", queries)
}
}
1 change: 1 addition & 0 deletions src/assets/icons/sanity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions src/assets/under-deploy-i18n-inline.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
"use strict";

let _i18n = {
getFirstBrowserLanguageWithRegionCode () {
let nav = window.navigator,
browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'],
i,
language,
len,
shortLanguage = null;

// support for HTML 5.1 "navigator.languages"
if (Array.isArray(nav.languages)) {
for (i = 0; i < nav.languages.length; i++) {
language = nav.languages[i];
len = language.length;
if (!shortLanguage && len) {
shortLanguage = language;
}
if (language && len>2) {
return language;
}
}
}

// support for other well known properties in browsers
for (i = 0; i < browserLanguagePropertyKeys.length; i++) {
language = nav[browserLanguagePropertyKeys[i]];
//skip this loop iteration if property is null/undefined. IE11 fix.
if (language == null) { continue; }
len = language.length;
if (!shortLanguage && len) {
shortLanguage = language;
}
if (language && len > 2) {
return language;
}
}

return shortLanguage;
},
getFirstBrowserLanguage () {
const language = this.getFirstBrowserLanguageWithRegionCode().replace("_", "-");
if (!language) return "zh"; // use default
const languages = language.split("-");
if (languages.length === 1) {
return language
} else if (languages.length === 2) {
return languages[0]
} else {
// probably malformed...
return language
}
},
data: {
"en": {
"deploy_title--text": "Deploying",
"deploy_caption--text": "Deployment may last up to 5 minutes.<br>After the deployment, the page will automatically refresh. Please wait.",
"deploy_copyright--text": "Penguin Statistics"
},
"ja": {
"deploy_title--text": "Deploying",
"deploy_caption--text": "Deployment may last up to 5 minutes.<br>After the deployment, the page will automatically refresh. Please wait.",
"deploy_copyright--text": "Penguin Statistics"
},
"ko": {
"deploy_title--text": "Deploying",
"deploy_caption--text": "Deployment may last up to 5 minutes.<br>After the deployment, the page will automatically refresh. Please wait.",
"deploy_copyright--text": "Penguin Statistics"
},
},
fill (key, content) {
document.querySelector("#" + key).innerHTML = content;
},
render () {
document.querySelector("#deploy_copyright_year--text").textContent = new Date().getFullYear().toString();
let language = this.getFirstBrowserLanguage();
if (language in this.data && typeof language === "string" && language.length <= 2) {
let messages = this.data[language];
for (let [key, value] of Object.entries(messages)) {
this.fill(key, value)
}
}
}
};

try {
_i18n.render()
} catch (e) {
console.error(e)
}
Loading

0 comments on commit 0db50c2

Please sign in to comment.