Skip to content

Commit

Permalink
Merge pull request #363 from penguin-statistics/dev
Browse files Browse the repository at this point in the history
Release v3.2.2
  • Loading branch information
AlvISsReimu authored Jul 10, 2020
2 parents 490644d + edddabc commit 1cdecf1
Show file tree
Hide file tree
Showing 36 changed files with 967 additions and 481 deletions.
9 changes: 9 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"baseUrl": "http://localhost:8080",
"video": false,
"pluginsFile": "tests/e2e/plugins/index.js",
"watchForFileChanges": false,
"env": {
"PENGUIN_FRONTEND_ENV": "testing"
}
}
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
{
"name": "penguin-stats-frontend",
"version": "3.2.1",
"version": "3.2.2",
"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)"
],
"author": "Penguin Statistics Contributors <contributors@penguin-stats.io> (https://github.com/orgs/penguin-statistics/people)",
"scripts": {
"serve": "vue-cli-service serve",
"build": "npx --max_old_space_size=4096 vue-cli-service build --modern",
"build:single": "npx --max_old_space_size=4096 vue-cli-service build",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"build:single": "npx --max_old_space_size=4096 vue-cli-service build",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'",
"serveDist": "serve -c build/serve.json",
"preview": "yarn build && yarn serveDist",
"preview:single": "yarn build:single && yarn serveDist",
"release": "standard-version"
"release": "standard-version",
"serveDist": "serve -c build/serve.json"
},
"dependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
Expand Down Expand Up @@ -54,7 +44,7 @@
"@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",
"@vue/cli-service": "^4.4.6",
"axios": "^0.19.0",
"babel-eslint": "^10.0.1",
"browserslist-ga-export": "^2.0.0",
Expand Down Expand Up @@ -86,14 +76,25 @@
"last 5 versions",
"defaults"
],
"bugs": {
"url": "https://github.com/penguin-statistics/frontend-v2/issues"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"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)"
],
"homepage": "https://github.com/penguin-statistics/frontend-v2#readme",
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
}
},
"license": "MIT"
}
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
import './styles/global.css'
import './styles/fonts.css'
import './styles/theme-adapt.scss'
import Footer from "@/components/global/Footer";
import CDN from "@/mixins/CDN";
import Mirror from "@/mixins/Mirror";
Expand Down
Binary file added src/assets/zonePageBackgrounds/act11d0_zone1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/drawer/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
v-if="!route.children || route.meta.forceSingle"
:key="route.name"
:class="route.path === $route.path ? activeClass : ''"
:two-line="route.meta.twoLine"
:two-line="!!route.meta.twoLine"
@click="navigate(route)"
>
<v-list-item-icon>
Expand All @@ -19,7 +19,7 @@
</v-icon>
</v-list-item-title>
<v-list-item-subtitle
v-if="route.meta.twoLine"
v-if="!!route.meta.twoLine"
class="overline"
>
{{ $t(route.meta.twoLine) }}
Expand Down
5 changes: 4 additions & 1 deletion src/components/global/GlobalSnackbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@
:timeout="snackbar.timeout"
:color="snackbar.color"
>
<v-icon class="mr-4">
<v-icon
class="mr-4"
color="white"
>
{{ snackbar.icon }}
</v-icon>
{{ $t(snackbar.text, snackbar.extra) }}
Expand Down
6 changes: 4 additions & 2 deletions src/components/stats/SiteStatsOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
return stats["totalStageTimes_24h"]
.map(el => el.times)
.reduce((a, b) => a + b, 0)
.toLocaleString()
}
},
watch: {
Expand All @@ -67,7 +66,10 @@
duration: 1500,
round: 1,
easing: 'easeOutQuint',
delay: 1500
delay: 1500,
complete: function () {
self.$refs["totalReportsNum"].innerText = newValue.toLocaleString();
}
})
}
},
Expand Down
1 change: 1 addition & 0 deletions src/components/stats/StageSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
"act7d5_zone1": this.cdnResource('/backgrounds/zones/act7d5_zone1.jpg'),
"act9d0_zone1": this.cdnResource('/backgrounds/zones/act9d0_zone1.jpg'),
"act10d5_zone1": this.cdnResource('/backgrounds/zones/act10d5_zone1.jpg'),
"act11d0_zone1": this.cdnResource('/backgrounds/zones/act11d0_zone1.jpg'),
"A001_zone1": this.cdnResource('/backgrounds/zones/A001_zone1.jpg'),
"A003_zone1": this.cdnResource('/backgrounds/zones/A003_zone1.jpg'),
"main_0": this.cdnResource('/backgrounds/zones/main_0.jpg'),
Expand Down
4 changes: 2 additions & 2 deletions src/components/toolbar/ServerSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
mdi-server
</v-icon>
<span class="monospace">
<span>
{{ $t("server.servers." + activeServerId) }}
</span>
</v-btn>
Expand Down Expand Up @@ -46,7 +46,7 @@
:key="i"
:disabled="pending"
>
<v-list-item-title class="mr-2 monospace">
<v-list-item-title class="mr-2">
{{ $t("server.servers." + server) }}
</v-list-item-title>
<v-list-item-action v-if="activeServerId === server">
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = "v3.2.1";
const version = "v3.2.2";

module.exports = {
version,
Expand Down
12 changes: 6 additions & 6 deletions src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,16 @@
"item": {
"_name": "アイテム数量",
"now": "選択された {item} ×{quantity}",
"gte": "入力をした“{item}”の数がこのステージのドロップ最大数である {quantity} 個以上に設定されています",
"lte": "“{item}”の数を {quantity} 個以下の数値で再入力して下さい",
"not": "“{item}”はこのステージでは1回のドロップ数が {quantity} 個になることはありません"
"gte": "入力をした“{item}”の数がこのステージのドロップ最大数である {should} 個以上に設定されています",
"lte": "“{item}”の数を {should} 個以下の数値で再入力して下さい",
"not": "“{item}”はこのステージでは1回のドロップ数が {should} 個になることはありません"
},
"type": {
"_name": "アイテム種類数",
"now": "選択されたアイテムは {quantity} 種類です",
"gte": "最少 {quantity} 種類のアイテムが必要です",
"lte": "最大 {quantity} 種類のアイテムが必要です",
"not": "{quantity}種類のアイテムであってはなりません"
"gte": "最少 {should} 種類のアイテムが必要です",
"lte": "最大 {should} 種類のアイテムが必要です",
"not": "{should}種類のアイテムであってはなりません"
}
},
"clear": "クリア",
Expand Down
12 changes: 6 additions & 6 deletions src/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@
"item": {
"_name": "아이템 수",
"now": "{item} ×{quantity}개가 선택되었습니다",
"gte": "\"{item}\" ≥ {quantity}개 여야 합니다",
"lte": "\"{item}\" ≤ {quantity}개 여야 합니다",
"not": "\"{item}\" ≠ {quantity}개 여야 합니다"
"gte": "\"{item}\" ≥ {should}개 여야 합니다",
"lte": "\"{item}\" ≤ {should}개 여야 합니다",
"not": "\"{item}\" ≠ {should}개 여야 합니다"
},
"type": {
"_name": "아이템 종류",
"now": "{quantity}가지의 아이템이 선택되었습니다.",
"gte": "최소 {quantity}가지의 아이템이 드랍되어야 합니다",
"lte": "최대 {quantity}가지의 아이템만이 드랍될 수 있습니다",
"not": "{quantity}가지의 아이템이 드랍될 수 없습니다"
"gte": "최소 {should}가지의 아이템이 드랍되어야 합니다",
"lte": "최대 {should}가지의 아이템만이 드랍될 수 있습니다",
"not": "{should}가지의 아이템이 드랍될 수 없습니다"
}
},
"clear": "초기화",
Expand Down
8 changes: 5 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import * as Integrations from '@sentry/integrations';
import { Integrations as ApmIntegrations } from '@sentry/apm';
import mirror from "@/utils/mirror";
import '@/components/functional'
import debugConditioner from "@/utils/debugConditioner";

if (!window.Intl) require("intl-collator")

Vue.config.productionTip = false;

const production = process.env.NODE_ENV === 'production';

if (production) {
if (production && !debugConditioner.disableSentry) {
Sentry.init({
dsn: 'https://9636aaa824a744f98a619df0aaabba00@sentry.io/1536764',
integrations: [
Expand Down Expand Up @@ -83,10 +84,11 @@ if (production) {
/metrics\.itunes\.apple\.com\.edgesuite\.net\//i
]
});
} else {
Vue.config.performance = true;
}

Vue.config.performance = debugConditioner.performance;
Vue.config.devtools = debugConditioner.devtools;

const googleAnalyticsID = mirror.cn.isCurrent() ? 'UA-142226262-4' : 'UA-142226262-1'

Vue.use(VueAnalytics, {
Expand Down
3 changes: 3 additions & 0 deletions src/mixins/hooks/Theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ export default {
},
methods: {
themeToggle (isDark) {
const windowsIndicator = navigator.platform.indexOf('Win') > -1 ? "platform--windows" : "platform--not-windows";
this.$vuetify.theme.dark = isDark
if (isDark) {
document.documentElement.classList.add("vuetify-theme--dark", windowsIndicator)
document.body.style.backgroundColor = "#121212"
} else {
document.documentElement.classList.add("vuetify-theme--light", windowsIndicator)
document.body.style.backgroundColor = "#ffffff"
}
},
Expand Down
9 changes: 8 additions & 1 deletion src/models/managers/_common.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import store from '@/store'
import validator from "@/utils/validator";

export default {
defaultAjaxHooks: {
Expand All @@ -15,5 +16,11 @@ export default {
}
)
}
}
},
defaultValidator (data) {
return validator.all(
validator.isArray(data),
validator.notEmptyArray(data)
)
},
}
1 change: 1 addition & 0 deletions src/models/managers/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const items = new ObjectManager({
return filtered
},
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
});
Expand Down
3 changes: 2 additions & 1 deletion src/models/managers/matrices/_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ObjectManager from '@/utils/objectManager'

class MatrixObjectManager extends ObjectManager {
/** Creates a matrix object manager */
constructor({ name, api, ttl, ajaxHooks }) {
constructor({ name, api, validator, ttl, ajaxHooks }) {
super({
name,
api,
Expand All @@ -12,6 +12,7 @@ class MatrixObjectManager extends ObjectManager {
return object
},
],
validator,
ttl,
ajaxHooks
});
Expand Down
1 change: 1 addition & 0 deletions src/models/managers/matrices/globalMatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const globalMatrix = new MatrixObjectManager({
"show_closed_zones": true
}
},
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
});
Expand Down
1 change: 1 addition & 0 deletions src/models/managers/matrices/personalMatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const personalMatrix = new MatrixObjectManager({
name: 'personalMatrix',
api: {
serverSensitive: true,
requireAuthorization: true,

url: '/result/matrix',
extraParams: {
Expand Down
1 change: 1 addition & 0 deletions src/models/managers/period.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const period = new ObjectManager({
transform: [
(object) => object,
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
});
Expand Down
1 change: 1 addition & 0 deletions src/models/managers/stages.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const stages = new ObjectManager({
return object
}
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
});
Expand Down
3 changes: 2 additions & 1 deletion src/models/managers/zones.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const zones = new ObjectManager({
(object) => {
// object.push({"zoneId":"test01","zoneIndex":0,"type":"ACTIVITY","zoneName":"测试活动","openTime":1577174400000,"closeTime":1598340799000,"stages":["test01_001","test01_002"],"zoneName_i18n":{"ja":"测试活动 ja","en":"测试活动 en","zh":"测试活动 zh"}})
object.map((el) => {
el.icon = getIcon(el.type);
el.icon = getIcon(el.type) || "mdi-help-circle";

el.isActivity = el.type === "ACTIVITY";

Expand All @@ -28,6 +28,7 @@ const zones = new ObjectManager({
return object
}
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
});
Expand Down
5 changes: 3 additions & 2 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@

.lang-ja .force-lang-font, .lang-ja {
/*font-family : 'ヒラギノ角ゴ ProN' , 'Hiragino Kaku Gothic ProN' , '游ゴシック' , '游ゴシック体' , YuGothic , 'Yu Gothic' , 'メイリオ' , Meiryo , 'MS ゴシック' , 'MS Gothic' , HiraKakuProN-W3 , 'TakaoExゴシック' , TakaoExGothic , 'MotoyaLCedar' , 'Droid Sans Japanese' , sans-serif !important;*/
font-family : 'ヒラギノ角ゴ ProN' , 'Hiragino Kaku Gothic ProN' , 'ヒラギノ明朝 ProN' , 'Hiragino Mincho ProN' , '游明朝','游明朝体',YuMincho,'Yu Mincho' , 'Meiryo', 'MS 明朝' , 'MS Mincho' , HiraMinProN-W3 , 'TakaoEx明朝' , TakaoExMincho , 'MotoyaLCedar' , 'Droid Sans Japanese' , serif !important;
/*font-family : 'ヒラギノ角ゴ ProN' , 'Hiragino Kaku Gothic ProN' , 'ヒラギノ明朝 ProN' , 'Hiragino Mincho ProN' , '游明朝','游明朝体',YuMincho,'Yu Mincho' , 'Meiryo', 'MS 明朝' , 'MS Mincho' , HiraMinProN-W3 , 'TakaoEx明朝' , TakaoExMincho , 'MotoyaLCedar' , 'Droid Sans Japanese' , sans-serif !important;*/
font-family: 'ヒラギノ角ゴ ProN' , 'Hiragino Kaku Gothic ProN' , 'ヒラギノ明朝 ProN', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'Osaka', 'メイリオ', 'Meiryo', 'MS Pゴシック', 'MS PGothic', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
}
.lang-ko .force-lang-font, .lang-ko {
font-family: 'Malgun Gothic', Gulim, 'Roboto', Tahoma, Arial, sans-serif !important
font-family: 'Apple SD Gothic Neo', 'NanumBarunGothic', '맑은 고딕', 'Malgun Gothic', '굴림', 'Gulim', '돋움', 'Dotum', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
}
.force-not-lang-font {
font-family: Roboto, sans-serif!important
Expand Down
Loading

0 comments on commit 1cdecf1

Please sign in to comment.