Skip to content

Commit

Permalink
Merge pull request #194 from penguin-statistics/dev
Browse files Browse the repository at this point in the history
v1.1.1 release
  • Loading branch information
GalvinGao authored Feb 8, 2020
2 parents 3a8124d + a3ed38b commit 131d8a4
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 84 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json

# Editor directories and files
.idea
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "penguin-stats-frontend",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down Expand Up @@ -62,4 +62,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
68 changes: 47 additions & 21 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
style="max-height: calc(100vh - 36.76px)"
width="300"
>
<div class="drawer-logo blue darken-4">
<div
:class="{
'drawer-logo blue': true,
'darken-4': dark,
'darken-3': !dark
}"
>
<v-img
:src="require('@/assets/logo.png')"
aspect-ratio="1"
Expand All @@ -37,6 +43,7 @@
<v-list-item
v-if="!route.children || route.meta.forceSingle"
:key="route.name"
:class="route.path === $route.path ? 'v-list-item--active' : ''"
@click="onMenuItemClicked(route)"
>
<v-list-item-icon>
Expand All @@ -58,6 +65,7 @@
:key="route.name"
:value="route.meta.active"
:prepend-icon="route.meta.icon"
color="grey"
no-action
>
<template v-slot:activator>
Expand All @@ -67,6 +75,7 @@
<v-list-item
v-for="child in route.children.filter(el => !el.meta.hide)"
:key="child.name"
:class="child.path === $route.path.split('/')[2] ? 'v-list-item--active' : ''"
@click="onMenuItemClicked(child)"
>
<v-list-item-title>{{ $t(child.meta.i18n) }}</v-list-item-title>
Expand All @@ -84,25 +93,38 @@
<v-row
justify="end"
>
<v-btn
icon
class="mx-1"
@click="refreshData"
>
<v-icon>mdi-database-refresh</v-icon>
</v-btn>

<v-btn
icon
class="mx-1"
@click="dark = !dark"
>
<v-icon>mdi-invert-colors</v-icon>
</v-btn>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
icon
class="mx-1"
v-on="on"
@click="refreshData"
>
<v-icon>mdi-database-refresh</v-icon>
</v-btn>
</template>
<span>{{ $t('menu.refreshData') }}</span>
</v-tooltip>

<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
icon
class="mx-1"
v-on="on"
@click="dark = !dark"
>
<v-icon>mdi-invert-colors</v-icon>
</v-btn>
</template>
<span>{{ $t('menu.invertColors') }}</span>
</v-tooltip>

<v-menu
bottom
left
open-on-hover
transition="slide-y-transition"
>
<template v-slot:activator="{ on }">
Expand Down Expand Up @@ -378,11 +400,15 @@ export default {
: imageUrl("croissant")
},
changeLocale (localeId, save=true) {
Console.debug("[i18n] locale changed to:", localeId, "| saving to vuex:", save);
this.$i18n.locale = localeId;
// this.$vuetify.lang.current = localeId;
if (save) this.$store.commit("changeLocale", localeId);
document.title = `${this.$t(this.$route.meta.i18n) + ' | ' || ''}${this.$t('app.name')}`;
if (localeId !== this.$i18n.locale) {
Console.debug("[i18n] locale changed to:", localeId, "| saving to vuex:", save);
this.$i18n.locale = localeId;
// this.$vuetify.lang.current = localeId;
if (save) this.$store.commit("changeLocale", localeId);
document.title = `${this.$t(this.$route.meta.i18n) + ' | ' || ''}${this.$t('app.name')}`;
} else {
Console.debug("[i18n] Same locale");
}
},
logRouteEvent (newValue) {
if (newValue.name === "StatsByStage_Selected") {
Expand Down
4 changes: 3 additions & 1 deletion src/components/stats/StageSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,13 @@
},
set (val) {
this.internalStep = val;
if (val === 1) this.$emit("select", {zone: null, stage: null});
if (!this.bindRouter) return;
if (val === 1) {
this.$router.push({
name: this.routerNames.index
})
});
} else if (val === 2) {
this.$router.push({
name: this.routerNames.details,
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const client = {
source: "frontend-v2",
version: "v1.1.0"
version: "v1.1.1"
};

export default {
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
},
"planner": "ArkPlanner",
"changelog": "Change Log",
"v1": "Visit Old Version"
"v1": "Visit Old Version",
"refreshData": "Refresh Data",
"invertColors": "Change Theme Color"
},
"meta": {
"details": "Details",
Expand Down
4 changes: 3 additions & 1 deletion src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
},
"planner": "周回計画作成ツール",
"changelog": "更新履歴",
"v1": "旧バージョン"
"v1": "旧バージョン",
"refreshData": "データ更新",
"invertColors": "テーマ変更"
},
"meta": {
"details": "詳細を見る",
Expand Down
4 changes: 3 additions & 1 deletion src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
},
"planner": "刷图规划器",
"changelog": "更新日志",
"v1": "访问旧版"
"v1": "访问旧版",
"refreshData": "刷新数据",
"invertColors": "转换主题"
},
"meta": {
"details": "详细信息",
Expand Down
3 changes: 3 additions & 0 deletions src/models/stages.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const stages = new ObjectManager({
api: '/stages',
transform: [
(object) => {
// object.push({"stageType":"ACTIVITY","stageId":"test01_001","zoneId":"test01","code":"测试活动 1","apCost":99,"normalDrop":["30011"],"specialDrop":[],"extraDrop":[], "isGacha": true})
// object.push({"stageType":"ACTIVITY","stageId":"test01_002","zoneId":"test01","code":"测试活动 2","apCost":99,"normalDrop":["30011"],"specialDrop":[],"extraDrop":[], "isGacha": true})

object.forEach(el => {
el.dropsSet = [...el.normalDrop, ...el.extraDrop, ...el.specialDrop]
});
Expand Down
2 changes: 2 additions & 0 deletions src/models/zones.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const zones = new ObjectManager({
api: '/zones?i18n=true',
transform: [
(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.forEach((el) => {
el.icon = getIcon(el.type);

Expand Down
16 changes: 7 additions & 9 deletions src/views/About/Bulletin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
"zh": {
"bulletin": {
"bulletin_0": "1月16日海外版正式上线,为了避免数据混淆,请只上传国服的掉落。",
"bulletin_1": "专用于海外版的素材统计站是否开放正在计划中。",
"bulletin_2": "另外,希望有会韩语的博士可以一起来完成网站韩语化工作。"
"bulletin_1": "专用于海外版的素材统计站是否开放正在计划中。"
}
},
"en": {
"bulletin": {
"bulletin_0": "Arknights EN server was officially released on 1/16. In order not to mess up the data, please only submit drop data from CN server.",
"bulletin_1": "We are considering whether to open another website for overseas servers.",
"bulletin_2": "In addition, we are sincerely looking for someone who can help us translate the website into Korean."
"bulletin_1": "We are considering whether to open another website for overseas servers."
}
},
"ja": {
"bulletin": {
"bulletin_0": "1月16日に海外版が正式にリリースされます。データの混雑を避けるために、当サイトでは大陸版のドロップデータのみをアップロードして下さい。",
"bulletin_1": "海外版のドロップまとめサイトを開設するかは現時点では思案中のみとなっています。",
"bulletin_2": "さらに、ウェブサイトを韓国語に翻訳する方を募集しています。"
"bulletin_1": "海外版のドロップまとめサイトを開設するかは現時点では思案中のみとなっています。"
}
}
}
</i18n>

<template>
<v-card class="bkop-light pa-6">
<v-card
elevation="5"
class="bkop-light pa-6"
>
<h1 class="headline font-weight-black">
{{ $t('menu.about.bulletin') }}
</h1>
Expand All @@ -38,8 +38,6 @@
<span>{{ $t('bulletin.bulletin_0') }}</span>
<br>
<span>{{ $t('bulletin.bulletin_1') }}</span>
<br>
<span>{{ $t('bulletin.bulletin_2') }}</span>
</v-col>
</v-row>
</v-card>
Expand Down
4 changes: 4 additions & 0 deletions src/views/About/Changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<v-card
class="bkop-light"
data-aos="fade"
elevation="5"
>
<v-card-title class="title">
{{ dateKey }}
Expand All @@ -35,6 +36,9 @@ export default {
data() {
return {
logs: {
'v1.1.1': [
'“岁过华灯”等一系列开箱子的汇报支持批量上传'
],
'v1.1.0': [
'作战选择界面重做',
'对多语言更友好的支持',
Expand Down
5 changes: 4 additions & 1 deletion src/views/About/Contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
</i18n>

<template>
<v-card class="bkop-light pa-6">
<v-card
elevation="5"
class="bkop-light pa-6"
>
<h1 class="headline">
{{ $t('contact.contact_0') }}
</h1>
Expand Down
5 changes: 4 additions & 1 deletion src/views/About/Contribute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
</i18n>

<template>
<v-card class="bkop-light pa-6">
<v-card
elevation="5"
class="bkop-light pa-6"
>
<h1 class="headline">
{{ $t('menu.about.contribute') }}
</h1>
Expand Down
5 changes: 4 additions & 1 deletion src/views/About/Donate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
</i18n>

<template>
<v-card class="bkop-light pa-6">
<v-card
elevation="5"
class="bkop-light pa-6"
>
<h1 class="headline">
{{ $t('menu.about.donate') }}
</h1>
Expand Down
5 changes: 4 additions & 1 deletion src/views/About/Intro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
</i18n>

<template>
<v-card class="bkop-light px-6 py-1">
<v-card
elevation="5"
class="bkop-light px-6 py-1"
>
<v-row
align="center"
justify="center"
Expand Down
Loading

0 comments on commit 131d8a4

Please sign in to comment.