@@ -33,24 +33,28 @@
\ No newline at end of file
+
diff --git a/src/components/global/ServerNotifyOverlay.vue b/src/components/global/ServerNotifyOverlay.vue
index e7caca26..08a4e32f 100644
--- a/src/components/global/ServerNotifyOverlay.vue
+++ b/src/components/global/ServerNotifyOverlay.vue
@@ -51,83 +51,82 @@
\ No newline at end of file
+
diff --git a/src/components/global/Subheader.vue b/src/components/global/Subheader.vue
index e145b804..bbdc9b0e 100644
--- a/src/components/global/Subheader.vue
+++ b/src/components/global/Subheader.vue
@@ -6,11 +6,11 @@
\ No newline at end of file
+
diff --git a/src/components/global/TitledRow.vue b/src/components/global/TitledRow.vue
index 5456cabb..702c439d 100644
--- a/src/components/global/TitledRow.vue
+++ b/src/components/global/TitledRow.vue
@@ -22,29 +22,29 @@
\ No newline at end of file
+
diff --git a/src/components/global/TooltipBtn.vue b/src/components/global/TooltipBtn.vue
index 8c7db927..bfd04eb0 100644
--- a/src/components/global/TooltipBtn.vue
+++ b/src/components/global/TooltipBtn.vue
@@ -4,7 +4,7 @@
:open-delay="0"
transition="slide-y-transition"
>
-
+
\ No newline at end of file
+
diff --git a/src/components/global/UpgradeNotifier.vue b/src/components/global/UpgradeNotifier.vue
index 8ef6efc5..fdea06b3 100644
--- a/src/components/global/UpgradeNotifier.vue
+++ b/src/components/global/UpgradeNotifier.vue
@@ -20,7 +20,7 @@
-
+
\ No newline at end of file
+
diff --git a/src/components/members/ContributorMemberCard.vue b/src/components/members/ContributorMemberCard.vue
index 42541d80..997f3fcd 100644
--- a/src/components/members/ContributorMemberCard.vue
+++ b/src/components/members/ContributorMemberCard.vue
@@ -10,7 +10,7 @@
aspect-ratio="1"
/>
-
+
{{ member.name }}
@@ -47,26 +47,26 @@
\ No newline at end of file
+
diff --git a/src/components/members/MaintainerMemberCard.vue b/src/components/members/MaintainerMemberCard.vue
index fdec1350..c9c52165 100644
--- a/src/components/members/MaintainerMemberCard.vue
+++ b/src/components/members/MaintainerMemberCard.vue
@@ -53,26 +53,26 @@
\ No newline at end of file
+
diff --git a/src/components/members/MemberResponsibility.vue b/src/components/members/MemberResponsibility.vue
index 2644f250..01d330ac 100644
--- a/src/components/members/MemberResponsibility.vue
+++ b/src/components/members/MemberResponsibility.vue
@@ -23,10 +23,10 @@
\ No newline at end of file
+
diff --git a/src/components/planner/PlannerIO.vue b/src/components/planner/PlannerIO.vue
index 41911886..7bc6330d 100644
--- a/src/components/planner/PlannerIO.vue
+++ b/src/components/planner/PlannerIO.vue
@@ -34,7 +34,7 @@
-
+
@@ -49,7 +49,6 @@
-
{{ $t('planner.actions.config._name') }}
@@ -109,7 +108,7 @@
-
+
\ No newline at end of file
+
diff --git a/src/components/planner/PlannerItem.vue b/src/components/planner/PlannerItem.vue
index 21891e8e..0e1aa91e 100644
--- a/src/components/planner/PlannerItem.vue
+++ b/src/components/planner/PlannerItem.vue
@@ -18,34 +18,34 @@
\ No newline at end of file
+
diff --git a/src/components/planner/PlannerItemStepper.vue b/src/components/planner/PlannerItemStepper.vue
index 6df365b3..f22fdead 100644
--- a/src/components/planner/PlannerItemStepper.vue
+++ b/src/components/planner/PlannerItemStepper.vue
@@ -80,32 +80,32 @@
\ No newline at end of file
+
diff --git a/src/components/planner/PlannerResult.vue b/src/components/planner/PlannerResult.vue
index 5dc74e92..bad91357 100644
--- a/src/components/planner/PlannerResult.vue
+++ b/src/components/planner/PlannerResult.vue
@@ -334,61 +334,61 @@
\ No newline at end of file
+
diff --git a/src/components/recognition/ImageInput.vue b/src/components/recognition/ImageInput.vue
new file mode 100644
index 00000000..1bef8ca8
--- /dev/null
+++ b/src/components/recognition/ImageInput.vue
@@ -0,0 +1,182 @@
+
+
+ $emit('input', files)"
+ @update:error="e => $emit('valid', $refs.fileInput.valid)"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+ +{{ files.length - 8 }} file(s)
+
+
+
+
+ {{ snackbarMessage }}
+
+
+ mdi-close
+
+
+
+
+
+
+
diff --git a/src/components/recognition/RecognitionImageDialog.vue b/src/components/recognition/RecognitionImageDialog.vue
new file mode 100644
index 00000000..32629eb9
--- /dev/null
+++ b/src/components/recognition/RecognitionImageDialog.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+ {{ $t("report.recognition.tips.copyImage") }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/recognition/RecognitionResultCard.vue b/src/components/recognition/RecognitionResultCard.vue
new file mode 100644
index 00000000..368f664e
--- /dev/null
+++ b/src/components/recognition/RecognitionResultCard.vue
@@ -0,0 +1,280 @@
+
+
+
+
+
+
+ {{ $t('report.recognition.confirm.loadingImage') }}
+
+
+
+
+
+ {{ result.file.lastModified | timeAbsolute }}
+
+ {{ result.file.lastModified | timeRelative }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('stage.name') }}
+
+
+
+ {{ result.result.stage.stageCode }}
+
+
+
+
+
+
+
+
+ {{ $t(`stage.loots.${item.dropType}`) || item.dropType }}
+
+
+
+
+
+
+
+
+
+ {{ $t('report.recognition.confirm.unknownStage') }}
+
+
+
+
+
+
+
+
+
{{ $t('report.recognition.confirm.abnormal.' + (result.result.stage.stageCode ? 'error' : 'fatal')) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $emit('input', e)"
+ />
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/recognition/RecognitionResultOverview.vue b/src/components/recognition/RecognitionResultOverview.vue
new file mode 100644
index 00000000..84644e5f
--- /dev/null
+++ b/src/components/recognition/RecognitionResultOverview.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mdi-server
+
+ {{ server }}
+
+
+
+
+
+
+ {{ duration }}ms
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/recognition/RecognitionSubmitVisualizer.vue b/src/components/recognition/RecognitionSubmitVisualizer.vue
new file mode 100644
index 00000000..0e2ba09d
--- /dev/null
+++ b/src/components/recognition/RecognitionSubmitVisualizer.vue
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+ {{ $t('report.recognition.report.reporting') }}
+
+
+
+ {{ submittedTotal.total }} / {{ total }} ({{
+ ((submittedTotal.total / total) * 100).toFixed(0)
+ }}%)
+
+
+
+
+
+
+
+ {{ submittedTotal.failed ? 'mdi-progress-alert' : 'mdi-check' }}
+
+
+
+ {{ $t('report.recognition.report.' + (submittedTotal.failed ? 'partialSucceeded' : 'allSucceeded'), {count: submittedTotal.succeeded}) }}
+
+
{{ $t('report.recognition.report.partialFailed', {count: submittedTotal.failed}) }}
+
+
{{ $t('report.recognition.report.caption') }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/recognition/RecognizeResultAlertCard.vue b/src/components/recognition/RecognizeResultAlertCard.vue
new file mode 100644
index 00000000..67c70acd
--- /dev/null
+++ b/src/components/recognition/RecognizeResultAlertCard.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+ mdi-close
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/recognition/RecognizeResultAlertCardMono.vue b/src/components/recognition/RecognizeResultAlertCardMono.vue
new file mode 100644
index 00000000..1768da41
--- /dev/null
+++ b/src/components/recognition/RecognizeResultAlertCardMono.vue
@@ -0,0 +1,74 @@
+
+
+
+ {{ icon }}
+
+
+
+ {{ alert.title }}
+
+ ×{{ alert.count }}
+
+
+
+
+
+
+ mdi-chevron-right
+
+
+
+
+ {{ alert.subtitle }}
+
+
+ {{ alert.what }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/recognition/ReportEditor.vue b/src/components/recognition/ReportEditor.vue
new file mode 100644
index 00000000..81f780c6
--- /dev/null
+++ b/src/components/recognition/ReportEditor.vue
@@ -0,0 +1,494 @@
+
+
+
+
+
+
+
+ mdi-cancel
+
+
+ {{ $t("report.closedReason." + invalidStage) }}
+
+
+
+
+
+
+ {{ strings.translate(selectedZone, "zoneName") }}
+ {{ strings.translate(selectedStage, "code") }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("stage.loots." + category.id) }}
+
+
+
+ handleChange(category.id, e)"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("report.furniture", { state: $t(`meta.hasNorNot.${furniture}`) }) }}
+
+
+
+
+
+
+
+
+ {{ $t("report.clear") }}
+
+
+
+
+
+ mdi-server
+
+
+ {{ serverName }}
+
+
+
+
+ {{ $t("report.submit") }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("report.clear") }}
+
+
+
+
+
+ mdi-server
+
+
+ {{ serverName }}
+
+
+
+
+ {{ $t("report.submit") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/search/GlobalSearch.vue b/src/components/search/GlobalSearch.vue
index 6e8a2904..3c128837 100644
--- a/src/components/search/GlobalSearch.vue
+++ b/src/components/search/GlobalSearch.vue
@@ -34,7 +34,6 @@
v-haptic
icon
tabindex="100"
-
@click="search = ''"
>
@@ -67,18 +66,18 @@
@@ -204,7 +203,6 @@ export default {
background: rgba(255, 82, 82, .4) !important
}
-
&.theme--light {
&.search-input-bar ::v-deep.v-input__slot {
box-shadow: 0 0 5px rgba(0, 0, 0, .4) !important
@@ -239,4 +237,4 @@ export default {
max-height: 60vh !important;
}
}
-
\ No newline at end of file
+
diff --git a/src/components/search/GlobalSearchNavigation.vue b/src/components/search/GlobalSearchNavigation.vue
index e555f86e..d2d21cc0 100644
--- a/src/components/search/GlobalSearchNavigation.vue
+++ b/src/components/search/GlobalSearchNavigation.vue
@@ -43,18 +43,18 @@
@@ -82,4 +82,4 @@ name: "GlobalSearchNavigation",
background: #666666 !important;
color: white
}
-
\ No newline at end of file
+
diff --git a/src/components/search/SearchResultItems.vue b/src/components/search/SearchResultItems.vue
index 3b58f6cd..0261c4de 100644
--- a/src/components/search/SearchResultItems.vue
+++ b/src/components/search/SearchResultItems.vue
@@ -28,27 +28,27 @@
@@ -62,4 +62,4 @@ export default {
background: rgba(77, 47, 31, 0.9)
}
}
-
\ No newline at end of file
+
diff --git a/src/components/search/SearchResultNormal.vue b/src/components/search/SearchResultNormal.vue
index 5526aad1..b768461d 100644
--- a/src/components/search/SearchResultNormal.vue
+++ b/src/components/search/SearchResultNormal.vue
@@ -17,11 +17,11 @@
\ No newline at end of file
+
diff --git a/src/components/search/SearchResultStages.vue b/src/components/search/SearchResultStages.vue
index 1e95410f..ff084f24 100644
--- a/src/components/search/SearchResultStages.vue
+++ b/src/components/search/SearchResultStages.vue
@@ -25,11 +25,11 @@
@@ -79,4 +79,4 @@ export default {
background: rgba(51, 31, 77, .9)
}
}
-
\ No newline at end of file
+
diff --git a/src/components/stats/BackButton.vue b/src/components/stats/BackButton.vue
index 288524e6..99cf04e0 100644
--- a/src/components/stats/BackButton.vue
+++ b/src/components/stats/BackButton.vue
@@ -6,7 +6,6 @@
:class="{'back-button__active cursor-pointer': active, 'back-button__light': !dark, 'back-button__dark': dark}"
:hover="active"
:ripple="false"
-
@click="$emit('back')"
>
@@ -140,4 +139,4 @@ name: "BackButton",
.v-card__title > .btn-text-spacing {
letter-spacing: .0892857143em !important;
}
-
\ No newline at end of file
+
diff --git a/src/components/stats/BackdropName.vue b/src/components/stats/BackdropName.vue
index 1270b080..e42c807e 100644
--- a/src/components/stats/BackdropName.vue
+++ b/src/components/stats/BackdropName.vue
@@ -9,13 +9,13 @@
@@ -36,4 +36,4 @@ export default {
.theme--light .backdrop-name {
color: rgba(0, 0, 0, .1);
}
-
\ No newline at end of file
+
diff --git a/src/components/stats/Charts.vue b/src/components/stats/Charts.vue
index 48a0329d..804d36d7 100644
--- a/src/components/stats/Charts.vue
+++ b/src/components/stats/Charts.vue
@@ -4,7 +4,7 @@
transition="scale-transition"
max-width="850px"
>
-
+
\ No newline at end of file
+
diff --git a/src/components/stats/DataTable.vue b/src/components/stats/DataTable.vue
index a5a2fe2e..34facaa7 100644
--- a/src/components/stats/DataTable.vue
+++ b/src/components/stats/DataTable.vue
@@ -31,7 +31,7 @@
v-haptic
color="background"
>
-
+
-
+
{{ $t('stats.filter.type._name') }}
-
+
@@ -100,10 +100,10 @@
dense
class="mx-0"
>
-
+
{{ $t('stats.filter.status._name') }}
-
+
-
+
{{ $t('stats.filter.stats', {filtered: filteredData.length, total: items.length}) }}
@@ -153,7 +153,7 @@
-
+
@@ -166,7 +166,7 @@
-
+
-
+
{{ currentMirrorHostname }}
@@ -228,55 +228,55 @@
-
+
{{ $t('stats.headerDesc.apCost') }}
-
+
{{ $t('stats.headerDesc.quantity') }}
-
+
{{ $t('stats.headerDesc.times') }}
-
+
{{ $t('stats.headerDesc.percentage') }}
-
+
{{ $t('stats.headerDesc.apPPR') }}
-
+
{{ $t('stats.headerDesc.clearTime') }}
-
+
{{ $t('stats.headerDesc.itemPerTime') }}
-
+
{{ $t('stats.headerDesc.timeRange') }}
-
+
|
-
+
@@ -426,256 +426,256 @@
\ No newline at end of file
+
diff --git a/src/components/stats/HeaderWithTooltip.vue b/src/components/stats/HeaderWithTooltip.vue
index b937b00f..3e70c138 100644
--- a/src/components/stats/HeaderWithTooltip.vue
+++ b/src/components/stats/HeaderWithTooltip.vue
@@ -4,9 +4,10 @@
top
transition="slide-y-reverse-transition"
>
-
+
\ No newline at end of file
+
diff --git a/src/components/stats/MultiStageSelector.vue b/src/components/stats/MultiStageSelector.vue
index 4f4e951d..ea688124 100644
--- a/src/components/stats/MultiStageSelector.vue
+++ b/src/components/stats/MultiStageSelector.vue
@@ -99,142 +99,142 @@
\ No newline at end of file
+
diff --git a/src/components/stats/NullableTableCell.vue b/src/components/stats/NullableTableCell.vue
index e92cbb0a..52148e8c 100644
--- a/src/components/stats/NullableTableCell.vue
+++ b/src/components/stats/NullableTableCell.vue
@@ -9,28 +9,28 @@
diff --git a/src/components/stats/PreviewItemCard.vue b/src/components/stats/PreviewItemCard.vue
index d13893d7..2590cffa 100644
--- a/src/components/stats/PreviewItemCard.vue
+++ b/src/components/stats/PreviewItemCard.vue
@@ -9,7 +9,7 @@
:ratio="0.5"
/>
- {{ item.name }}
+ {{ item.name || item.itemId || $t('item.undefined') }}
@@ -84,20 +84,20 @@
\ No newline at end of file
+
diff --git a/src/components/stats/ReportValidationOutlier.vue b/src/components/stats/ReportValidationOutlier.vue
new file mode 100644
index 00000000..17198dee
--- /dev/null
+++ b/src/components/stats/ReportValidationOutlier.vue
@@ -0,0 +1,87 @@
+
+
+
+
+ {{ $t('report.rules.type._name') }}
+
+
+
+
+ mdi-alert-circle-outline
+
+
+
+ {{ $t('report.rules.type.now', type.extras) }}
+
+
+ {{ type.message }}
+
+
+
+
+
+
+
+ {{ $t('report.rules.item._name') }}
+
+
+
+
+
+
+
+ {{ $t('report.rules.item.now', item.extras) }}
+
+
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/stats/SiteStatsItem.vue b/src/components/stats/SiteStatsItem.vue
index e3885bf7..5e348f76 100644
--- a/src/components/stats/SiteStatsItem.vue
+++ b/src/components/stats/SiteStatsItem.vue
@@ -16,13 +16,13 @@
:locale="$i18n.locale"
hide-default-footer
- :mobile-breakpoint="1"
+ :mobile-breakpoint="0"
class="elevation-0 transparentTable container--fluid mx-4 font-weight-bold monospace trend-table"
:class="{'pt-0': $vuetify.breakpoint.xsOnly}"
>
-
+
\ No newline at end of file
+
diff --git a/src/components/stats/SiteStatsOverview.vue b/src/components/stats/SiteStatsOverview.vue
index 57dbbcf9..a1d3d8d2 100644
--- a/src/components/stats/SiteStatsOverview.vue
+++ b/src/components/stats/SiteStatsOverview.vue
@@ -4,7 +4,7 @@
hover
class="pa-0 mt-2"
>
-
+
mdi-poll-box
@@ -33,56 +33,56 @@
\ No newline at end of file
+
diff --git a/src/components/stats/SiteStatsStage.vue b/src/components/stats/SiteStatsStage.vue
index 19e3c07c..d665c39e 100644
--- a/src/components/stats/SiteStatsStage.vue
+++ b/src/components/stats/SiteStatsStage.vue
@@ -8,7 +8,7 @@
:headers="headers"
:items="items"
:options="options.table"
-
+
:page.sync="page"
must-sort
@@ -17,13 +17,13 @@
:locale="$i18n.locale"
hide-default-footer
- :mobile-breakpoint="1"
+ :mobile-breakpoint="0"
class="elevation-0 transparentTable container--fluid mx-4 font-weight-bold monospace trend-table"
:class="{'pt-0': $vuetify.breakpoint.xsOnly}"
>
-
+
-
+
\ No newline at end of file
+
diff --git a/src/components/stats/StageCard.vue b/src/components/stats/StageCard.vue
index 587bc75d..43204a8e 100644
--- a/src/components/stats/StageCard.vue
+++ b/src/components/stats/StageCard.vue
@@ -45,60 +45,60 @@
\ No newline at end of file
+
diff --git a/src/components/stats/StageCode.vue b/src/components/stats/StageCode.vue
index 1da876d7..9c32f0e0 100644
--- a/src/components/stats/StageCode.vue
+++ b/src/components/stats/StageCode.vue
@@ -9,105 +9,105 @@
\ No newline at end of file
+
diff --git a/src/components/stats/StageSelector.vue b/src/components/stats/StageSelector.vue
index 1a016dfa..a9a1cec3 100644
--- a/src/components/stats/StageSelector.vue
+++ b/src/components/stats/StageSelector.vue
@@ -37,7 +37,6 @@
@@ -220,13 +219,11 @@
-
+
{{ category.zones[0].icon }}
- {{ $t(['zone.types', category.id].join('.')) }}
+ {{ $t(["zone.types", category.id].join(".")) }}
- {{ $t('zone.status.' + zone.timeValid) }}
+ {{ $t("zone.status." + zone.timeValid) }}
- {{ $t('zone.status.permanentOpen') }}
+ {{ $t("zone.status.permanentOpen") }}
{{ strings.translate(zone, "zoneName") }}
@@ -285,9 +283,7 @@
-
+
@@ -322,308 +317,318 @@
\ No newline at end of file
+
diff --git a/src/components/stats/details/Share.vue b/src/components/stats/details/Share.vue
index 1ca7b116..d989f28b 100644
--- a/src/components/stats/details/Share.vue
+++ b/src/components/stats/details/Share.vue
@@ -88,16 +88,16 @@
\ No newline at end of file
+
diff --git a/src/components/stats/details/StageDetails.vue b/src/components/stats/details/StageDetails.vue
index 81b684b2..2568fbf8 100644
--- a/src/components/stats/details/StageDetails.vue
+++ b/src/components/stats/details/StageDetails.vue
@@ -58,7 +58,7 @@
:href="link.href"
class="bkop-medium mb-2 py-3 "
>
-
+
{{ link.icon }}
@@ -172,18 +172,18 @@
@@ -248,4 +248,4 @@ export default {
border-style: solid;
padding-left: 12px;
}
-
\ No newline at end of file
+
diff --git a/src/components/stats/details/StagePattern.vue b/src/components/stats/details/StagePattern.vue
index f62ed9da..0f1eedd6 100644
--- a/src/components/stats/details/StagePattern.vue
+++ b/src/components/stats/details/StagePattern.vue
@@ -77,44 +77,44 @@
\ No newline at end of file
+
diff --git a/src/components/stats/details/StagePatternError.vue b/src/components/stats/details/StagePatternError.vue
index dfc8e63d..6db14d99 100644
--- a/src/components/stats/details/StagePatternError.vue
+++ b/src/components/stats/details/StagePatternError.vue
@@ -16,7 +16,7 @@
@@ -25,4 +25,4 @@ export default {
border-radius: 8px;
box-shadow: 0 0 0 1px #ccc, inset 0 0 8rem rgba(0, 0, 0, .5)
}
-
\ No newline at end of file
+
diff --git a/src/components/stats/details/StagePatternPieChart.vue b/src/components/stats/details/StagePatternPieChart.vue
index 41c8d1fc..77a867cb 100644
--- a/src/components/stats/details/StagePatternPieChart.vue
+++ b/src/components/stats/details/StagePatternPieChart.vue
@@ -9,15 +9,15 @@
@@ -184,4 +184,4 @@ export default {
// position: absolute;
// width: 100%;
//}
-
\ No newline at end of file
+
diff --git a/src/components/stats/details/StagePatternTable.vue b/src/components/stats/details/StagePatternTable.vue
index b39b30f5..b5e788ac 100644
--- a/src/components/stats/details/StagePatternTable.vue
+++ b/src/components/stats/details/StagePatternTable.vue
@@ -13,7 +13,7 @@
:locale="$i18n.locale"
- :mobile-breakpoint="1"
+ :mobile-breakpoint="0"
class="elevation-0 stat-table transparent container--fluid font-weight-bold transition-all"
:class="{'pt-0': $vuetify.breakpoint.xsOnly}"
@@ -85,14 +85,14 @@
\ No newline at end of file
+
diff --git a/src/components/stats/fact-table/FactTableItem.vue b/src/components/stats/fact-table/FactTableItem.vue
index 90e2afa2..ac88d53e 100644
--- a/src/components/stats/fact-table/FactTableItem.vue
+++ b/src/components/stats/fact-table/FactTableItem.vue
@@ -29,37 +29,37 @@
\ No newline at end of file
+
diff --git a/src/components/toolbar/AccountManager.vue b/src/components/toolbar/AccountManager.vue
index 4e7da633..f2fe7dec 100644
--- a/src/components/toolbar/AccountManager.vue
+++ b/src/components/toolbar/AccountManager.vue
@@ -108,12 +108,12 @@
@keyup.enter.native="login"
@input="emitError"
>
-
+
-
+
\ No newline at end of file
+
diff --git a/src/components/toolbar/NetworkStateIndicator.vue b/src/components/toolbar/NetworkStateIndicator.vue
index b8db665b..8b665794 100644
--- a/src/components/toolbar/NetworkStateIndicator.vue
+++ b/src/components/toolbar/NetworkStateIndicator.vue
@@ -154,82 +154,82 @@
\ No newline at end of file
+
diff --git a/src/components/toolbar/ServerSelector.vue b/src/components/toolbar/ServerSelector.vue
index 363f73d3..3b923e3a 100644
--- a/src/components/toolbar/ServerSelector.vue
+++ b/src/components/toolbar/ServerSelector.vue
@@ -5,28 +5,28 @@
open-on-hover
transition="slide-y-transition"
>
-
+
- mdi-server
+ {{ serverLocked ? 'mdi-server-security' : 'mdi-server' }}
-
-
+
{{ $t("server.name") }}
@@ -34,6 +34,17 @@
{{ $t("server.servers." + activeServerId) }}
+
+
+ mdi-lock
+
+
@@ -90,40 +101,47 @@
\ No newline at end of file
+
diff --git a/src/config/index.js b/src/config/index.js
index c60cc89c..0c40a074 100644
--- a/src/config/index.js
+++ b/src/config/index.js
@@ -1,5 +1,5 @@
-const version = "v3.4.2";
-const project = "frontend-v2";
+const version = 'v3.5.0'
+const project = 'frontend-v2'
module.exports = {
version,
@@ -12,15 +12,15 @@ module.exports = {
},
authorization: {
userId: {
- cookieKey: "userID"
+ cookieKey: 'userID'
}
},
cdn: {
- cn: "https://penguin.upyun.galvincdn.com",
- global: "https://penguin-stats.s3.amazonaws.com"
+ cn: 'https://penguin.upyun.galvincdn.com',
+ global: 'https://penguin-stats.s3.amazonaws.com'
},
advancedQuery: {
- maxQueries: 5,
+ maxQueries: 5
},
randomBackground: {
limit: 3,
@@ -31,18 +31,17 @@ module.exports = {
pagination: 5
}
},
- servers: ["CN", "US", "JP", "KR"],
probe: {
endpoint: {
prod: {
- ws: "wss://probe.penguin-stats.io/",
- legacy: "https://probe.penguin-stats.io/"
+ ws: 'wss://probe.penguin-stats.io/',
+ legacy: 'https://probe.penguin-stats.io/'
},
dev: {
- ws: "ws://localhost:8100/",
- legacy: "http://localhost:8100/"
- },
+ ws: 'ws://localhost:8100/',
+ legacy: 'http://localhost:8100/'
+ }
},
uidExpiration: 1000 * 60 * 24 * 180
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n.js b/src/i18n.js
index 99fb68e1..a13d3c71 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -1,18 +1,18 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
-Vue.use(VueI18n);
+Vue.use(VueI18n)
function loadLocaleMessages () {
- const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.yml$/i);
- const messages = {};
+ const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.yml$/i)
+ const messages = {}
locales.keys().forEach(key => {
- const matched = key.match(/([A-Za-z0-9-_]+)\./i);
+ const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
- const locale = matched[1];
+ const locale = matched[1]
messages[locale] = locales(key)
}
- });
+ })
return messages
}
@@ -21,37 +21,5 @@ export default new VueI18n({
fallbackLocale: 'en',
silentFallbackWarn: true,
formatFallbackMessages: true,
- // dateTimeFormats: {
- // 'en': {
- // short: {
- // month: 'short', day: 'numeric',
- // weekday: 'short', hour: 'numeric', minute: 'numeric'
- // },
- // long: {
- // year: 'numeric', month: 'short', day: 'numeric',
- // hour: 'numeric', minute: 'numeric'
- // }
- // },
- // 'zh': {
- // short: {
- // month: 'short', day: 'numeric',
- // weekday: 'short', hour: 'numeric', minute: 'numeric'
- // },
- // long: {
- // year: 'numeric', month: 'short', day: 'numeric',
- // hour: 'numeric', minute: 'numeric'
- // }
- // },
- // 'ja': {
- // short: {
- // month: 'short', day: 'numeric',
- // weekday: 'short', hour: 'numeric', minute: 'numeric'
- // },
- // long: {
- // year: 'numeric', month: 'short', day: 'numeric',
- // hour: 'numeric', minute: 'numeric'
- // }
- // }
- // },
messages: loadLocaleMessages()
})
diff --git a/src/injections/directives.js b/src/injections/directives.js
index d148bd70..fafe1b9c 100644
--- a/src/injections/directives.js
+++ b/src/injections/directives.js
@@ -1,8 +1,8 @@
-import Vue from 'vue';
-import strings from "@/utils/strings";
-import haptics from "@/utils/native/haptics";
+import Vue from 'vue'
+import strings from '@/utils/strings'
+import haptics from '@/utils/native/haptics'
-Vue.directive("marked", function (el) {
+Vue.directive('marked', function (el) {
el.innerHTML = strings.markdown(el.innerHTML);
[...el.querySelectorAll('a')].forEach(a => {
@@ -18,7 +18,7 @@ Vue.directive("marked", function (el) {
})
})
-function useHaptics (el, {arg, modifiers}) {
+function useHaptics (el, { arg, modifiers }) {
return function () {
if (arg === false) return
@@ -28,8 +28,8 @@ function useHaptics (el, {arg, modifiers}) {
}
}
-Vue.directive("haptic", {
- bind: (el, bindings) => el.addEventListener("click", useHaptics(el, bindings)),
+Vue.directive('haptic', {
+ bind: (el, bindings) => el.addEventListener('click', useHaptics(el, bindings)),
// update: el => el.addEventListener("click", hapticsCb),
- unbind: (el, bindings) => el.removeEventListener("click", useHaptics(el, bindings))
-})
\ No newline at end of file
+ unbind: (el, bindings) => el.removeEventListener('click', useHaptics(el, bindings))
+})
diff --git a/src/injections/filters.js b/src/injections/filters.js
index cd719cdc..60c05d27 100644
--- a/src/injections/filters.js
+++ b/src/injections/filters.js
@@ -1,4 +1,7 @@
-import Vue from 'vue';
-import formatter from "@/utils/formatter";
+import Vue from 'vue'
+import formatter from '@/utils/formatter'
+import timeFormatter from "@/utils/timeFormatter";
-Vue.filter('thousandSeparator', formatter.thousandSeparator)
\ No newline at end of file
+Vue.filter('thousandSeparator', formatter.thousandSeparator)
+Vue.filter('timeAbsolute', val => timeFormatter.date(val, true, true))
+Vue.filter('timeRelative', val => timeFormatter.dayjs(val).fromNow())
diff --git a/src/injections/googleAnalytics.js b/src/injections/googleAnalytics.js
index 5c36d093..cc3d2d62 100644
--- a/src/injections/googleAnalytics.js
+++ b/src/injections/googleAnalytics.js
@@ -1,8 +1,8 @@
-import Vue from "vue";
-import VueAnalytics from "vue-analytics";
-import router from "@/router";
-import mirror from "@/utils/mirror";
-import environment from "@/utils/environment";
+import Vue from 'vue'
+import VueAnalytics from 'vue-analytics'
+import router from '@/router'
+import mirror from '@/utils/mirror'
+import environment from '@/utils/environment'
const googleAnalyticsID = mirror.cn.isCurrent() ? 'UA-142226262-4' : 'UA-142226262-1'
@@ -20,4 +20,4 @@ Vue.use(VueAnalytics, {
amount: 5, // amount of events fired
delay: 2000 // delay in milliseconds
}
-});
\ No newline at end of file
+})
diff --git a/src/injections/index.js b/src/injections/index.js
index 19592071..6309867b 100644
--- a/src/injections/index.js
+++ b/src/injections/index.js
@@ -5,7 +5,7 @@ import './filters'
import './directives'
import './virtualScroller'
-import Vue from "vue"
+import Vue from 'vue'
import AsyncComputed from 'vue-async-computed'
-Vue.use(AsyncComputed)
\ No newline at end of file
+Vue.use(AsyncComputed)
diff --git a/src/injections/katex.js b/src/injections/katex.js
index 4a6f7de0..c2c8ce2a 100644
--- a/src/injections/katex.js
+++ b/src/injections/katex.js
@@ -1,9 +1,9 @@
-import Vue from "vue";
-import VueKatex from "vue-katex"
-import 'katex/dist/katex.min.css';
+import Vue from 'vue'
+import VueKatex from 'vue-katex'
+import 'katex/dist/katex.min.css'
Vue.use(VueKatex, {
globalOptions: {
- //... Define globally applied KaTeX options here
+ // ... Define globally applied KaTeX options here
}
-});
\ No newline at end of file
+})
diff --git a/src/injections/sentry.js b/src/injections/sentry.js
index e6906f6b..4b83739f 100644
--- a/src/injections/sentry.js
+++ b/src/injections/sentry.js
@@ -1,14 +1,14 @@
-import * as Sentry from "@sentry/browser";
-import * as Integrations from "@sentry/integrations";
-import config from "@/config";
-import environment from "@/utils/environment";
-import Vue from "vue";
+import * as Sentry from '@sentry/browser'
+import * as Integrations from '@sentry/integrations'
+import config from '@/config'
+import environment from '@/utils/environment'
+import Vue from 'vue'
if (environment.production) {
- const sentEvents = {};
+ const sentEvents = {}
// set the limitation of a same client sending the same message event to Sentry for every session
- const maxSameEventPerClient = 10;
+ const maxSameEventPerClient = 10
Sentry.init({
dsn: 'https://9636aaa824a744f98a619df0aaabba00@sentry.io/1536764',
@@ -22,7 +22,7 @@ if (environment.production) {
tracesSampleRate: 0.05,
release: (config.project || 'unknown') + '@' + (config.version || 'unknown'),
ignoreErrors: [
- //// START: those errors are found at https://docs.sentry.io/platforms/javascript/#decluttering-sentry
+ /// / START: those errors are found at https://docs.sentry.io/platforms/javascript/#decluttering-sentry
'top.GLOBALS',
// See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html
'originalCreateNotification',
@@ -43,17 +43,17 @@ if (environment.production) {
'EBCallBackMessageReceived',
// See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx
'conduitPage',
- //// END
+ /// / END
- //// Those are our customized ones
- "vivoNewsDetailPage",
- "removeAD",
+ /// / Those are our customized ones
+ 'vivoNewsDetailPage',
+ 'removeAD',
- "getBoundingClientRect",
+ 'getBoundingClientRect',
// ignore native client does not have web implementation error
// since there's currently no feature sensitive native client plugin invocations.
- "does not have web implementation",
- "GlobalCapacitor"
+ 'does not have web implementation',
+ 'GlobalCapacitor'
],
ignoreUrls: [
// Facebook flakiness
@@ -67,27 +67,27 @@ if (environment.production) {
/extensions\//i,
/^chrome:\/\//i,
// Other plugins
- /127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb
+ /127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb
/webappstoolbarba\.texthelp\.com\//i,
/metrics\.itunes\.apple\.com\.edgesuite\.net\//i
],
- beforeSend(event) {
- const {message} = event;
+ beforeSend (event) {
+ const { message } = event
if (message in sentEvents) {
- const counts = sentEvents[message];
+ const counts = sentEvents[message]
// if there's still 'quota' for the client to send this event
if (counts < maxSameEventPerClient) {
// record that we have send the event this time
- sentEvents[message] = counts + 1;
+ sentEvents[message] = counts + 1
// report event
return event
}
} else {
// this has not yet been sent; init var and send it
- sentEvents[message] = 1;
+ sentEvents[message] = 1
return event
}
}
- });
-}
\ No newline at end of file
+ })
+}
diff --git a/src/injections/virtualScroller.js b/src/injections/virtualScroller.js
index 6f2eb032..3370e764 100644
--- a/src/injections/virtualScroller.js
+++ b/src/injections/virtualScroller.js
@@ -2,4 +2,4 @@ import Vue from 'vue'
import { RecycleScroller } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
-Vue.component('RecycleScroller', RecycleScroller)
\ No newline at end of file
+Vue.component('RecycleScroller', RecycleScroller)
diff --git a/src/layouts/AboutLayout.vue b/src/layouts/AboutLayout.vue
index 51c67733..0f7087f1 100644
--- a/src/layouts/AboutLayout.vue
+++ b/src/layouts/AboutLayout.vue
@@ -16,9 +16,9 @@
\ No newline at end of file
+
diff --git a/src/layouts/ReportLayout.vue b/src/layouts/ReportLayout.vue
new file mode 100644
index 00000000..e7d98b33
--- /dev/null
+++ b/src/layouts/ReportLayout.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/src/layouts/StatsLayout.vue b/src/layouts/StatsLayout.vue
index c9e236bb..b3e36e49 100644
--- a/src/layouts/StatsLayout.vue
+++ b/src/layouts/StatsLayout.vue
@@ -22,7 +22,7 @@
diff --git a/src/locales/en.yml b/src/locales/en.yml
index fba51c9d..f99768ee 100644
--- a/src/locales/en.yml
+++ b/src/locales/en.yml
@@ -13,9 +13,13 @@ server:
JP: JP
KR: KR
menu:
+ _beta: Beta
home: Home
search: Search
- report: Report Drops
+ report:
+ _name: Report Drops
+ stage: Select By Stage
+ recognition: Recognition
stats:
_name: Drop Rates
stage: By stage
@@ -47,7 +51,7 @@ menu:
planner: ArkPlanner
meta:
details: Details
- loading: Fetching application data...
+ loading: Loading...
notfound: "???"
footer:
copyright:
@@ -72,10 +76,12 @@ meta:
cancel: Cancel
confirm: Confirm
submit: Submit
+ save: Save
close: Close
time:
minute: "{m}m"
second: "{s}s"
+ isAre: "is | are"
copyWarning: |2-
@@ -86,6 +92,7 @@ stats:
stage: Stage
apCost: Sanity
item: Item
+ itemDrops: Aggregated Item Drops
times: Samples
quantity: Loots
percentage: Percentage
@@ -192,14 +199,140 @@ report:
contact:
before: 'If you are sure you got this drop in-game, submit this report and '
activator: contact us.
- after: Please indicate the stage name and drops. A screenshot is preferred for
- verification purposes. Our team will mark your report appropiately after verifying
- it.
+ after: Please indicate the stage name and drops. A screenshot is preferred for verification purposes. Our team will mark your report appropiately after verifying it.
causes:
noDrop: No items selected.
- limitation: Your current submission has a large deviation from our existing
- data. This submission could be marked as a false report, removing it from
- our data set.
+ limitation: Your current submission has a large deviation from our existing data. This submission could be marked as a false report, removing it from our data set.
+ recognition:
+ step:
+ select: Select Images
+ recognize: Recognize
+ confirm: Confirm
+ report: Report
+ tips:
+ fileTooBig: "File \"{name}\" with size of {size}MB is too large"
+ fileTooOld: "File \"{name}\" was created before 36hrs ago"
+ chooseImage: Click or drag to add an image
+ dragImage: Drag an image here
+ addImage: Click to add an image
+ copyImage: Right click or long press the image to share it
+ abnormal: "{count} image(s) have been \"excluded\" because they either failed to pass legibility test, or failed to be recognized"
+ notImageFile: "\"{files}\" are not image files, ignored."
+ emptyResult: No results available
+ unsatisfiedStart: Unable to Start
+ emptyFile: No images selected
+ hasInvalidFile: Contains invalid file
+ status:
+ success: Success
+ warning: Warning
+ error: Error
+ description: "Boost your upload efficiency by simply choosing your drop screenshots and let us handle the rest."
+ recognize:
+ noFilename: No Filename
+ elapsed: Elapsed
+ remaining: Remaining
+ speed: Avg Speed
+ imagePerSecond: "{count} images/sec"
+ confirm:
+ loadingImage: Loading Screenshot Preview
+ overview:
+ _name: Overview
+ total: Recognized
+ success: Passed
+ error: Failed
+ count: "{count}"
+ server: Dataset Server
+ duration: Avg Time Taken
+ details: Details
+ unknownStage: Recognition Failed
+ abnormal:
+ error: This image failed to pass the legibility test
+ fatal: This image failed to be recognized
+ details: List of Errors
+ hover: "Hover: see recognition results"
+ cherryPick:
+ disabled: "Unable to upload abnormal recognition result"
+ accepted: "Upload this result"
+ rejected: "Discard this result"
+ noResult: No recognition results
+ submit: "Upload Selected (×{count}) Results"
+ itemsTotal: Items
+ report:
+ title: Report Details
+ total: Total
+ submit: Report {count} battle results
+ reporting: Reporting in bulk...
+ allSucceeded: "{count} battle results successfully reported"
+ partialSucceeded: "Only {count} battle results successfully reported"
+ partialFailed: "{count} failed battle result reports. Please follow the troubleshooting steps below"
+ partialFailedDesc:
+ - "Check your network connection: The upload may be failed if the network connection is poor."
+ - "In order to ensure that the entire site data set is not affected by external attacks, if you still cannot upload after multiple retries, your submission volume may have triggered the reporting limit. Please try again after 24 hours to upload the remaining drop reports."
+ - "Your IP may be shared with others, because individuals cannot be located due to the nature of IP. In this case, please try to switch your mobile network or WiFi to retry recognition, or you can retry uploading after 24 hours."
+ - "To prevent retransmission attacks, we will attach a timestamp to your request; if the time of your device is too far from the standard time, the upload may fail. Please try to calibrate the device time and try again."
+ caption: "Thanks for reporting. Your data will be revealed in the global dataset of website in 20 minutes at most because of cache."
+ states:
+ pending: Waiting for initialization...
+ initializing: Initializing...
+ recognizing: Recognizing...
+ rendering: Rendering content...
+ submitting: Submitting...
+
+ cost: Cost
+ filename: Filename
+ result: Result
+ queue: Image Queue
+ start: Recognize {count} images
+ progress: Progress
+ submit: Submit
+ retry: "Failed to submit. Retrying..."
+ filter: Filter
+ notices:
+ welcome:
+ - "Image files will be recognized **locally** using **WebAssembly** technology. We will not upload images to our server."
+ - "Please use screenshots taken within 36 hours that contains only 3-stars clear. Duplications will be detected and marked as *excluded*."
+ - "Please do not report the first-clear of a stage, and do not only report the clears where you were lucky - report all clears."
+ confirm:
+ - Click the image to enlarge it for double-checking.
+ - Screenshots which passed the legibility test have already been checked for upload.
+ - With consideration of dataset accuracy, you are **disallowed** to check a screenshot that failed the legibility test for upload.
+ exceptions:
+ "Fingerprint::Same":
+ title: Duplicated Images
+ subtitle: Check if you have selected duplicated images
+ "FileTimestamp::TooClose":
+ title: Screenshot Interval too close
+ subtitle: Check if you have selected duplicated images
+ "DropInfos::Violation": Failed to pass result validation
+ "StageChar::LowConfidence":
+ title: Error in stage recognition
+ subtitle: Low confidence in the recognition result. Please check if the result is consistent with the screenshot.
+ "DropQuantityChar::LowConfidence":
+ title: Error in item quantity recognition
+ subtitle: Low confidence in the recognition result. Please check if the result is consistent with the screenshot.
+ "DropQuantity::NotFound":
+ title: Failed to recognize the drop quantity
+ subtitle: Pictures with poor resolution or quality may cause this problem. Please check if the image is compressed
+ "Drops::LowConfidence":
+ title: Low Confidence Drop Item
+ subtitle: Check if you have selected a screenshot in which its content includes a closed event
+ "Drops::Illeagal":
+ title: Illegal drops found
+ subtitle: There should be no drop in this stage, but there are some in the screenshot. This is usually caused by event drop during non-event period
+ "Result::False":
+ title: Not a battle result screenshot
+ subtitle: If this is a battle result screenshot, please make sure the server you select is correct
+ "Stage::NotFound":
+ title: Cannot found any valid matching stage
+ subtitle: Error in stage recognition, or we do not count drop for this stage
+ "Stage::Illeagal":
+ title: Illegal stage
+ subtitle: This stage is not opening now
+ "3stars::False": Suspected to be a non 3-stars clear
+ "DropType::Illeagal":
+ title: Illegal drop type
+ subtitle: There are illegal drop types in the screenshot, like first-clear or return AP
+ "DropType::NotFound": Failed to find any drop type
rules:
item:
_name: Item Quantities
@@ -391,6 +524,7 @@ item:
FURN: Furniture
MATERIAL: Materials
related: Related Items
+ undefined: Unknown
query:
panel:
builder: Query Builder
@@ -507,6 +641,8 @@ members:
materials: Materials Supplier
statistics: Statistics and Analysis
widget: Widget Development
+ native: App Development
+ recognition: Screenshot Recognition
socials:
email: Email
github: GitHub
@@ -531,4 +667,7 @@ share:
success: Successfully shared
search:
placeholder: Search...
- hint: Type in Name for Stage, Zone or Item
\ No newline at end of file
+ hint: Type in Name for Stage, Zone or Item
+confirmLeave:
+ title: Are you sure to leave?
+ subtitle: Unsaved changes may lost.
\ No newline at end of file
diff --git a/src/locales/ja.yml b/src/locales/ja.yml
index 2e9d3bdf..67a02a93 100644
--- a/src/locales/ja.yml
+++ b/src/locales/ja.yml
@@ -13,7 +13,10 @@ server:
KR: 韓国版
menu:
home: トップページ
- report: ドロップ報告
+ report:
+ _name: ドロップ報告
+ stage: 章别
+ recognition: スクショ認識
search: グローバル検索
stats:
_name: ドロップ率
@@ -74,7 +77,7 @@ meta:
copyWarning: |2-
- Copyright © 2020 Penguin Statistic({site})
+ Copyright © 2021 Penguin Statistics({site})
stats:
headers:
pattern: パターン
@@ -132,7 +135,7 @@ contribute:
repo: プロジェクトリポジトリ:
frontend: フロントエンド
backend: バックエンド
- contribute_0: 以下のような開発の経験があるのであれば、Penguin Statistics に自身の力を使ってみませんか?右記のQQグループを追加してください:747099627
+ contribute_0: 下記の開発経験お持ちの方を募集しています。Penguin Statisticsに自らの力を貢献してみませんか?ご興味のある方は、ぜひこのQQグループにご参加ください:747099627
contribute_1: 本プロジェクトは無償のオープンソースプロジェクトです
skills:
frontend: フロントエンド開発 Vue.js
@@ -149,9 +152,9 @@ fetch:
subtitle: ページモデルを読み込み中、お待ちください…
failed:
title: ニューラルコネクタ接続エラー
- subtitle: ニューラルコネクタに同期接続できませんでした。一部のリソースロスが発生しました。
- retry: 再試行
- deploying: 新バージョンは配置しています。最大5分程お待ちください…
+ subtitle: "ニューラルコネクタに同期接続できませんでした。一部のリソースロスが発生しました。"
+ retry: "再試行"
+ deploying: "データを最新の状態にしています。最大5分程お待ちください…"
error:
zones: ゾーンデータ
stages: 作戦データ
@@ -164,7 +167,6 @@ fetch:
personalPatternMatrix: 個人ドロップパターンデータ
stats: サイト統計データ
period: サーバーイベントデータ
-
report:
alert:
title:
@@ -175,11 +177,140 @@ report:
repeat: 本当にこのデータを送信しますか?
contact:
before: 誤った情報であると判断した場合は
- activator: 管理人に連絡を行ってください
+ activator: 管理人までご連絡ください
after: "(その際はスクリーンショットの添付をお願いいたします)。確認次第速やかに修正を行わせて頂きます。"
causes:
noDrop: ドロップアイテムが何も選択されていません。送信するデータに問題はありませんか?
- limitation: 今回報告しようとしている内容は既存のデータとの差が大きくなっており、このまま報告するのであれば今回の報告は異常と判定され、全て統計データに反映されることはありません。
+ limitation: 今回報告しようとしている内容は既存のデータとの差が大きくなっており、このまま報告するのであれば今回の報告は異常と判定され、全て統計データに反映されることはできません。
+ recognition:
+ step:
+ select: 選択
+ recognize: 認識
+ confirm: 確認
+ report: レポート
+ tips:
+ fileTooBig: "\"{name}\" ({size}MB) はサイズの制限を超過しています"
+ fileTooOld: "\"{name}\" のスクリーンショットの作成時刻は36時間以内の制限を超過しています"
+ chooseImage: クリックして画像を選択、もしくはボックスに画像をドロップ
+ dragImage: ここに画像をドラッグ&ドロップ
+ addImage: ここにクリックして画像を選択
+ copyImage: 画像を右クリック、もしくは長押しすると、画像をクリップボードにコピー・保存ができます
+ abnormal: "クオリティモニタリング(品質監査)により、ご提出いただいたスクリーンショットのうち、 {count} 枚が基準を満たしていないとして、当該スクリーンショットを「却下」し、サーバーへのレポートはしません"
+ notImageFile: "{files} は画像ファイルではないので、ご提出できません"
+ emptyResult: 認識結果はありません
+ unsatisfiedStart: 認識をスタートできません
+ emptyFile: 選択された画像はありません
+ hasInvalidFile: 無効のファイルが含まれています
+ status:
+ success: 成功
+ warning: 警告
+ error: エラー
+ description: 「作戦成果」画面のスクリーンショットを自動認識で、ドロップ報告は楽で簡単にする!
+ recognize:
+ noFilename: ファイル名なし
+ elapsed: 経過時間
+ remaining: 推定残り時間
+ speed: 認識速度
+ imagePerSecond: "{count} 枚/秒"
+ confirm:
+ loadingImage: スクリーンショットのプレビューを読み込み中
+ overview:
+ _name: 結果概要
+ total: 総計
+ success: 成功
+ error: 異常
+ count: "{count} 枚"
+ server: データサーバー
+ duration: 1画像の平均認識時間
+ details: 結果詳細
+ unknownStage: 認識できません
+ abnormal:
+ error: この画像は却下されます
+ fatal: この画像は認識できません
+ details: 異常リスト
+ hover: マウスオーバーで認識内容表示
+ cherryPick:
+ disabled: 異常なので選択不可
+ accepted: この結果をアップロード
+ rejected: この結果を破棄
+ noResult: 認識結果はありません
+ submit: "選択した {count} 件の認識結果をアップロード"
+ itemsTotal: アイテム合計
+ report:
+ title: レポート詳細
+ total: 総計
+ submit: "選択した {count} 件の認識結果をアップロード"
+ reporting: 結果をアップロード中...
+ allSucceeded: "{count} 件の認識結果がアップロード成功"
+ partialSucceeded: "{count} 件の認識結果のみアップロード成功"
+ partialFailed: "{count} 件の認識結果がアップロード失敗しました。以下のチェックリストをしたがって、問題を解決してみてください。"
+ partialFailedDesc:
+ - ● ネットワーク接続の状況を確認:接続不安定・接続中断でアップロード失敗が発生します。
+ - ● 大量のレポートしましたか:データベースを外部の攻撃から守るために、一日のレポート数には上限があります。何度も試してもアップロードできない場合、上限に達した可能性がありますので、24時間後に再試行してください。
+ - ● 共有IPアドレスを使用していますか:一部の地域には、ご使用のIPアドレスは他人と共有している可能性があります。この場合、ネット環境の切り替え(ルーター再起動、WiFi・4Gの切り替え)をしてから再試行してください。また、24時間後に再試行してください。
+ - ● デバイスの時刻を確認:重複レポ攻撃を防止対策として、端末からのリクエストにはタイムスタンプを付与します。ご使用のデバイスの時刻が正確な時刻と大きく異なる場合、アップロード失敗が発生しますので、デバイスの時刻を調整してください。
+ caption: レポートありがとうございます。キャッシュの原因で、レポートしたデータが反映するまで、20分程度の時間がかかる可能性があります。
+ states:
+ pending: 初期化準備中...
+ initializing: 初期化中...
+ recognizing: 認識中...
+ rendering: 結果をレンダリング中...
+ submitting: 結果をアップロード中...
+
+ cost: 時間コスト
+ filename: ファイル名
+ result: 認識結果
+ queue: 画像リスト
+ start: "{count} 枚画像を認識"
+ progress: 進捗状況
+ retry: 送信失敗、リトライ中
+ filter: 結果フィルター
+ notices:
+ welcome:
+ - ご提供の画像はWebAssembly技術でローカルにて認識しますので、認識段階でサーバーへのデーター送信はございません。
+ - スクリーンショットは、作成時刻が**36 時間内**、またクリア評価が**星3**のものをご選択ください。
+ - 初回クリアのスクリーンショットの選択はご遠慮ください。**偏向的に**一部だけのスクリーンショット(極端にいい・悪いケース)でのレポートはご遠慮ください。
+ confirm:
+ - 画像をクリックしたら拡大できます、もう一回クリックしたら元に戻せます
+ - 認識成功のスクリーンショットは自動的にチェックを入れています
+ - 本サイトのデータの正確度のため、エラーのある画像はご選択できません
+ exceptions:
+ "Fingerprint::Same":
+ title: 完全一致の画像が存在
+ subtitle: 重複的なスクリーンショットを選択しましたかご確認ください
+ "FileTimestamp::TooClose":
+ title: 作成時間間隔が短すぎる画像が存在
+ subtitle: 重複的なスクリーンショットを選択しましたかご確認ください
+ "DropInfos::Violation": 認識結果が検証失敗
+ "StageChar::LowConfidence":
+ title: ステージ認識異常の可能性がある
+ subtitle: 認識の信頼性が低い、認識結果を画像と照合してください
+ "DropQuantityChar::LowConfidence":
+ title: アイテム数量認識異常の可能性がある
+ subtitle: 認識の信頼性が低い、認識結果を画像と照合してください
+ "DropQuantity::NotFound":
+ title: 数量検出失敗のドロップが存在
+ subtitle: 解像度・品質の低い画像はこの問題を引き起こす可能性があります。画像は圧縮処理されましたかご確認ください
+ "Drops::LowConfidence":
+ title: 未知のドロップが存在
+ subtitle: この問題は通常、イベント期間外のイベントドロップによるものです
+ "Drops::Illeagal":
+ title: 非合法ドロップが存在
+ subtitle: このステージには今、可能のドロップが存在していませんが、検出されました。これは通常、イベント期間外のイベントドロップによるものです
+ "Result::False":
+ title: 作戦成果のスクリーンショットではない
+ subtitle: もしこれは確かに作戦成果のスクリーンショットであれば、ご選択のサーバーは間違いないかご確認ください
+ "Stage::NotFound":
+ title: 未知のステージ
+ subtitle: これはステージ認識にはエラーが発生しましたか、又はこのステージは記録されていません(殲滅作戦、絶境作戦など)
+ "Stage::Illeagal":
+ title: 非合法ステージ
+ subtitle: このステージただ今有効していません
+ "3stars::False": 星3評価ではない
+ "DropType::Illeagal":
+ title: 非合法のドロップタイプ
+ subtitle: スクリーンショットには初回、理性返却などの非合法なドロップタイプ、又は認識できないドロップタイプが存在しています
+ "DropType::NotFound": ドロップタイプ未検出
rules:
item:
_name: アイテム数量
@@ -205,19 +336,19 @@ report:
notices:
rule_1: ここに追加する内容は1回でドロップした内容です。
rule_2: 素材がドロップしなかった場合は直接送信をクリックしてください。
- rule_3: 初クリア時の報酬は報告しないでください。ドロップ結果が極端に良かったものだけを報告するのはご遠慮ください。
- rule_4: クリア時の評価が☆3である場合のみ報告してください。
- rule_5: 大陸版のドロップデータのみをアップロードして下さい。ご協力ありがとうございます。
- usage: 左クリックで個数増加、右クリックで個数減少
+ rule_3: 初回クリア時の報酬を報告しないでください。また、極端なロップ結果(極めてよかった・悪かったなど)を報告しないでください。
+ rule_4: 星3クリアした時の結果のみを報告してください。
+ rule_5: 大陸版以外のドロップデータをアップロードしないよう、ご協力をお願いいたします。
+ usage: 左クリックで個数を増やし、右クリックで個数を減らす
settings:
category:
appearance: スタイル
data: 設定とデータ
optimization:
lowData:
- title: エコノミーモード
- active: エコノミーモード有効中
- subtitle: エコノミーモードは、作戦リストの背景図、全ステーションの背景絵などのリソースのロードないし、ネットワークの使用を低減するのモード。
+ title: 軽量モード
+ active: 軽量モード有効中
+ subtitle: 軽量モードとは、作戦リストや全ステーションなどの画像リソースを無効し、データ通信量の消費を抑えるモードです。
data:
server: キャッシュされたのサーバー:
size: ローカルデータ:
@@ -327,13 +458,13 @@ item:
categories:
ACTIVITY_ITEM: イベントアイテム
CARD_EXP: 作戦記録
- CHIP: Soc
+ CHIP: SoC
FURN: 家具
MATERIAL: 素材
related: 関連素材
dataSource:
global: 全体
- loginNotice: 個人のドロップデータを表示するにはログインが必要となります。
+ loginNotice: 個人所有のドロップデータを閲覧するには、ログインする必要があります。
personal: 個人
title: ログインが必要です
members:
@@ -347,14 +478,17 @@ members:
arkplanner: ArkPlannerの著者
backend: バックエンド
bulkupload: 一括アップロード
- customersupport: 顧客サービス
+ customersupport: コンサルタント
frontend: フロントエンド
localization_ja: 日本語化
localization_ko: 韓国語化
logo: ロゴデザイナー
maintenance: DevOps
- materials: 材料サプライヤー
+ materials: 素材提供
statistics: データ統計解析
+ widget: ウィジェット
+ native: アプリ開発
+ recognition: スクショ認識
socials:
email: Email
github: GitHub
@@ -363,7 +497,7 @@ members:
weibo: Weibo
pattern:
name: ドロップパターン
- empty: ドロップはありません
+ empty: ドロップなし
error:
# 此值实际展示为 2 行,第二行字比第一行大一些
- 本作戦のドロップパターンの
@@ -379,4 +513,4 @@ share:
success: 共有しました
search:
placeholder: 検索...
- hint: 素材名・作战名・ステージコード・章タイトル・活動名(漢字・ふりがな・カタカナ・ローマ字)で検索
\ No newline at end of file
+ hint: 素材名・作战名・ステージコード・章タイトル・イベント名(漢字・ふりがな・カタカナ・ローマ字)で検索
diff --git a/src/locales/zh.yml b/src/locales/zh.yml
index 52abb61c..e603a877 100644
--- a/src/locales/zh.yml
+++ b/src/locales/zh.yml
@@ -13,8 +13,12 @@ server:
JP: 日服
KR: 韩服
menu:
+ _beta: 公测
home: 首页
- report: 掉落汇报
+ report:
+ _name: 掉落汇报
+ stage: 按章节
+ recognition: 截图识别
search: 全局搜索
stats:
_name: 素材掉率
@@ -68,6 +72,7 @@ meta:
cancel: 取消
confirm: 确认
submit: 提交
+ save: 保存
close: 关闭
time:
minute: "{m}分 "
@@ -82,6 +87,7 @@ stats:
stage: 作战
apCost: 理智
item: 物品
+ itemDrops: 掉落情况合计
times: 样本数
quantity: 掉落数
percentage: 百分比
@@ -189,6 +195,136 @@ report:
causes:
noDrop: 尚未选择任何掉落物品
limitation: 本次汇报与现有数据差距较大,继续提交可能导致此次汇报被判定为异常,无法计入全部统计数据中。
+ recognition:
+ step:
+ select: 选择
+ recognize: 识别
+ confirm: 确认
+ report: 汇报
+ tips:
+ fileTooBig: "\"{name}\" ({size}MB) 超出大小限制"
+ fileTooOld: "\"{name}\" 的截图时间超过了 36h 内的时间限制"
+ chooseImage: 点击以选择并加入图片、或直接向框内区域拖拽以加入图片
+ dragImage: 将图片拖拽到此处
+ addImage: 点击此处加入图片
+ copyImage: 右键图片或长按图片可拷贝到剪贴板或保存图片;再次点击图片即可关闭
+ abnormal: "您提交识别的截图中有 {count} 张截图由于未成功通过质量监测,被标记为了「汇报排除」并将无法上传至本站"
+ notImageFile: "{files} 不是图片文件,无法使用"
+ emptyResult: 无可用识别结果
+ unsatisfiedStart: 无法开始识别
+ emptyFile: 暂未选择任何图片
+ hasInvalidFile: 含有无效文件
+ status:
+ success: 成功
+ warning: 警告
+ error: 异常
+ description: 仅需选择结算页面截图,即可自动识别并上传所有掉落结果。
+ recognize:
+ noFilename: 暂无文件名
+ elapsed: 已用时间
+ remaining: 预计剩余
+ speed: 识别速度
+ imagePerSecond: "{count} 图/秒"
+ confirm:
+ loadingImage: 正在加载截图预览
+ overview:
+ _name: 结果概览
+ total: 共识别了
+ success: 检测通过
+ error: 检测异常
+ count: "{count} 张"
+ server: 数据集服务器
+ duration: 每张图片平均识别用时
+ details: 结果详情
+ unknownStage: 无法识别
+ abnormal:
+ error: 此张图片未通过质量监测
+ fatal: 此张图片无法被识别
+ details: 详细异常列表
+ hover: 鼠标悬浮以查看识别内容
+ cherryPick:
+ disabled: 无法选择异常图片
+ accepted: 上传本图结果
+ rejected: 不上传本图结果
+ noResult: 暂时没有识别结果
+ submit: "确认已勾选的 {count} 次结算记录"
+ itemsTotal: 物品数合计
+ report:
+ title: 汇报详情
+ total: 总计
+ submit: 汇报 {count} 次结算记录
+ reporting: 正在批量上传掉落汇报...
+ allSucceeded: "已成功上传 {count} 次结算记录"
+ partialSucceeded: "仅成功上传共 {count} 次的部分结算记录"
+ partialFailed: "共计 {count} 次结算记录上传失败。请依照下方步骤排查可能出现的错误原因"
+ partialFailedDesc:
+ - 检查您的网络连接:质量较差的网络连接或网络中断可能造成上传失败。
+ - 为保证全站数据集免受外部攻击的影响,若您在多次重试后依然无法上传,则可能您的提交量已触发汇报上限、请于 24 小时后再重试上传剩余的掉落汇报。
+ - 由于 IP 性质并不能定位到您个体,在宽带热门区域,您的 IP 有可能与他人共享使用。此种情况下,请尝试切换您的移动网络或 WiFi 重试识别,亦或您可以于 24 小时后重试上传。
+ - 为防止重传攻击,我们会对您的请求附加时间戳;若您的设备的时间与正常时间差距过大,则可能导致上传失败,请尝试校准设备时间后重试。
+ caption: 感谢您的掉落汇报;由于缓存原因,您汇报的数据可能需要最多 20 分钟即可于全站数据集生效
+ states:
+ pending: 正等待初始化...
+ initializing: 初始化中...
+ recognizing: 正在识别...
+ rendering: 渲染确认内容中...
+ submitting: 正在提交记录...
+
+ cost: 耗时
+ filename: 文件名
+ result: 识别结果
+ queue: 识别图片队列
+ start: 识别 {count} 张图片
+ progress: 进度
+ retry: 提交失败,正在重试
+ filter: 结果过滤
+ notices:
+ welcome:
+ - 您所有提供的图片均仅会通过使用 WebAssembly 技术于您的浏览器**本地**进行识别、不会向服务器上传,因此不产生额外流量开销。
+ - 为保证本站数据集准确度,请仅选择**截图时间在 36 小时内**、通关评价为 **3 星**的**结算界面**截图。
+ - 请**不要**选择首次通关截图,并请如实汇报**所有**发生的掉落情况。
+# - 截图内识别到「不合法」的物品,整张截图都将不再计入识别结果(如:已过期活动的相关物品掉落)。
+ confirm:
+ - 点击图片可以放大以便于核对;再次点击图片即可关闭
+ - 成功识别的截图已被自动选中上传
+ - 为保证本站数据集准确度,您将**不可**选中发生识别错误的截图
+ exceptions:
+ "Fingerprint::Same":
+ title: 存在完全一致的图片
+ subtitle: 请检查是否选择了重复的截图
+ "FileTimestamp::TooClose":
+ title: 存在截图相隔时间过短的图片
+ subtitle: 请检查是否选择了重复截图
+ "DropInfos::Violation": 识别结果验证失败
+ "StageChar::LowConfidence":
+ title: 关卡识别可能存在错误
+ subtitle: 识别置信度低,请核对识别结果是否与图片一致
+ "DropQuantityChar::LowConfidence":
+ title: 物品数量识别可能存在错误
+ subtitle: 识别置信度低,请核对识别结果是否与图片一致
+ "DropQuantity::NotFound":
+ title: 存在未识别到数量的掉落
+ subtitle: 分辨率或质量较差的图片可能会导致此问题。请检查图片是否经过压缩处理
+ "Drops::LowConfidence":
+ title: 存在未知掉落
+ subtitle: 此问题通常是由于非活动期间的活动掉落的导致的。
+ "Drops::Illeagal":
+ title: 存在非法掉落
+ subtitle: 此关卡目前不应存在任何掉落,但图片中存在。这通常是由于非活动期间的活动掉落的导致的。
+ "Result::False":
+ title: 非结算页面截图
+ subtitle: 若这确实是一张结算页面截图,请检查您是否选择了正确的服务器
+ "Stage::NotFound":
+ title: 未知关卡
+ subtitle: 这可能是关卡识别出现了错误,或此关卡不被收录(如剿灭作战、绝境作战等)
+ "Stage::Illeagal":
+ title: 非法关卡
+ subtitle: 此关卡目前不开放
+ "3stars::False": 非三星评价
+ "DropType::Illeagal":
+ title: 非法掉落类型
+ subtitle: 截图中存在首次掉落、理智返还等非法掉落类型,或存在识别失败的掉落类型
+ "DropType::NotFound": 未找到任何掉落类型
rules:
item:
_name: 物品项
@@ -198,17 +334,17 @@ report:
not: "“{stage}” 内的 “{item}” 数量不应等于 {should}"
type:
_name: 物品种类
- now: 于 “{stage}” 已选 {quantity} 个物品
- gte: "“{stage}” 内应至少有 {should} 个物品"
- lte: "“{stage}” 内应至多有 {should} 个物品"
- not: "“{stage}” 内的物品数量应总计不为 {should}"
+ now: 于 “{stage}” 已选 {quantity} 种物品
+ gte: "“{stage}” 内应至少有 {should} 种物品"
+ lte: "“{stage}” 内应至多有 {should} 种物品"
+ not: "“{stage}” 内的物品种类数应总计不为 {should}"
clear: 清空
closedReason:
EXPIRED: 不在可汇报时间区间内:作战已结束或暂未开启
NOT_FOUND: 作战不存在:于所选服务器未找到此作战
INVALID: 无法汇报:此作战未包含掉落汇报元数据
furniture: 家具掉落:{state}
- name: 上报结果
+ name: 汇报结果
submit: 提交
success: 汇报成功
unable: 无法提交:
@@ -246,6 +382,22 @@ settings:
reset:
title: 重置本地数据与设置
subtitle: 将会删除所有本地数据与设置。删除后,所有本地设置均会重置至默认值并刷新页面,数据将需要重新加载。确定要继续吗?
+ push:
+ language: 消息语言
+ categories:
+ _name: 推送类型
+ NewStage:
+ title: 新章节加入
+ subtitle: 在新章节加入本 App 时通知您
+ ImportantTimePoint:
+ title: 防侠客
+ subtitle: 在活动即将结束时通知您
+ Maintenance:
+ title: 上游闪断更新
+ subtitle: 在新的游戏服务器闪断更新公告发布后通知您
+ ClientUpgrade:
+ title: 客户端强制更新
+ subtitle: 在新的客户端强制更新公告发布后通知您
zone:
name: 章节
types:
@@ -370,6 +522,7 @@ item:
FURN: 家具
MATERIAL: 材料
related: 相关物品
+ undefined: 未知物品
query:
panel:
builder: 查询编辑器
@@ -442,6 +595,7 @@ credits:
- 企鹅物流数据统计网站内所使用的游戏资源(包括但不限于:游戏图片、动画、音频、文本原文或其转译版本等),其目的仅为更好地反映游戏内对应元素、增强用户体验,相关作品之版权仍属于上海鹰角网络科技有限公司和/或其关联公司,即鹰角网络游戏软件和/或鹰角网络游戏服务的提供方(包括但不限于:YOSTAR (HONG KONG) LIMITED, 株式会社Yostar, YOSTAR LIMITED, 龍成網路 等)
- 企鹅物流数据统计网站内所使用的部分资源来源于 PRTS Wiki (http://prts.wiki) 并同时对部分资源进行了非歧义性的更改
- 企鹅物流数据统计网站内使用了经细微修改的、由 Free Fonts Project 提供的 Bender 字体( http://jovanny.ru ),该字体特别说明使用者可将相关字体以任何用途、没有任何限制地使用,在此特别表示感谢。
+ - 企鹅物流数据统计网站内使用了由 Synthview Type Design 提供的 Novecento Sans Bold 字体( http://typography.synthview.com/novecento-sans-font-family.php )。
source:
title: 开源许可列表
auth:
@@ -479,6 +633,8 @@ members:
materials: 素材提供
statistics: 统计分析
widget: 小组件开发
+ native: App 开发
+ recognition: 截图识别
socials:
email: Email
github: GitHub
@@ -506,4 +662,7 @@ share:
success: 分享成功
search:
placeholder: 搜索...
- hint: 键入 物品全拼 拼音首字母 作战名 章节名 关卡编号 或 部分关卡/物品昵称
\ No newline at end of file
+ hint: 键入 物品全拼 拼音首字母 作战名 章节名 关卡编号 或 部分关卡/物品昵称
+confirmLeave:
+ title: 确定要离开此页面吗?
+ subtitle: 未保存的更改可能会丢失
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 0c9abba7..ad76e29f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -8,38 +8,31 @@ import vuetify from './plugins/vuetify'
import 'vuetify/dist/vuetify.min.css'
import store from './store'
import router from './router'
-import i18n from "@/i18n"
-import {Plugins} from '@capacitor/core'
+import i18n from '@/i18n'
import '@/components/functional'
-import environment from "@/utils/environment";
-const { Device } = Plugins
+import environment from '@/utils/environment'
import './injections'
-import PenguinProbe from "@/utils/probe";
+import PenguinProbe from '@/utils/probe'
-if (!window.Intl) require("intl-collator")
+if (!window.Intl) require('intl-collator')
Vue.config.productionTip = false
Vue.config.performance = environment.debug.performance
Vue.config.devtools = environment.debug.devtools
-async function bootstrap() {
- window.$device = Vue.prototype.$device = {
- batteryInfo: await Device.getBatteryInfo(),
- info: await Device.getInfo(),
- languageCode: await Device.getLanguageCode()
- }
-
+async function bootstrap () {
Vue.prototype.$probe = new PenguinProbe()
+ Vue.prototype.$env = environment
new Vue({
vuetify,
router,
store,
i18n,
- render: h => h(App),
- }).$mount('#app');
+ render: h => h(App)
+ }).$mount('#app')
}
bootstrap()
diff --git a/src/mixins/CDN.js b/src/mixins/CDN.js
index b43e81a6..a66e83f1 100644
--- a/src/mixins/CDN.js
+++ b/src/mixins/CDN.js
@@ -1,14 +1,9 @@
-import config from "@/config"
-import mirror from "@/utils/mirror";
+import mirror from '@/utils/mirror'
export default {
methods: {
cdnDeliver (path) {
- if (mirror.global.isCurrent()) {
- return config.cdn.global + path
- } else {
- return config.cdn.cn + path
- }
+ return mirror.deliver(path)
}
- },
-}
\ No newline at end of file
+ }
+}
diff --git a/src/mixins/ConfirmLeave.js b/src/mixins/ConfirmLeave.js
new file mode 100644
index 00000000..8b106a90
--- /dev/null
+++ b/src/mixins/ConfirmLeave.js
@@ -0,0 +1,55 @@
+import environment from '@/utils/environment'
+
+export default {
+ data () {
+ return {
+ confirmLeaveActive: environment.production
+ }
+ },
+ created () {
+ if (this.confirmLeaveActive) this.confirmLeaveCreate()
+ },
+ beforeRouteLeave (to, from, next) {
+ if (this.confirmLeaveActive) {
+ this.$confirm(this.$t('confirmLeave.subtitle'), {
+ title: this.$t('confirmLeave.title'),
+ subtitle: this.$t('confirmLeave.subtitle'),
+ color: 'error'
+ })
+ .then((permit) => {
+ permit ? next() : next(false)
+ })
+ } else {
+ next()
+ }
+ },
+ beforeDestroy () {
+ this.confirmLeaveDestroy()
+ },
+ watch: {
+ confirmLeaveActive (newValue) {
+ if (newValue) {
+ this.confirmLeaveCreate()
+ } else {
+ this.confirmLeaveDestroy()
+ }
+ }
+ },
+ methods: {
+ confirmLeaveCreate () {
+ window.onbeforeunload = function (e) {
+ e = e || window.event
+
+ if (e) {
+ e.returnValue = '确定要离开此页面吗?'
+ }
+
+ return '确定要离开此页面吗?'
+ }
+ },
+ confirmLeaveDestroy () {
+ this.confirmLeaveActive = false
+ window.onbeforeunload = null
+ }
+ }
+}
diff --git a/src/mixins/Environment.js b/src/mixins/Environment.js
index e0941424..74cf0823 100644
--- a/src/mixins/Environment.js
+++ b/src/mixins/Environment.js
@@ -1,9 +1,9 @@
-import environment from "@/utils/environment";
+import environment from '@/utils/environment'
export default {
computed: {
environment () {
return environment
}
- },
-}
\ No newline at end of file
+ }
+}
diff --git a/src/mixins/I18n.js b/src/mixins/I18n.js
index b8b488a9..1e5609c6 100644
--- a/src/mixins/I18n.js
+++ b/src/mixins/I18n.js
@@ -1,20 +1,21 @@
-import dayjs from "dayjs";
-import Console from "@/utils/Console";
-import {mapGetters} from "vuex";
+import dayjs from 'dayjs'
+import Console from '@/utils/Console'
+import { mapGetters } from 'vuex'
+import helmet from "@/utils/helmet";
export default {
methods: {
- changeLocale(localeId, save = true) {
- dayjs.locale(localeId);
- Console.info("i18n", "locale:", localeId, "| saving to vuex:", save);
- if (save) this.$store.commit("settings/changeLocale", localeId);
- this.$i18n.locale = localeId;
- this.$vuetify.lang.current = localeId;
- document.title = `${this.$t(this.$route.meta.i18n) + ' | ' || ''}${this.$t('app.name')}`;
- document.documentElement.lang = localeId;
+ changeLocale (localeId, save = true) {
+ dayjs.locale(localeId)
+ Console.info('i18n', 'locale:', localeId, '| saving to vuex:', save)
+ if (save) this.$store.commit('settings/changeLocale', localeId)
+ this.$i18n.locale = localeId
+ this.$vuetify.lang.current = localeId
+ helmet.title.update(this.$route)
+ document.documentElement.lang = localeId
}
},
computed: {
...mapGetters('settings', ['language'])
- },
-}
\ No newline at end of file
+ }
+}
diff --git a/src/mixins/Mirror.js b/src/mixins/Mirror.js
index f1c6f61a..97c35236 100644
--- a/src/mixins/Mirror.js
+++ b/src/mixins/Mirror.js
@@ -1,5 +1,5 @@
-import mirror from "@/utils/mirror";
-import device from "@/utils/native/device";
+import mirror from '@/utils/mirror'
+import device from '@/utils/native/device'
// function wrapPromise(promise) {
// return promise
@@ -21,9 +21,9 @@ export default {
},
primaryColor () {
if (this.isVercel) {
- return "orange darken-4"
+ return 'orange darken-4'
} else {
- return "blue darken-3"
+ return 'blue darken-3'
}
},
currentMirrorHostname () {
@@ -42,6 +42,6 @@ export default {
},
isWeb () {
return device.platform.isWeb()
- },
+ }
}
-}
\ No newline at end of file
+}
diff --git a/src/mixins/SpecialUI.js b/src/mixins/SpecialUI.js
index faff7608..7f2e4cb9 100644
--- a/src/mixins/SpecialUI.js
+++ b/src/mixins/SpecialUI.js
@@ -17,5 +17,5 @@ export default {
// return time && this.$i18n.locale === "zh"
return false
}
- },
-}
\ No newline at end of file
+ }
+}
diff --git a/src/mixins/Theme.js b/src/mixins/Theme.js
index e9630e10..e252cd08 100644
--- a/src/mixins/Theme.js
+++ b/src/mixins/Theme.js
@@ -4,4 +4,4 @@ export default {
return this.$vuetify.theme.dark
}
}
-}
\ No newline at end of file
+}
diff --git a/src/mixins/hooks/Analytics.js b/src/mixins/hooks/Analytics.js
index 2afa2f46..3fb75b41 100644
--- a/src/mixins/hooks/Analytics.js
+++ b/src/mixins/hooks/Analytics.js
@@ -1,10 +1,10 @@
-import config from "@/config";
-import Console from "@/utils/Console";
+import config from '@/config'
+import Console from '@/utils/Console'
export default {
watch: {
- '$route': [
- 'logRouteEvent',
+ $route: [
+ 'logRouteEvent'
]
},
created () {
@@ -13,18 +13,18 @@ export default {
'runtime',
'version',
config.version
- );
+ )
},
methods: {
logRouteEvent (newValue) {
- if (newValue.name === "StatsByStage_Selected") {
- Console.info("Analytics", "fetched stage", this.$store.getters['dataSource/source'], newValue.params.stageId);
+ if (newValue.name === 'StatsByStage_Selected') {
+ Console.info('Analytics', 'fetched stage', this.$store.getters['dataSource/source'], newValue.params.stageId)
this.$ga.event('result', 'fetch_' + this.$store.getters['dataSource/source'], newValue.params.stageId, 1)
if (newValue.params.stageId) this.$store.commit('stagePreferences/addHistory', newValue.params.stageId)
- } else if (newValue.name === "StatsByItem_SelectedItem") {
- Console.info("Analytics", "fetched item", this.$store.getters['dataSource/source'], newValue.params.itemId);
+ } else if (newValue.name === 'StatsByItem_SelectedItem') {
+ Console.info('Analytics', 'fetched item', this.$store.getters['dataSource/source'], newValue.params.itemId)
this.$ga.event('result', 'fetch_' + this.$store.getters['dataSource/source'], newValue.params.itemId, 1)
}
- },
- },
-}
\ No newline at end of file
+ }
+ }
+}
diff --git a/src/mixins/hooks/CrispCustomizer.js b/src/mixins/hooks/CrispCustomizer.js
index 37145792..03a1aa62 100644
--- a/src/mixins/hooks/CrispCustomizer.js
+++ b/src/mixins/hooks/CrispCustomizer.js
@@ -1,57 +1,66 @@
-import Console from "@/utils/Console";
-import SpecialUI from "@/mixins/SpecialUI";
+import Console from '@/utils/Console'
+import SpecialUI from '@/mixins/SpecialUI'
export default {
watch: {
- '$route': [
+ $route: [
'crispOpacityChanger'
- ],
+ ]
},
- data() {
+ data () {
return {
crispLoaded: false
}
},
mixins: [SpecialUI],
created () {
- window.$crisp.push(["config", "container:index", [1]]);
- window.$crisp.push(["on", "session:loaded", () => {
- this.crispLoaded = true;
+ window.$crisp.push(['config', 'container:index', [1]])
+ window.$crisp.push(['on', 'session:loaded', () => {
+ this.crispLoaded = true
// resolve safe-area
- Console.info("CrispCustomizer", "triggered | chat:loaded")
+ Console.info('CrispCustomizer', 'triggered | chat:loaded')
try {
- document.querySelector("div.crisp-client > div#crisp-chatbox > div > a").style.setProperty("bottom", "calc(max(env(safe-area-inset-bottom), 14px))", "important");
- document.querySelector("div.crisp-client > div#crisp-chatbox").style.setProperty("display", "block", "important");
- document.querySelector("div.crisp-client > div#crisp-chatbox > div > a > span:nth-child(2)").style.setProperty("box-shadow", "0 0 5px rgba(0, 0, 0, .4)", "important");
+ document.querySelector('div.crisp-client > div#crisp-chatbox > div > a').style.setProperty('bottom', 'calc(max(env(safe-area-inset-bottom), 14px))', 'important')
+ document.querySelector('div.crisp-client > div#crisp-chatbox').style.setProperty('display', 'block', 'important')
+ document.querySelector('div.crisp-client > div#crisp-chatbox > div > a > span:nth-child(2)').style.setProperty('box-shadow', '0 0 5px rgba(0, 0, 0, .4)', 'important')
if (this.isInSpecialUI) {
- document.querySelector("div.crisp-client > div#crisp-chatbox > div > a > span:nth-child(2)").style.setProperty("filter", "grayscale(1)", "important");
+ document.querySelector('div.crisp-client > div#crisp-chatbox > div > a > span:nth-child(2)').style.setProperty('filter', 'grayscale(1)', 'important')
}
this.crispOpacityChanger()
} catch (e) {
- Console.error("CrispCustomizer", "failed to initialize custom style:", e)
+ Console.error('CrispCustomizer', 'failed to initialize custom style:', e)
}
- }]);
+
+ if (window.$crisp.is('chat:large')) {
+ window.$crisp.push(['on', 'chat:opened', function () {
+ document.querySelector('#penguin-toolbar').style.transform = 'translateY(calc(-56px - env(safe-area-inset-top)))'
+ }])
+ window.$crisp.push(['on', 'chat:closed', function () {
+ document.querySelector('#penguin-toolbar').style.transform = 'translateY(0px)'
+ }])
+ }
+ }])
},
methods: {
crispOpacityChanger (newRoute = this.$route) {
if (this.crispLoaded) {
// Console.info("CrispCustomizer", "customize | changing opacity");
try {
- document.querySelector("div.crisp-client").style.setProperty("transition", "all 275ms cubic-bezier(0.165, 0.84, 0.44, 1)", "important");
+ document.querySelector('div.crisp-client').style.setProperty('transition', 'all 275ms cubic-bezier(0.165, 0.84, 0.44, 1)', 'important')
- if (newRoute.name === "home") {
- document.querySelector("div.crisp-client").style.setProperty("display", "block", "important");
+ if (newRoute.name === 'Home') {
+ document.querySelector('div.crisp-client').style.setProperty('display', 'block', 'important')
// document.querySelector("div.crisp-client").style.setProperty("transform", "translateY(0px)", "important")
} else {
- document.querySelector("div.crisp-client").style.setProperty("display", "none", "important");
+ document.querySelector('div.crisp-client').style.setProperty('display', 'none', 'important')
// document.querySelector("div.crisp-client").style.setProperty("transform", "translateY(32px)", "important")
}
} catch (e) {
- Console.info("CrispCustomizer", "failed to change crisp opacity", e)
+ Console.info('CrispCustomizer', 'failed to change crisp opacity', e)
}
}
- },
- },
-}
\ No newline at end of file
+ }
+ }
+}
diff --git a/src/mixins/hooks/GlobalEntry.js b/src/mixins/hooks/GlobalEntry.js
index 1a523cca..cd33c9f0 100644
--- a/src/mixins/hooks/GlobalEntry.js
+++ b/src/mixins/hooks/GlobalEntry.js
@@ -1,12 +1,12 @@
-import Theme from "@/mixins/hooks/Theme";
-import Telemetry from "@/mixins/hooks/Telemetry";
-import CrispCustomizer from "@/mixins/hooks/CrispCustomizer";
-import Analytics from "@/mixins/hooks/Analytics";
-import Localization from "@/mixins/hooks/Localization";
-import RandomizedLogo from "@/mixins/hooks/RandomizedLogo";
-import StoreUpgrader from "@/mixins/hooks/StoreUpgrader";
-import Native from "@/mixins/hooks/Native";
-import Probe from "@/mixins/hooks/Probe";
+import Theme from '@/mixins/hooks/Theme'
+import Telemetry from '@/mixins/hooks/Telemetry'
+import CrispCustomizer from '@/mixins/hooks/CrispCustomizer'
+import Analytics from '@/mixins/hooks/Analytics'
+import Localization from '@/mixins/hooks/Localization'
+import RandomizedLogo from '@/mixins/hooks/RandomizedLogo'
+import StoreUpgrader from '@/mixins/hooks/StoreUpgrader'
+import Native from '@/mixins/hooks/Native'
+import Probe from '@/mixins/hooks/Probe'
export default {
mixins: [
@@ -26,5 +26,5 @@ export default {
// last priority
CrispCustomizer
- ],
-}
\ No newline at end of file
+ ]
+}
diff --git a/src/mixins/hooks/Localization.js b/src/mixins/hooks/Localization.js
index 876f71a0..ee3e125a 100644
--- a/src/mixins/hooks/Localization.js
+++ b/src/mixins/hooks/Localization.js
@@ -1,21 +1,23 @@
-import strings from "@/utils/strings";
-import Console from "@/utils/Console";
-import I18n from "@/mixins/I18n";
-import environment from "@/utils/environment";
+import strings from '@/utils/strings'
+import Console from '@/utils/Console'
+import I18n from '@/mixins/I18n'
+import environment from '@/utils/environment'
export default {
mixins: [I18n],
created () {
- if (this.language) {
- this.changeLocale(this.language, false)
- } else {
- const language = strings.getFirstBrowserLanguage();
- Console.info("i18n", "detected language", language);
+ // if isApp, we then use the "detection" result (but truly in iOS that's the per-app localization settings)
+ // or, if the user has NOT explicitly set the language. in this case we apply it.
+ if (!this.language || environment.isApp) {
+ const language = strings.getFirstBrowserLanguage()
+ Console.info('i18n', 'detected language', language)
if (language) {
// because this is a detection result, thus we are not storing it,
// unless the user manually set one.
this.changeLocale(language, false)
}
+ } else {
+ this.changeLocale(this.language, false)
}
},
computed: {
@@ -24,6 +26,6 @@ export default {
`lang-${this.$i18n.locale}`,
environment.runtime.isApp ? 'runtime-app' : 'runtime-web'
]
- },
- },
-}
\ No newline at end of file
+ }
+ }
+}
diff --git a/src/mixins/hooks/Native.js b/src/mixins/hooks/Native.js
index 23db2037..57fcb7d7 100644
--- a/src/mixins/hooks/Native.js
+++ b/src/mixins/hooks/Native.js
@@ -1,52 +1,51 @@
-import { Plugins, Capacitor } from '@capacitor/core';
-import router from "@/router";
-import Console from "@/utils/Console";
-const { SplashScreen, App, PenguinPlugin } = Plugins;
+import { Plugins, Capacitor } from '@capacitor/core'
+import router from '@/router'
+import Console from '@/utils/Console'
+const { SplashScreen, App, PenguinPlugin } = Plugins
export default {
created () {
- Console.info("Build", `Hello from Penguin Statistics! :D Running platform '${PENGUIN_PLATFORM}'`)
+ Console.info('Build', `Hello from Penguin Statistics! :D Running platform '${PENGUIN_PLATFORM}'`)
- App.addListener('appUrlOpen', function( data ){
- Console.info("Capacitor:App", "App opened with URL", data)
- const path = new URL(data.url).pathname.replace(/\/+/g, "/")
+ App.addListener('appUrlOpen', function (data) {
+ Console.info('Capacitor:App', 'App opened with URL', data)
+ const path = new URL(data.url).pathname.replace(/\/+/g, '/')
// We only push to the route if there is a slug present
- if (path){
- router.push({ path });
+ if (path) {
+ router.push({ path })
}
- });
+ })
- App.addListener('appRestoredResult', function(data) {
- Console.info("Capacitor:App", 'App restored with state', data);
- });
+ App.addListener('appRestoredResult', function (data) {
+ Console.info('Capacitor:App', 'App restored with state', data)
+ })
- App.addListener("appStateChange", function(data) {
- Console.info("Capacitor:App", 'App state changed with new state', data);
+ App.addListener('appStateChange', function (data) {
+ Console.info('Capacitor:App', 'App state changed with new state', data)
})
if (Capacitor.isPluginAvailable('PenguinPlugin')) {
- PenguinPlugin.addListener("networkPathChanged", function(data) {
- Console.info("Capacitor:(penguin)", 'Network Path Changed', data);
+ PenguinPlugin.addListener('networkPathChanged', function (data) {
+ Console.info('Capacitor:(penguin)', 'Network Path Changed', data)
})
- PenguinPlugin.addListener("eventBus", function (event) {
- Console.info("Capacitor:(penguin):eventBus", "received event", event)
- if (event.type === "navigate") router.push({ path: event.value })
+ PenguinPlugin.addListener('eventBus', function (event) {
+ Console.info('Capacitor:(penguin):eventBus', 'received event', event)
+ if (event.type === 'navigate') router.push({ path: event.value })
})
PenguinPlugin.listenerReady()
PenguinPlugin.getLocalizationEnvironment()
.then(value => {
- Console.info("Capacitor:(penguin)", "Localization Environment as", value)
+ Console.info('Capacitor:(penguin)', 'Localization Environment as', value)
})
}
-
},
mounted () {
this.$nextTick(() => {
- SplashScreen.hide();
+ SplashScreen.hide()
})
}
-}
\ No newline at end of file
+}
diff --git a/src/mixins/hooks/RandomizedLogo.js b/src/mixins/hooks/RandomizedLogo.js
index ab7e1f96..a61e4c4d 100644
--- a/src/mixins/hooks/RandomizedLogo.js
+++ b/src/mixins/hooks/RandomizedLogo.js
@@ -1,29 +1,29 @@
-import CDN from "@/mixins/CDN";
-import config from "@/config"
+import CDN from '@/mixins/CDN'
+import config from '@/config'
export default {
- data() {
+ data () {
return {
- randomizedLogo: `${config.cdn.global}/logos/penguin_stats_logo.png`
+ randomizedLogo: `${config.cdn.cn}/logos/penguin_stats_logo.png`
}
},
mixins: [CDN],
watch: {
- '$route': [
- 'randomizeLogo',
+ $route: [
+ 'randomizeLogo'
]
},
methods: {
randomizeLogo () {
- const random = Math.random();
- const self = this;
+ const random = Math.random()
+ const self = this
function imageUrl (character) {
return self.cdnDeliver(`/logos/penguin_stats_logo_${character}.png`)
}
- this.randomizedLogo = random < .25 ? imageUrl("exia")
- : random < .5 ? imageUrl("texas")
- : random < .75 ? imageUrl("sora")
- : imageUrl("croissant")
- },
- },
-}
\ No newline at end of file
+ this.randomizedLogo = random < 0.25 ? imageUrl('exia')
+ : random < 0.5 ? imageUrl('texas')
+ : random < 0.75 ? imageUrl('sora')
+ : imageUrl('croissant')
+ }
+ }
+}
diff --git a/src/mixins/hooks/StoreUpgrader.js b/src/mixins/hooks/StoreUpgrader.js
index d6ce4ecd..7698b1d8 100644
--- a/src/mixins/hooks/StoreUpgrader.js
+++ b/src/mixins/hooks/StoreUpgrader.js
@@ -1,38 +1,37 @@
-import Console from "@/utils/Console";
+import Console from '@/utils/Console'
// import I18n from "@/mixins/I18n";
export default {
created () {
// dark mode
- const dark = this.$store.getters["settings/dark"]
- if (typeof dark === "boolean") {
- this.$store.commit("settings/switchDark", this.dark ? "dark" : "light")
+ const dark = this.$store.getters['settings/dark']
+ if (typeof dark === 'boolean') {
+ this.$store.commit('settings/switchDark', this.dark ? 'dark' : 'light')
} else if (dark === null || dark === undefined) {
- this.$store.commit("settings/switchDark", "system")
+ this.$store.commit('settings/switchDark', 'system')
}
// new data
- const oldDataKeys = ["items", "limitations", "stages", "trends", "zones", "personalMatrix", "globalMatrix"];
+ const oldDataKeys = ['items', 'limitations', 'stages', 'trends', 'zones', 'personalMatrix', 'globalMatrix']
if (Object.keys(this.$store.state.data).some(key => ~oldDataKeys.indexOf(key))) {
- Console.info("StoreUpgrader", "deleting old data structure");
+ Console.info('StoreUpgrader', 'deleting old data structure')
for (const key of oldDataKeys) {
delete this.$store.state.data[key]
}
- this.$store.dispatch("data/fetch", true);
+ this.$store.dispatch('data/fetch', true)
}
// remove deprecated penguin-stats-cacheTTL (cacheUpdatedAt)
- localStorage.removeItem("penguin-stats-cacheTTL")
+ localStorage.removeItem('penguin-stats-cacheTTL')
- let settings = JSON.parse(localStorage.getItem("penguin-stats-settings"))
- if (settings && settings["settings"] && settings["settings"]["excludedStages"]) {
- delete settings["settings"]["excludedStages"]
- localStorage.setItem("penguin-stats-settings", JSON.stringify(settings))
+ const settings = JSON.parse(localStorage.getItem('penguin-stats-settings'))
+ if (settings && settings.settings && settings.settings.excludedStages) {
+ delete settings.settings.excludedStages
+ localStorage.setItem('penguin-stats-settings', JSON.stringify(settings))
}
-
// if (this.$store.getters["settings/language"] === "zh") {
// this.changeLocale("zh-CN")
// }
}
-}
\ No newline at end of file
+}
diff --git a/src/mixins/hooks/Telemetry.js b/src/mixins/hooks/Telemetry.js
index c1ec4b80..fc4522b9 100644
--- a/src/mixins/hooks/Telemetry.js
+++ b/src/mixins/hooks/Telemetry.js
@@ -1,18 +1,18 @@
-import * as Sentry from "@sentry/browser";
-import store from "@/store";
-import i18n from "@/i18n";
-import config from "@/config"
-import Console from "@/utils/Console";
+import * as Sentry from '@sentry/browser'
+import store from '@/store'
+import i18n from '@/i18n'
+import config from '@/config'
+import Console from '@/utils/Console'
class SessionData {
constructor () {
this.data = {
- "LoggedIn": store.getters["auth/loggedIn"],
- "Username": store.getters["auth/username"] || "(null)",
- "LanguageActive": i18n.locale || "(null)",
- "LanguagePersisted": store.getters["settings/language"] || "(null)",
- "Theme": store.getters["settings/dark"],
- "OptimizeLowData": store.getters["settings/lowData"],
+ LoggedIn: store.getters['auth/loggedIn'],
+ Username: store.getters['auth/username'] || '(null)',
+ LanguageActive: i18n.locale || '(null)',
+ LanguagePersisted: store.getters['settings/language'] || '(null)',
+ Theme: store.getters['settings/dark'],
+ OptimizeLowData: store.getters['settings/lowData']
}
}
@@ -23,8 +23,8 @@ class SessionData {
get crisp () {
return [[
...Object.entries(this.data),
- ["Version", config.version]
- ]];
+ ['Version', config.version]
+ ]]
}
}
@@ -33,33 +33,33 @@ export default {
this.updateTelemetryData()
},
watch: {
- watchDataCollection() {
+ watchDataCollection () {
this.updateTelemetryData()
}
},
methods: {
- updateTelemetryData() {
- const sessionData = new SessionData();
- Console.info("Telemetry", "updating telemetry data")
+ updateTelemetryData () {
+ const sessionData = new SessionData()
+ Console.info('Telemetry', 'updating telemetry data')
// set crisp session data
- window.$crisp.push(["set", "session:data", sessionData.crisp]);
- window.$crisp.push(["safe", true]);
+ window.$crisp.push(['set', 'session:data', sessionData.crisp])
+ window.$crisp.push(['safe', true])
// set sentry tags
- Sentry.configureScope(scope => scope.setTags(sessionData.normal));
+ Sentry.configureScope(scope => scope.setTags(sessionData.normal))
}
},
computed: {
- watchDataCollection() {
+ watchDataCollection () {
return {
- "LoggedIn": store.getters["auth/loggedIn"],
- "Username": store.getters["auth/username"] || "(null)",
- "LanguageActive": i18n.locale || "(null)",
- "LanguagePersisted": store.getters["settings/language"] || "(null)",
- "Theme": store.getters["settings/dark"],
- "OptimizeLowData": store.getters["settings/lowData"],
- };
+ LoggedIn: store.getters['auth/loggedIn'],
+ Username: store.getters['auth/username'] || '(null)',
+ LanguageActive: i18n.locale || '(null)',
+ LanguagePersisted: store.getters['settings/language'] || '(null)',
+ Theme: store.getters['settings/dark'],
+ OptimizeLowData: store.getters['settings/lowData']
+ }
}
- },
-}
\ No newline at end of file
+ }
+}
diff --git a/src/mixins/hooks/Theme.js b/src/mixins/hooks/Theme.js
index a31a0e9c..52df25c0 100644
--- a/src/mixins/hooks/Theme.js
+++ b/src/mixins/hooks/Theme.js
@@ -1,37 +1,37 @@
-import {mapGetters} from "vuex";
-import Console from "@/utils/Console";
-import environment from "@/utils/environment";
+import { mapGetters } from 'vuex'
+import Console from '@/utils/Console'
+import environment from '@/utils/environment'
export default {
watch: {
- 'dark': ['onDarkChange']
+ dark: ['onDarkChange']
},
computed: {
- ...mapGetters('settings', ['dark']),
+ ...mapGetters('settings', ['dark'])
},
created () {
- this.onDarkChange(this.dark);
+ this.onDarkChange(this.dark)
},
methods: {
themeToggle (isDark) {
- const windowsIndicator = environment.isWindows ? "platform--windows" : "platform--not-windows";
+ const windowsIndicator = environment.isWindows ? '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"
+ 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 = "#fafafa"
+ document.documentElement.classList.add('vuetify-theme--light', windowsIndicator)
+ document.body.style.backgroundColor = '#f5f5f5'
}
},
onDarkChange (newValue) {
- Console.info("Theme", "setting to", newValue)
- if (newValue === "dark") {
+ Console.info('Theme', 'setting to', newValue)
+ if (newValue === 'dark') {
this.themeToggle(true)
- } else if (newValue === "light") {
+ } else if (newValue === 'light') {
this.themeToggle(false)
- } else if (newValue === "system") {
- const self = this;
+ } else if (newValue === 'system') {
+ const self = this
if (window.matchMedia) {
// if support we then apply the current settings
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
@@ -40,7 +40,7 @@ export default {
// using deprecated `addListener` instead of `addEventListener`: iOS 13.4 doesn't support `addEventListener`
// so the former one has been used. More at https://codepen.io/galvingao/pen/zYvoZeM.
mediaQuery.addListener(function (e) {
- if (self.dark === "system") self.themeToggle(e.matches)
+ if (self.dark === 'system') self.themeToggle(e.matches)
})
} else {
// if the system doesn't support matchMedia, we then fallback to dark mode
@@ -49,4 +49,4 @@ export default {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/models/managers/_common.js b/src/models/managers/_common.js
index b0a7a565..dbb3a5de 100644
--- a/src/models/managers/_common.js
+++ b/src/models/managers/_common.js
@@ -1,18 +1,18 @@
import store from '@/store'
-import validator from "@/utils/validator";
+import validator from '@/utils/validator'
export default {
defaultAjaxHooks: {
request: (id) => {
- store.dispatch("ajax/started", {id})
+ store.dispatch('ajax/started', { id })
},
response: (id, promise) => {
promise.then(
() => {
- store.dispatch("ajax/finished", {id, error: null});
+ store.dispatch('ajax/finished', { id, error: null })
},
- ({errorMessage}) => {
- store.dispatch("ajax/finished", {id, error: errorMessage});
+ ({ errorMessage }) => {
+ store.dispatch('ajax/finished', { id, error: errorMessage })
}
)
}
@@ -22,5 +22,5 @@ export default {
validator.isArray(data),
validator.notEmptyArray(data)
)
- },
-}
\ No newline at end of file
+ }
+}
diff --git a/src/models/managers/items.js b/src/models/managers/items.js
index ea553315..4171a492 100644
--- a/src/models/managers/items.js
+++ b/src/models/managers/items.js
@@ -4,19 +4,19 @@ import commons from './_common'
const items = new ObjectManager({
name: 'items',
api: {
- url: "/items",
+ url: '/items'
},
transform: [
(object) => {
- let filtered = object.filter(el => !el.hide);
- filtered = filtered.sort((a, b) => a.sortId - b.sortId);
+ let filtered = object.filter(el => !el.hide)
+ filtered = filtered.sort((a, b) => a.sortId - b.sortId)
return filtered
- },
+ }
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default items
\ No newline at end of file
+export default items
diff --git a/src/models/managers/matrices/_base.js b/src/models/managers/matrices/_base.js
index e593afd6..c018f3dc 100644
--- a/src/models/managers/matrices/_base.js
+++ b/src/models/managers/matrices/_base.js
@@ -2,22 +2,22 @@ import ObjectManager from '@/utils/objectManager'
class MatrixObjectManager extends ObjectManager {
/** Creates a matrix object manager */
- constructor({ name, api, validator, ttl, ajaxHooks }) {
+ constructor ({ name, api, validator, ttl, ajaxHooks }) {
super({
name,
api,
transform: [
(object) => {
- if ("matrix" in object) return object["matrix"]
- if ("pattern_matrix" in object) return object["pattern_matrix"]
+ if ('matrix' in object) return object.matrix
+ if ('pattern_matrix' in object) return object.pattern_matrix
return object
- },
+ }
],
validator,
ttl,
ajaxHooks
- });
+ })
}
}
-export default MatrixObjectManager
\ No newline at end of file
+export default MatrixObjectManager
diff --git a/src/models/managers/matrices/globalMatrix.js b/src/models/managers/matrices/globalMatrix.js
index 46827f33..7010c580 100644
--- a/src/models/managers/matrices/globalMatrix.js
+++ b/src/models/managers/matrices/globalMatrix.js
@@ -6,11 +6,11 @@ const globalMatrix = new MatrixObjectManager({
api: {
serverSensitive: true,
- url: (server) => `/_private/result/matrix/${server}/global`,
+ url: (server) => `/_private/result/matrix/${server}/global`
},
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default globalMatrix
\ No newline at end of file
+export default globalMatrix
diff --git a/src/models/managers/matrices/globalPatternMatrix.js b/src/models/managers/matrices/globalPatternMatrix.js
index bf5d6091..3b30b398 100644
--- a/src/models/managers/matrices/globalPatternMatrix.js
+++ b/src/models/managers/matrices/globalPatternMatrix.js
@@ -6,11 +6,11 @@ const globalPatternMatrix = new MatrixObjectManager({
api: {
serverSensitive: true,
- url: (server) => `/_private/result/pattern/${server}/global`,
+ url: (server) => `/_private/result/pattern/${server}/global`
},
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default globalPatternMatrix
\ No newline at end of file
+export default globalPatternMatrix
diff --git a/src/models/managers/matrices/personalMatrix.js b/src/models/managers/matrices/personalMatrix.js
index 5ddd7cb2..fa31421e 100644
--- a/src/models/managers/matrices/personalMatrix.js
+++ b/src/models/managers/matrices/personalMatrix.js
@@ -7,10 +7,10 @@ const personalMatrix = new MatrixObjectManager({
requireAuthorization: true,
serverSensitive: true,
- url: (server) => `/_private/result/matrix/${server}/personal`,
+ url: (server) => `/_private/result/matrix/${server}/personal`
},
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default personalMatrix
\ No newline at end of file
+export default personalMatrix
diff --git a/src/models/managers/matrices/personalPatternMatrix.js b/src/models/managers/matrices/personalPatternMatrix.js
index f917b572..586eac5b 100644
--- a/src/models/managers/matrices/personalPatternMatrix.js
+++ b/src/models/managers/matrices/personalPatternMatrix.js
@@ -7,10 +7,10 @@ const personalPatternMatrix = new MatrixObjectManager({
requireAuthorization: true,
serverSensitive: true,
- url: (server) => `/_private/result/pattern/${server}/personal`,
+ url: (server) => `/_private/result/pattern/${server}/personal`
},
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default personalPatternMatrix
\ No newline at end of file
+export default personalPatternMatrix
diff --git a/src/models/managers/period.js b/src/models/managers/period.js
index accba8da..6ec3ae1b 100644
--- a/src/models/managers/period.js
+++ b/src/models/managers/period.js
@@ -4,14 +4,14 @@ import commons from './_common'
const period = new ObjectManager({
name: 'period',
api: {
- url: "/period",
+ url: '/period'
},
transform: [
- (object) => object,
+ (object) => object
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default period
\ No newline at end of file
+export default period
diff --git a/src/models/managers/stages.js b/src/models/managers/stages.js
index 9d3cc857..c130c113 100644
--- a/src/models/managers/stages.js
+++ b/src/models/managers/stages.js
@@ -6,7 +6,7 @@ const stages = new ObjectManager({
api: {
serverSensitive: true,
- url: (server) => `/stages?server=${server}`,
+ url: (server) => `/stages?server=${server}`
},
transform: [
(object) => {
@@ -23,6 +23,6 @@ const stages = new ObjectManager({
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default stages
\ No newline at end of file
+export default stages
diff --git a/src/models/managers/stats.js b/src/models/managers/stats.js
index 7ff35306..b6b1e525 100644
--- a/src/models/managers/stats.js
+++ b/src/models/managers/stats.js
@@ -6,13 +6,13 @@ const stats = new ObjectManager({
api: {
serverSensitive: true,
- url: (server) => `/stats?server=${server}`,
+ url: (server) => `/stats?server=${server}`
},
transform: [
- (object) => object,
+ (object) => object
],
ttl: 1000 * 60 * 10, // 10 minutes
ajaxHooks: commons.defaultAjaxHooks
})
-export default stats
\ No newline at end of file
+export default stats
diff --git a/src/models/managers/trends.js b/src/models/managers/trends.js
index 8f6d1527..d8aa3df3 100644
--- a/src/models/managers/trends.js
+++ b/src/models/managers/trends.js
@@ -6,15 +6,15 @@ const trends = new ObjectManager({
api: {
serverSensitive: true,
- url: (server) => `/_private/result/trend/${server}`,
+ url: (server) => `/_private/result/trend/${server}`
},
transform: [
(object) => {
- return object["trend"]
- },
+ return object.trend
+ }
],
ttl: 1000 * 60 * 60 * 24, // 24 hours
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default trends
\ No newline at end of file
+export default trends
diff --git a/src/models/managers/zones.js b/src/models/managers/zones.js
index 959dd98e..1234bcdf 100644
--- a/src/models/managers/zones.js
+++ b/src/models/managers/zones.js
@@ -1,19 +1,19 @@
import ObjectManager from '@/utils/objectManager'
import commons from './_common'
-function getIcon(key) {
+function getIcon (key) {
const ICON_MAP = {
- "MAINLINE": "mdi-checkerboard",
- "WEEKLY": "mdi-treasure-chest",
- "ACTIVITY": "mdi-sack"
- };
+ MAINLINE: 'mdi-checkerboard',
+ WEEKLY: 'mdi-treasure-chest',
+ ACTIVITY: 'mdi-sack'
+ }
return ICON_MAP[key]
}
const zones = new ObjectManager({
name: 'zones',
api: {
- url: "/zones",
+ url: '/zones'
},
transform: [
(object) => {
@@ -47,18 +47,18 @@ const zones = new ObjectManager({
// })
object.map((el) => {
- el.icon = getIcon(el.type) || "mdi-help-circle";
+ el.icon = getIcon(el.type) || 'mdi-help-circle'
- el.isActivity = el.type === "ACTIVITY";
+ el.isActivity = el.type === 'ACTIVITY'
return el
- });
+ })
return object
}
],
validator: commons.defaultValidator,
ttl: 1000 * 60 * 60 * 1, // 1 hour
ajaxHooks: commons.defaultAjaxHooks
-});
+})
-export default zones
\ No newline at end of file
+export default zones
diff --git a/src/models/probe/probeevents.js b/src/models/probe/probeevents.js
index 3ab0c30e..1c701e70 100644
--- a/src/models/probe/probeevents.js
+++ b/src/models/probe/probeevents.js
@@ -1,22 +1,21 @@
-/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
-"use strict";
+/* eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars */
+'use strict'
-var $protobuf = require("protobufjs/minimal");
+var $protobuf = require('protobufjs/minimal')
// Common aliases
-var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
+var $Reader = $protobuf.Reader; var $Writer = $protobuf.Writer; var $util = $protobuf.util
// Exported root namespace
-var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
-
-$root.PenguinProbe = (function() {
+var $root = $protobuf.roots.default || ($protobuf.roots.default = {})
+$root.PenguinProbe = (function () {
/**
* Namespace PenguinProbe.
* @exports PenguinProbe
* @namespace
*/
- var PenguinProbe = {};
+ var PenguinProbe = {}
/**
* Language enum.
@@ -28,15 +27,15 @@ $root.PenguinProbe = (function() {
* @property {number} KO_KR=3 KO_KR value
* @property {number} OTHER=4 OTHER value
*/
- PenguinProbe.Language = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "ZH_CN"] = 0;
- values[valuesById[1] = "EN_US"] = 1;
- values[valuesById[2] = "JA_JP"] = 2;
- values[valuesById[3] = "KO_KR"] = 3;
- values[valuesById[4] = "OTHER"] = 4;
- return values;
- })();
+ PenguinProbe.Language = (function () {
+ var valuesById = {}; var values = Object.create(valuesById)
+ values[valuesById[0] = 'ZH_CN'] = 0
+ values[valuesById[1] = 'EN_US'] = 1
+ values[valuesById[2] = 'JA_JP'] = 2
+ values[valuesById[3] = 'KO_KR'] = 3
+ values[valuesById[4] = 'OTHER'] = 4
+ return values
+ })()
/**
* Server enum.
@@ -47,14 +46,14 @@ $root.PenguinProbe = (function() {
* @property {number} JP=2 JP value
* @property {number} KR=3 KR value
*/
- PenguinProbe.Server = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "CN"] = 0;
- values[valuesById[1] = "US"] = 1;
- values[valuesById[2] = "JP"] = 2;
- values[valuesById[3] = "KR"] = 3;
- return values;
- })();
+ PenguinProbe.Server = (function () {
+ var valuesById = {}; var values = Object.create(valuesById)
+ values[valuesById[0] = 'CN'] = 0
+ values[valuesById[1] = 'US'] = 1
+ values[valuesById[2] = 'JP'] = 2
+ values[valuesById[3] = 'KR'] = 3
+ return values
+ })()
/**
* MessageType enum.
@@ -66,18 +65,17 @@ $root.PenguinProbe = (function() {
* @property {number} EXECUTED_ADVANCED_QUERY=3 EXECUTED_ADVANCED_QUERY value
* @property {number} SERVER_ACK=64 SERVER_ACK value
*/
- PenguinProbe.MessageType = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "UNKNOWN"] = 0;
- values[valuesById[1] = "NAVIGATED"] = 1;
- values[valuesById[2] = "ENTERED_SEARCH_RESULT"] = 2;
- values[valuesById[3] = "EXECUTED_ADVANCED_QUERY"] = 3;
- values[valuesById[64] = "SERVER_ACK"] = 64;
- return values;
- })();
-
- PenguinProbe.Meta = (function() {
-
+ PenguinProbe.MessageType = (function () {
+ var valuesById = {}; var values = Object.create(valuesById)
+ values[valuesById[0] = 'UNKNOWN'] = 0
+ values[valuesById[1] = 'NAVIGATED'] = 1
+ values[valuesById[2] = 'ENTERED_SEARCH_RESULT'] = 2
+ values[valuesById[3] = 'EXECUTED_ADVANCED_QUERY'] = 3
+ values[valuesById[64] = 'SERVER_ACK'] = 64
+ return values
+ })()
+
+ PenguinProbe.Meta = (function () {
/**
* Properties of a Meta.
* @memberof PenguinProbe
@@ -94,11 +92,12 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.IMeta=} [properties] Properties to set
*/
- function Meta(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function Meta (properties) {
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -107,7 +106,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.Meta
* @instance
*/
- Meta.prototype.type = 0;
+ Meta.prototype.type = 0
/**
* Meta language.
@@ -115,7 +114,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.Meta
* @instance
*/
- Meta.prototype.language = 0;
+ Meta.prototype.language = 0
/**
* Creates a new Meta instance using the specified properties.
@@ -125,9 +124,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.IMeta=} [properties] Properties to set
* @returns {PenguinProbe.Meta} Meta instance
*/
- Meta.create = function create(properties) {
- return new Meta(properties);
- };
+ Meta.create = function create (properties) {
+ return new Meta(properties)
+ }
/**
* Encodes the specified Meta message. Does not implicitly {@link PenguinProbe.Meta.verify|verify} messages.
@@ -138,15 +137,12 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Meta.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
- if (message.language != null && Object.hasOwnProperty.call(message, "language"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.language);
- return writer;
- };
+ Meta.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.type != null && Object.hasOwnProperty.call(message, 'type')) { writer.uint32(/* id 1, wireType 0 = */8).int32(message.type) }
+ if (message.language != null && Object.hasOwnProperty.call(message, 'language')) { writer.uint32(/* id 2, wireType 0 = */16).int32(message.language) }
+ return writer
+ }
/**
* Encodes the specified Meta message, length delimited. Does not implicitly {@link PenguinProbe.Meta.verify|verify} messages.
@@ -157,9 +153,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Meta.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ Meta.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes a Meta message from the specified reader or buffer.
@@ -172,26 +168,25 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Meta.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.Meta();
+ Meta.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.Meta()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.type = reader.int32();
- break;
+ message.type = reader.int32()
+ break
case 2:
- message.language = reader.int32();
- break;
+ message.language = reader.int32()
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes a Meta message from the specified reader or buffer, length delimited.
@@ -203,11 +198,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Meta.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ Meta.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies a Meta message.
@@ -217,33 +211,34 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Meta.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.type != null && message.hasOwnProperty("type"))
+ Meta.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ if (message.type != null && message.hasOwnProperty('type')) {
switch (message.type) {
default:
- return "type: enum value expected";
+ return 'type: enum value expected'
case 0:
case 1:
case 2:
case 3:
case 64:
- break;
+ break
}
- if (message.language != null && message.hasOwnProperty("language"))
+ }
+ if (message.language != null && message.hasOwnProperty('language')) {
switch (message.language) {
default:
- return "language: enum value expected";
+ return 'language: enum value expected'
case 0:
case 1:
case 2:
case 3:
case 4:
- break;
+ break
}
- return null;
- };
+ }
+ return null
+ }
/**
* Creates a Meta message from a plain object. Also converts values to their respective internal types.
@@ -253,56 +248,55 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.Meta} Meta
*/
- Meta.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.Meta)
- return object;
- var message = new $root.PenguinProbe.Meta();
+ Meta.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.Meta) { return object }
+ var message = new $root.PenguinProbe.Meta()
switch (object.type) {
- case "UNKNOWN":
+ case 'UNKNOWN':
case 0:
- message.type = 0;
- break;
- case "NAVIGATED":
+ message.type = 0
+ break
+ case 'NAVIGATED':
case 1:
- message.type = 1;
- break;
- case "ENTERED_SEARCH_RESULT":
+ message.type = 1
+ break
+ case 'ENTERED_SEARCH_RESULT':
case 2:
- message.type = 2;
- break;
- case "EXECUTED_ADVANCED_QUERY":
+ message.type = 2
+ break
+ case 'EXECUTED_ADVANCED_QUERY':
case 3:
- message.type = 3;
- break;
- case "SERVER_ACK":
+ message.type = 3
+ break
+ case 'SERVER_ACK':
case 64:
- message.type = 64;
- break;
+ message.type = 64
+ break
}
switch (object.language) {
- case "ZH_CN":
+ case 'ZH_CN':
case 0:
- message.language = 0;
- break;
- case "EN_US":
+ message.language = 0
+ break
+ case 'EN_US':
case 1:
- message.language = 1;
- break;
- case "JA_JP":
+ message.language = 1
+ break
+ case 'JA_JP':
case 2:
- message.language = 2;
- break;
- case "KO_KR":
+ message.language = 2
+ break
+ case 'KO_KR':
case 3:
- message.language = 3;
- break;
- case "OTHER":
+ message.language = 3
+ break
+ case 'OTHER':
case 4:
- message.language = 4;
- break;
+ message.language = 4
+ break
}
- return message;
- };
+ return message
+ }
/**
* Creates a plain object from a Meta message. Also converts values to other types if specified.
@@ -313,20 +307,17 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Meta.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
+ Meta.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
if (options.defaults) {
- object.type = options.enums === String ? "UNKNOWN" : 0;
- object.language = options.enums === String ? "ZH_CN" : 0;
+ object.type = options.enums === String ? 'UNKNOWN' : 0
+ object.language = options.enums === String ? 'ZH_CN' : 0
}
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = options.enums === String ? $root.PenguinProbe.MessageType[message.type] : message.type;
- if (message.language != null && message.hasOwnProperty("language"))
- object.language = options.enums === String ? $root.PenguinProbe.Language[message.language] : message.language;
- return object;
- };
+ if (message.type != null && message.hasOwnProperty('type')) { object.type = options.enums === String ? $root.PenguinProbe.MessageType[message.type] : message.type }
+ if (message.language != null && message.hasOwnProperty('language')) { object.language = options.enums === String ? $root.PenguinProbe.Language[message.language] : message.language }
+ return object
+ }
/**
* Converts this Meta to JSON.
@@ -335,15 +326,14 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- Meta.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return Meta;
- })();
+ Meta.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
- PenguinProbe.Skeleton = (function() {
+ return Meta
+ })()
+ PenguinProbe.Skeleton = (function () {
/**
* Properties of a Skeleton.
* @memberof PenguinProbe
@@ -359,11 +349,12 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.ISkeleton=} [properties] Properties to set
*/
- function Skeleton(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function Skeleton (properties) {
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -372,7 +363,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.Skeleton
* @instance
*/
- Skeleton.prototype.meta = null;
+ Skeleton.prototype.meta = null
/**
* Creates a new Skeleton instance using the specified properties.
@@ -382,9 +373,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.ISkeleton=} [properties] Properties to set
* @returns {PenguinProbe.Skeleton} Skeleton instance
*/
- Skeleton.create = function create(properties) {
- return new Skeleton(properties);
- };
+ Skeleton.create = function create (properties) {
+ return new Skeleton(properties)
+ }
/**
* Encodes the specified Skeleton message. Does not implicitly {@link PenguinProbe.Skeleton.verify|verify} messages.
@@ -395,13 +386,11 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Skeleton.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.meta != null && Object.hasOwnProperty.call(message, "meta"))
- $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- return writer;
- };
+ Skeleton.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.meta != null && Object.hasOwnProperty.call(message, 'meta')) { $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 = */10).fork()).ldelim() }
+ return writer
+ }
/**
* Encodes the specified Skeleton message, length delimited. Does not implicitly {@link PenguinProbe.Skeleton.verify|verify} messages.
@@ -412,9 +401,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Skeleton.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ Skeleton.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes a Skeleton message from the specified reader or buffer.
@@ -427,23 +416,22 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Skeleton.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.Skeleton();
+ Skeleton.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.Skeleton()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32());
- break;
+ message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32())
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes a Skeleton message from the specified reader or buffer, length delimited.
@@ -455,11 +443,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Skeleton.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ Skeleton.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies a Skeleton message.
@@ -469,16 +456,14 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Skeleton.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.meta != null && message.hasOwnProperty("meta")) {
- var error = $root.PenguinProbe.Meta.verify(message.meta);
- if (error)
- return "meta." + error;
+ Skeleton.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ if (message.meta != null && message.hasOwnProperty('meta')) {
+ var error = $root.PenguinProbe.Meta.verify(message.meta)
+ if (error) { return 'meta.' + error }
}
- return null;
- };
+ return null
+ }
/**
* Creates a Skeleton message from a plain object. Also converts values to their respective internal types.
@@ -488,17 +473,15 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.Skeleton} Skeleton
*/
- Skeleton.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.Skeleton)
- return object;
- var message = new $root.PenguinProbe.Skeleton();
+ Skeleton.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.Skeleton) { return object }
+ var message = new $root.PenguinProbe.Skeleton()
if (object.meta != null) {
- if (typeof object.meta !== "object")
- throw TypeError(".PenguinProbe.Skeleton.meta: object expected");
- message.meta = $root.PenguinProbe.Meta.fromObject(object.meta);
+ if (typeof object.meta !== 'object') { throw TypeError('.PenguinProbe.Skeleton.meta: object expected') }
+ message.meta = $root.PenguinProbe.Meta.fromObject(object.meta)
}
- return message;
- };
+ return message
+ }
/**
* Creates a plain object from a Skeleton message. Also converts values to other types if specified.
@@ -509,16 +492,13 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Skeleton.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.meta = null;
- if (message.meta != null && message.hasOwnProperty("meta"))
- object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options);
- return object;
- };
+ Skeleton.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
+ if (options.defaults) { object.meta = null }
+ if (message.meta != null && message.hasOwnProperty('meta')) { object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options) }
+ return object
+ }
/**
* Converts this Skeleton to JSON.
@@ -527,15 +507,14 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- Skeleton.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return Skeleton;
- })();
+ Skeleton.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
- PenguinProbe.EnteredSearchResult = (function() {
+ return Skeleton
+ })()
+ PenguinProbe.EnteredSearchResult = (function () {
/**
* Properties of an EnteredSearchResult.
* @memberof PenguinProbe
@@ -555,11 +534,12 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.IEnteredSearchResult=} [properties] Properties to set
*/
- function EnteredSearchResult(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function EnteredSearchResult (properties) {
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -568,7 +548,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.EnteredSearchResult
* @instance
*/
- EnteredSearchResult.prototype.meta = null;
+ EnteredSearchResult.prototype.meta = null
/**
* EnteredSearchResult stageId.
@@ -576,7 +556,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.EnteredSearchResult
* @instance
*/
- EnteredSearchResult.prototype.stageId = "";
+ EnteredSearchResult.prototype.stageId = ''
/**
* EnteredSearchResult itemId.
@@ -584,7 +564,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.EnteredSearchResult
* @instance
*/
- EnteredSearchResult.prototype.itemId = "";
+ EnteredSearchResult.prototype.itemId = ''
/**
* EnteredSearchResult query.
@@ -592,7 +572,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.EnteredSearchResult
* @instance
*/
- EnteredSearchResult.prototype.query = "";
+ EnteredSearchResult.prototype.query = ''
/**
* EnteredSearchResult position.
@@ -600,10 +580,10 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.EnteredSearchResult
* @instance
*/
- EnteredSearchResult.prototype.position = 0;
+ EnteredSearchResult.prototype.position = 0
// OneOf field names bound to virtual getters and setters
- var $oneOfFields;
+ var $oneOfFields
/**
* EnteredSearchResult id.
@@ -611,10 +591,10 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.EnteredSearchResult
* @instance
*/
- Object.defineProperty(EnteredSearchResult.prototype, "id", {
- get: $util.oneOfGetter($oneOfFields = ["stageId", "itemId"]),
+ Object.defineProperty(EnteredSearchResult.prototype, 'id', {
+ get: $util.oneOfGetter($oneOfFields = ['stageId', 'itemId']),
set: $util.oneOfSetter($oneOfFields)
- });
+ })
/**
* Creates a new EnteredSearchResult instance using the specified properties.
@@ -624,9 +604,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.IEnteredSearchResult=} [properties] Properties to set
* @returns {PenguinProbe.EnteredSearchResult} EnteredSearchResult instance
*/
- EnteredSearchResult.create = function create(properties) {
- return new EnteredSearchResult(properties);
- };
+ EnteredSearchResult.create = function create (properties) {
+ return new EnteredSearchResult(properties)
+ }
/**
* Encodes the specified EnteredSearchResult message. Does not implicitly {@link PenguinProbe.EnteredSearchResult.verify|verify} messages.
@@ -637,21 +617,15 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- EnteredSearchResult.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.meta != null && Object.hasOwnProperty.call(message, "meta"))
- $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.stageId != null && Object.hasOwnProperty.call(message, "stageId"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.stageId);
- if (message.itemId != null && Object.hasOwnProperty.call(message, "itemId"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.itemId);
- if (message.query != null && Object.hasOwnProperty.call(message, "query"))
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.query);
- if (message.position != null && Object.hasOwnProperty.call(message, "position"))
- writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.position);
- return writer;
- };
+ EnteredSearchResult.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.meta != null && Object.hasOwnProperty.call(message, 'meta')) { $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 = */10).fork()).ldelim() }
+ if (message.stageId != null && Object.hasOwnProperty.call(message, 'stageId')) { writer.uint32(/* id 2, wireType 2 = */18).string(message.stageId) }
+ if (message.itemId != null && Object.hasOwnProperty.call(message, 'itemId')) { writer.uint32(/* id 3, wireType 2 = */26).string(message.itemId) }
+ if (message.query != null && Object.hasOwnProperty.call(message, 'query')) { writer.uint32(/* id 4, wireType 2 = */34).string(message.query) }
+ if (message.position != null && Object.hasOwnProperty.call(message, 'position')) { writer.uint32(/* id 5, wireType 0 = */40).uint32(message.position) }
+ return writer
+ }
/**
* Encodes the specified EnteredSearchResult message, length delimited. Does not implicitly {@link PenguinProbe.EnteredSearchResult.verify|verify} messages.
@@ -662,9 +636,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- EnteredSearchResult.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ EnteredSearchResult.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes an EnteredSearchResult message from the specified reader or buffer.
@@ -677,35 +651,34 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- EnteredSearchResult.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.EnteredSearchResult();
+ EnteredSearchResult.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.EnteredSearchResult()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32());
- break;
+ message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32())
+ break
case 2:
- message.stageId = reader.string();
- break;
+ message.stageId = reader.string()
+ break
case 3:
- message.itemId = reader.string();
- break;
+ message.itemId = reader.string()
+ break
case 4:
- message.query = reader.string();
- break;
+ message.query = reader.string()
+ break
case 5:
- message.position = reader.uint32();
- break;
+ message.position = reader.uint32()
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes an EnteredSearchResult message from the specified reader or buffer, length delimited.
@@ -717,11 +690,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- EnteredSearchResult.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ EnteredSearchResult.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies an EnteredSearchResult message.
@@ -731,35 +703,30 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- EnteredSearchResult.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.meta != null && message.hasOwnProperty("meta")) {
- var error = $root.PenguinProbe.Meta.verify(message.meta);
- if (error)
- return "meta." + error;
+ EnteredSearchResult.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ var properties = {}
+ if (message.meta != null && message.hasOwnProperty('meta')) {
+ var error = $root.PenguinProbe.Meta.verify(message.meta)
+ if (error) { return 'meta.' + error }
+ }
+ if (message.stageId != null && message.hasOwnProperty('stageId')) {
+ properties.id = 1
+ if (!$util.isString(message.stageId)) { return 'stageId: string expected' }
+ }
+ if (message.itemId != null && message.hasOwnProperty('itemId')) {
+ if (properties.id === 1) { return 'id: multiple values' }
+ properties.id = 1
+ if (!$util.isString(message.itemId)) { return 'itemId: string expected' }
}
- if (message.stageId != null && message.hasOwnProperty("stageId")) {
- properties.id = 1;
- if (!$util.isString(message.stageId))
- return "stageId: string expected";
+ if (message.query != null && message.hasOwnProperty('query')) {
+ if (!$util.isString(message.query)) { return 'query: string expected' }
}
- if (message.itemId != null && message.hasOwnProperty("itemId")) {
- if (properties.id === 1)
- return "id: multiple values";
- properties.id = 1;
- if (!$util.isString(message.itemId))
- return "itemId: string expected";
+ if (message.position != null && message.hasOwnProperty('position')) {
+ if (!$util.isInteger(message.position)) { return 'position: integer expected' }
}
- if (message.query != null && message.hasOwnProperty("query"))
- if (!$util.isString(message.query))
- return "query: string expected";
- if (message.position != null && message.hasOwnProperty("position"))
- if (!$util.isInteger(message.position))
- return "position: integer expected";
- return null;
- };
+ return null
+ }
/**
* Creates an EnteredSearchResult message from a plain object. Also converts values to their respective internal types.
@@ -769,25 +736,19 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.EnteredSearchResult} EnteredSearchResult
*/
- EnteredSearchResult.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.EnteredSearchResult)
- return object;
- var message = new $root.PenguinProbe.EnteredSearchResult();
+ EnteredSearchResult.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.EnteredSearchResult) { return object }
+ var message = new $root.PenguinProbe.EnteredSearchResult()
if (object.meta != null) {
- if (typeof object.meta !== "object")
- throw TypeError(".PenguinProbe.EnteredSearchResult.meta: object expected");
- message.meta = $root.PenguinProbe.Meta.fromObject(object.meta);
+ if (typeof object.meta !== 'object') { throw TypeError('.PenguinProbe.EnteredSearchResult.meta: object expected') }
+ message.meta = $root.PenguinProbe.Meta.fromObject(object.meta)
}
- if (object.stageId != null)
- message.stageId = String(object.stageId);
- if (object.itemId != null)
- message.itemId = String(object.itemId);
- if (object.query != null)
- message.query = String(object.query);
- if (object.position != null)
- message.position = object.position >>> 0;
- return message;
- };
+ if (object.stageId != null) { message.stageId = String(object.stageId) }
+ if (object.itemId != null) { message.itemId = String(object.itemId) }
+ if (object.query != null) { message.query = String(object.query) }
+ if (object.position != null) { message.position = object.position >>> 0 }
+ return message
+ }
/**
* Creates a plain object from an EnteredSearchResult message. Also converts values to other types if specified.
@@ -798,33 +759,27 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- EnteredSearchResult.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
+ EnteredSearchResult.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
if (options.defaults) {
- object.meta = null;
- object.query = "";
- object.position = 0;
+ object.meta = null
+ object.query = ''
+ object.position = 0
}
- if (message.meta != null && message.hasOwnProperty("meta"))
- object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options);
- if (message.stageId != null && message.hasOwnProperty("stageId")) {
- object.stageId = message.stageId;
- if (options.oneofs)
- object.id = "stageId";
+ if (message.meta != null && message.hasOwnProperty('meta')) { object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options) }
+ if (message.stageId != null && message.hasOwnProperty('stageId')) {
+ object.stageId = message.stageId
+ if (options.oneofs) { object.id = 'stageId' }
}
- if (message.itemId != null && message.hasOwnProperty("itemId")) {
- object.itemId = message.itemId;
- if (options.oneofs)
- object.id = "itemId";
+ if (message.itemId != null && message.hasOwnProperty('itemId')) {
+ object.itemId = message.itemId
+ if (options.oneofs) { object.id = 'itemId' }
}
- if (message.query != null && message.hasOwnProperty("query"))
- object.query = message.query;
- if (message.position != null && message.hasOwnProperty("position"))
- object.position = message.position;
- return object;
- };
+ if (message.query != null && message.hasOwnProperty('query')) { object.query = message.query }
+ if (message.position != null && message.hasOwnProperty('position')) { object.position = message.position }
+ return object
+ }
/**
* Converts this EnteredSearchResult to JSON.
@@ -833,15 +788,14 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- EnteredSearchResult.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return EnteredSearchResult;
- })();
+ EnteredSearchResult.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
- PenguinProbe.ExecutedAdvancedQuery = (function() {
+ return EnteredSearchResult
+ })()
+ PenguinProbe.ExecutedAdvancedQuery = (function () {
/**
* Properties of an ExecutedAdvancedQuery.
* @memberof PenguinProbe
@@ -858,12 +812,13 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.IExecutedAdvancedQuery=} [properties] Properties to set
*/
- function ExecutedAdvancedQuery(properties) {
- this.queries = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function ExecutedAdvancedQuery (properties) {
+ this.queries = []
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -872,7 +827,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery
* @instance
*/
- ExecutedAdvancedQuery.prototype.meta = null;
+ ExecutedAdvancedQuery.prototype.meta = null
/**
* ExecutedAdvancedQuery queries.
@@ -880,7 +835,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery
* @instance
*/
- ExecutedAdvancedQuery.prototype.queries = $util.emptyArray;
+ ExecutedAdvancedQuery.prototype.queries = $util.emptyArray
/**
* Creates a new ExecutedAdvancedQuery instance using the specified properties.
@@ -890,9 +845,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.IExecutedAdvancedQuery=} [properties] Properties to set
* @returns {PenguinProbe.ExecutedAdvancedQuery} ExecutedAdvancedQuery instance
*/
- ExecutedAdvancedQuery.create = function create(properties) {
- return new ExecutedAdvancedQuery(properties);
- };
+ ExecutedAdvancedQuery.create = function create (properties) {
+ return new ExecutedAdvancedQuery(properties)
+ }
/**
* Encodes the specified ExecutedAdvancedQuery message. Does not implicitly {@link PenguinProbe.ExecutedAdvancedQuery.verify|verify} messages.
@@ -903,16 +858,14 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ExecutedAdvancedQuery.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.meta != null && Object.hasOwnProperty.call(message, "meta"))
- $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.queries != null && message.queries.length)
- for (var i = 0; i < message.queries.length; ++i)
- $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.encode(message.queries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- return writer;
- };
+ ExecutedAdvancedQuery.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.meta != null && Object.hasOwnProperty.call(message, 'meta')) { $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 = */10).fork()).ldelim() }
+ if (message.queries != null && message.queries.length) {
+ for (var i = 0; i < message.queries.length; ++i) { $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.encode(message.queries[i], writer.uint32(/* id 2, wireType 2 = */18).fork()).ldelim() }
+ }
+ return writer
+ }
/**
* Encodes the specified ExecutedAdvancedQuery message, length delimited. Does not implicitly {@link PenguinProbe.ExecutedAdvancedQuery.verify|verify} messages.
@@ -923,9 +876,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ExecutedAdvancedQuery.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ ExecutedAdvancedQuery.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes an ExecutedAdvancedQuery message from the specified reader or buffer.
@@ -938,28 +891,26 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ExecutedAdvancedQuery.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.ExecutedAdvancedQuery();
+ ExecutedAdvancedQuery.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.ExecutedAdvancedQuery()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32());
- break;
+ message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32())
+ break
case 2:
- if (!(message.queries && message.queries.length))
- message.queries = [];
- message.queries.push($root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.decode(reader, reader.uint32()));
- break;
+ if (!(message.queries && message.queries.length)) { message.queries = [] }
+ message.queries.push($root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.decode(reader, reader.uint32()))
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes an ExecutedAdvancedQuery message from the specified reader or buffer, length delimited.
@@ -971,11 +922,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ExecutedAdvancedQuery.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ ExecutedAdvancedQuery.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies an ExecutedAdvancedQuery message.
@@ -985,25 +935,21 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- ExecutedAdvancedQuery.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.meta != null && message.hasOwnProperty("meta")) {
- var error = $root.PenguinProbe.Meta.verify(message.meta);
- if (error)
- return "meta." + error;
+ ExecutedAdvancedQuery.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ if (message.meta != null && message.hasOwnProperty('meta')) {
+ var error = $root.PenguinProbe.Meta.verify(message.meta)
+ if (error) { return 'meta.' + error }
}
- if (message.queries != null && message.hasOwnProperty("queries")) {
- if (!Array.isArray(message.queries))
- return "queries: array expected";
+ if (message.queries != null && message.hasOwnProperty('queries')) {
+ if (!Array.isArray(message.queries)) { return 'queries: array expected' }
for (var i = 0; i < message.queries.length; ++i) {
- var error = $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.verify(message.queries[i]);
- if (error)
- return "queries." + error;
+ var error = $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.verify(message.queries[i])
+ if (error) { return 'queries.' + error }
}
}
- return null;
- };
+ return null
+ }
/**
* Creates an ExecutedAdvancedQuery message from a plain object. Also converts values to their respective internal types.
@@ -1013,27 +959,23 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.ExecutedAdvancedQuery} ExecutedAdvancedQuery
*/
- ExecutedAdvancedQuery.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.ExecutedAdvancedQuery)
- return object;
- var message = new $root.PenguinProbe.ExecutedAdvancedQuery();
+ ExecutedAdvancedQuery.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.ExecutedAdvancedQuery) { return object }
+ var message = new $root.PenguinProbe.ExecutedAdvancedQuery()
if (object.meta != null) {
- if (typeof object.meta !== "object")
- throw TypeError(".PenguinProbe.ExecutedAdvancedQuery.meta: object expected");
- message.meta = $root.PenguinProbe.Meta.fromObject(object.meta);
+ if (typeof object.meta !== 'object') { throw TypeError('.PenguinProbe.ExecutedAdvancedQuery.meta: object expected') }
+ message.meta = $root.PenguinProbe.Meta.fromObject(object.meta)
}
if (object.queries) {
- if (!Array.isArray(object.queries))
- throw TypeError(".PenguinProbe.ExecutedAdvancedQuery.queries: array expected");
- message.queries = [];
+ if (!Array.isArray(object.queries)) { throw TypeError('.PenguinProbe.ExecutedAdvancedQuery.queries: array expected') }
+ message.queries = []
for (var i = 0; i < object.queries.length; ++i) {
- if (typeof object.queries[i] !== "object")
- throw TypeError(".PenguinProbe.ExecutedAdvancedQuery.queries: object expected");
- message.queries[i] = $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.fromObject(object.queries[i]);
+ if (typeof object.queries[i] !== 'object') { throw TypeError('.PenguinProbe.ExecutedAdvancedQuery.queries: object expected') }
+ message.queries[i] = $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.fromObject(object.queries[i])
}
}
- return message;
- };
+ return message
+ }
/**
* Creates a plain object from an ExecutedAdvancedQuery message. Also converts values to other types if specified.
@@ -1044,23 +986,18 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- ExecutedAdvancedQuery.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.queries = [];
- if (options.defaults)
- object.meta = null;
- if (message.meta != null && message.hasOwnProperty("meta"))
- object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options);
+ ExecutedAdvancedQuery.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
+ if (options.arrays || options.defaults) { object.queries = [] }
+ if (options.defaults) { object.meta = null }
+ if (message.meta != null && message.hasOwnProperty('meta')) { object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options) }
if (message.queries && message.queries.length) {
- object.queries = [];
- for (var j = 0; j < message.queries.length; ++j)
- object.queries[j] = $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.toObject(message.queries[j], options);
+ object.queries = []
+ for (var j = 0; j < message.queries.length; ++j) { object.queries[j] = $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.toObject(message.queries[j], options) }
}
- return object;
- };
+ return object
+ }
/**
* Converts this ExecutedAdvancedQuery to JSON.
@@ -1069,12 +1006,11 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- ExecutedAdvancedQuery.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- ExecutedAdvancedQuery.AdvancedQuery = (function() {
+ ExecutedAdvancedQuery.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
+ ExecutedAdvancedQuery.AdvancedQuery = (function () {
/**
* Properties of an AdvancedQuery.
* @memberof PenguinProbe.ExecutedAdvancedQuery
@@ -1096,12 +1032,13 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.ExecutedAdvancedQuery.IAdvancedQuery=} [properties] Properties to set
*/
- function AdvancedQuery(properties) {
- this.itemIds = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function AdvancedQuery (properties) {
+ this.itemIds = []
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -1110,7 +1047,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.stageId = "";
+ AdvancedQuery.prototype.stageId = ''
/**
* AdvancedQuery itemIds.
@@ -1118,7 +1055,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.itemIds = $util.emptyArray;
+ AdvancedQuery.prototype.itemIds = $util.emptyArray
/**
* AdvancedQuery server.
@@ -1126,7 +1063,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.server = 0;
+ AdvancedQuery.prototype.server = 0
/**
* AdvancedQuery isPersonal.
@@ -1134,7 +1071,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.isPersonal = false;
+ AdvancedQuery.prototype.isPersonal = false
/**
* AdvancedQuery start.
@@ -1142,7 +1079,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.start = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
+ AdvancedQuery.prototype.start = $util.Long ? $util.Long.fromBits(0, 0, true) : 0
/**
* AdvancedQuery end.
@@ -1150,7 +1087,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.end = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
+ AdvancedQuery.prototype.end = $util.Long ? $util.Long.fromBits(0, 0, true) : 0
/**
* AdvancedQuery interval.
@@ -1158,7 +1095,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery
* @instance
*/
- AdvancedQuery.prototype.interval = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
+ AdvancedQuery.prototype.interval = $util.Long ? $util.Long.fromBits(0, 0, true) : 0
/**
* Creates a new AdvancedQuery instance using the specified properties.
@@ -1168,9 +1105,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.ExecutedAdvancedQuery.IAdvancedQuery=} [properties] Properties to set
* @returns {PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery} AdvancedQuery instance
*/
- AdvancedQuery.create = function create(properties) {
- return new AdvancedQuery(properties);
- };
+ AdvancedQuery.create = function create (properties) {
+ return new AdvancedQuery(properties)
+ }
/**
* Encodes the specified AdvancedQuery message. Does not implicitly {@link PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.verify|verify} messages.
@@ -1181,26 +1118,19 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- AdvancedQuery.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.stageId != null && Object.hasOwnProperty.call(message, "stageId"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.stageId);
- if (message.itemIds != null && message.itemIds.length)
- for (var i = 0; i < message.itemIds.length; ++i)
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemIds[i]);
- if (message.server != null && Object.hasOwnProperty.call(message, "server"))
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.server);
- if (message.isPersonal != null && Object.hasOwnProperty.call(message, "isPersonal"))
- writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isPersonal);
- if (message.start != null && Object.hasOwnProperty.call(message, "start"))
- writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.start);
- if (message.end != null && Object.hasOwnProperty.call(message, "end"))
- writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.end);
- if (message.interval != null && Object.hasOwnProperty.call(message, "interval"))
- writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.interval);
- return writer;
- };
+ AdvancedQuery.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.stageId != null && Object.hasOwnProperty.call(message, 'stageId')) { writer.uint32(/* id 1, wireType 2 = */10).string(message.stageId) }
+ if (message.itemIds != null && message.itemIds.length) {
+ for (var i = 0; i < message.itemIds.length; ++i) { writer.uint32(/* id 2, wireType 2 = */18).string(message.itemIds[i]) }
+ }
+ if (message.server != null && Object.hasOwnProperty.call(message, 'server')) { writer.uint32(/* id 3, wireType 0 = */24).int32(message.server) }
+ if (message.isPersonal != null && Object.hasOwnProperty.call(message, 'isPersonal')) { writer.uint32(/* id 4, wireType 0 = */32).bool(message.isPersonal) }
+ if (message.start != null && Object.hasOwnProperty.call(message, 'start')) { writer.uint32(/* id 5, wireType 0 = */40).uint64(message.start) }
+ if (message.end != null && Object.hasOwnProperty.call(message, 'end')) { writer.uint32(/* id 6, wireType 0 = */48).uint64(message.end) }
+ if (message.interval != null && Object.hasOwnProperty.call(message, 'interval')) { writer.uint32(/* id 7, wireType 0 = */56).uint64(message.interval) }
+ return writer
+ }
/**
* Encodes the specified AdvancedQuery message, length delimited. Does not implicitly {@link PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.verify|verify} messages.
@@ -1211,9 +1141,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- AdvancedQuery.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ AdvancedQuery.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes an AdvancedQuery message from the specified reader or buffer.
@@ -1226,43 +1156,41 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- AdvancedQuery.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery();
+ AdvancedQuery.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.stageId = reader.string();
- break;
+ message.stageId = reader.string()
+ break
case 2:
- if (!(message.itemIds && message.itemIds.length))
- message.itemIds = [];
- message.itemIds.push(reader.string());
- break;
+ if (!(message.itemIds && message.itemIds.length)) { message.itemIds = [] }
+ message.itemIds.push(reader.string())
+ break
case 3:
- message.server = reader.int32();
- break;
+ message.server = reader.int32()
+ break
case 4:
- message.isPersonal = reader.bool();
- break;
+ message.isPersonal = reader.bool()
+ break
case 5:
- message.start = reader.uint64();
- break;
+ message.start = reader.uint64()
+ break
case 6:
- message.end = reader.uint64();
- break;
+ message.end = reader.uint64()
+ break
case 7:
- message.interval = reader.uint64();
- break;
+ message.interval = reader.uint64()
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes an AdvancedQuery message from the specified reader or buffer, length delimited.
@@ -1274,11 +1202,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- AdvancedQuery.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ AdvancedQuery.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies an AdvancedQuery message.
@@ -1288,43 +1215,42 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- AdvancedQuery.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.stageId != null && message.hasOwnProperty("stageId"))
- if (!$util.isString(message.stageId))
- return "stageId: string expected";
- if (message.itemIds != null && message.hasOwnProperty("itemIds")) {
- if (!Array.isArray(message.itemIds))
- return "itemIds: array expected";
- for (var i = 0; i < message.itemIds.length; ++i)
- if (!$util.isString(message.itemIds[i]))
- return "itemIds: string[] expected";
+ AdvancedQuery.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ if (message.stageId != null && message.hasOwnProperty('stageId')) {
+ if (!$util.isString(message.stageId)) { return 'stageId: string expected' }
}
- if (message.server != null && message.hasOwnProperty("server"))
+ if (message.itemIds != null && message.hasOwnProperty('itemIds')) {
+ if (!Array.isArray(message.itemIds)) { return 'itemIds: array expected' }
+ for (var i = 0; i < message.itemIds.length; ++i) {
+ if (!$util.isString(message.itemIds[i])) { return 'itemIds: string[] expected' }
+ }
+ }
+ if (message.server != null && message.hasOwnProperty('server')) {
switch (message.server) {
default:
- return "server: enum value expected";
+ return 'server: enum value expected'
case 0:
case 1:
case 2:
case 3:
- break;
+ break
}
- if (message.isPersonal != null && message.hasOwnProperty("isPersonal"))
- if (typeof message.isPersonal !== "boolean")
- return "isPersonal: boolean expected";
- if (message.start != null && message.hasOwnProperty("start"))
- if (!$util.isInteger(message.start) && !(message.start && $util.isInteger(message.start.low) && $util.isInteger(message.start.high)))
- return "start: integer|Long expected";
- if (message.end != null && message.hasOwnProperty("end"))
- if (!$util.isInteger(message.end) && !(message.end && $util.isInteger(message.end.low) && $util.isInteger(message.end.high)))
- return "end: integer|Long expected";
- if (message.interval != null && message.hasOwnProperty("interval"))
- if (!$util.isInteger(message.interval) && !(message.interval && $util.isInteger(message.interval.low) && $util.isInteger(message.interval.high)))
- return "interval: integer|Long expected";
- return null;
- };
+ }
+ if (message.isPersonal != null && message.hasOwnProperty('isPersonal')) {
+ if (typeof message.isPersonal !== 'boolean') { return 'isPersonal: boolean expected' }
+ }
+ if (message.start != null && message.hasOwnProperty('start')) {
+ if (!$util.isInteger(message.start) && !(message.start && $util.isInteger(message.start.low) && $util.isInteger(message.start.high))) { return 'start: integer|Long expected' }
+ }
+ if (message.end != null && message.hasOwnProperty('end')) {
+ if (!$util.isInteger(message.end) && !(message.end && $util.isInteger(message.end.low) && $util.isInteger(message.end.high))) { return 'end: integer|Long expected' }
+ }
+ if (message.interval != null && message.hasOwnProperty('interval')) {
+ if (!$util.isInteger(message.interval) && !(message.interval && $util.isInteger(message.interval.low) && $util.isInteger(message.interval.high))) { return 'interval: integer|Long expected' }
+ }
+ return null
+ }
/**
* Creates an AdvancedQuery message from a plain object. Also converts values to their respective internal types.
@@ -1334,68 +1260,45 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery} AdvancedQuery
*/
- AdvancedQuery.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery)
- return object;
- var message = new $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery();
- if (object.stageId != null)
- message.stageId = String(object.stageId);
+ AdvancedQuery.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery) { return object }
+ var message = new $root.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery()
+ if (object.stageId != null) { message.stageId = String(object.stageId) }
if (object.itemIds) {
- if (!Array.isArray(object.itemIds))
- throw TypeError(".PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.itemIds: array expected");
- message.itemIds = [];
- for (var i = 0; i < object.itemIds.length; ++i)
- message.itemIds[i] = String(object.itemIds[i]);
+ if (!Array.isArray(object.itemIds)) { throw TypeError('.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.itemIds: array expected') }
+ message.itemIds = []
+ for (var i = 0; i < object.itemIds.length; ++i) { message.itemIds[i] = String(object.itemIds[i]) }
}
switch (object.server) {
- case "CN":
+ case 'CN':
case 0:
- message.server = 0;
- break;
- case "US":
+ message.server = 0
+ break
+ case 'US':
case 1:
- message.server = 1;
- break;
- case "JP":
+ message.server = 1
+ break
+ case 'JP':
case 2:
- message.server = 2;
- break;
- case "KR":
+ message.server = 2
+ break
+ case 'KR':
case 3:
- message.server = 3;
- break;
+ message.server = 3
+ break
+ }
+ if (object.isPersonal != null) { message.isPersonal = Boolean(object.isPersonal) }
+ if (object.start != null) {
+ if ($util.Long) { (message.start = $util.Long.fromValue(object.start)).unsigned = true } else if (typeof object.start === 'string') { message.start = parseInt(object.start, 10) } else if (typeof object.start === 'number') { message.start = object.start } else if (typeof object.start === 'object') { message.start = new $util.LongBits(object.start.low >>> 0, object.start.high >>> 0).toNumber(true) }
+ }
+ if (object.end != null) {
+ if ($util.Long) { (message.end = $util.Long.fromValue(object.end)).unsigned = true } else if (typeof object.end === 'string') { message.end = parseInt(object.end, 10) } else if (typeof object.end === 'number') { message.end = object.end } else if (typeof object.end === 'object') { message.end = new $util.LongBits(object.end.low >>> 0, object.end.high >>> 0).toNumber(true) }
+ }
+ if (object.interval != null) {
+ if ($util.Long) { (message.interval = $util.Long.fromValue(object.interval)).unsigned = true } else if (typeof object.interval === 'string') { message.interval = parseInt(object.interval, 10) } else if (typeof object.interval === 'number') { message.interval = object.interval } else if (typeof object.interval === 'object') { message.interval = new $util.LongBits(object.interval.low >>> 0, object.interval.high >>> 0).toNumber(true) }
}
- if (object.isPersonal != null)
- message.isPersonal = Boolean(object.isPersonal);
- if (object.start != null)
- if ($util.Long)
- (message.start = $util.Long.fromValue(object.start)).unsigned = true;
- else if (typeof object.start === "string")
- message.start = parseInt(object.start, 10);
- else if (typeof object.start === "number")
- message.start = object.start;
- else if (typeof object.start === "object")
- message.start = new $util.LongBits(object.start.low >>> 0, object.start.high >>> 0).toNumber(true);
- if (object.end != null)
- if ($util.Long)
- (message.end = $util.Long.fromValue(object.end)).unsigned = true;
- else if (typeof object.end === "string")
- message.end = parseInt(object.end, 10);
- else if (typeof object.end === "number")
- message.end = object.end;
- else if (typeof object.end === "object")
- message.end = new $util.LongBits(object.end.low >>> 0, object.end.high >>> 0).toNumber(true);
- if (object.interval != null)
- if ($util.Long)
- (message.interval = $util.Long.fromValue(object.interval)).unsigned = true;
- else if (typeof object.interval === "string")
- message.interval = parseInt(object.interval, 10);
- else if (typeof object.interval === "number")
- message.interval = object.interval;
- else if (typeof object.interval === "object")
- message.interval = new $util.LongBits(object.interval.low >>> 0, object.interval.high >>> 0).toNumber(true);
- return message;
- };
+ return message
+ }
/**
* Creates a plain object from an AdvancedQuery message. Also converts values to other types if specified.
@@ -1406,60 +1309,45 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- AdvancedQuery.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.itemIds = [];
+ AdvancedQuery.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
+ if (options.arrays || options.defaults) { object.itemIds = [] }
if (options.defaults) {
- object.stageId = "";
- object.server = options.enums === String ? "CN" : 0;
- object.isPersonal = false;
+ object.stageId = ''
+ object.server = options.enums === String ? 'CN' : 0
+ object.isPersonal = false
if ($util.Long) {
- var long = new $util.Long(0, 0, true);
- object.start = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.start = options.longs === String ? "0" : 0;
+ var long = new $util.Long(0, 0, true)
+ object.start = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long
+ } else { object.start = options.longs === String ? '0' : 0 }
if ($util.Long) {
- var long = new $util.Long(0, 0, true);
- object.end = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.end = options.longs === String ? "0" : 0;
+ var long = new $util.Long(0, 0, true)
+ object.end = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long
+ } else { object.end = options.longs === String ? '0' : 0 }
if ($util.Long) {
- var long = new $util.Long(0, 0, true);
- object.interval = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.interval = options.longs === String ? "0" : 0;
+ var long = new $util.Long(0, 0, true)
+ object.interval = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long
+ } else { object.interval = options.longs === String ? '0' : 0 }
}
- if (message.stageId != null && message.hasOwnProperty("stageId"))
- object.stageId = message.stageId;
+ if (message.stageId != null && message.hasOwnProperty('stageId')) { object.stageId = message.stageId }
if (message.itemIds && message.itemIds.length) {
- object.itemIds = [];
- for (var j = 0; j < message.itemIds.length; ++j)
- object.itemIds[j] = message.itemIds[j];
+ object.itemIds = []
+ for (var j = 0; j < message.itemIds.length; ++j) { object.itemIds[j] = message.itemIds[j] }
+ }
+ if (message.server != null && message.hasOwnProperty('server')) { object.server = options.enums === String ? $root.PenguinProbe.Server[message.server] : message.server }
+ if (message.isPersonal != null && message.hasOwnProperty('isPersonal')) { object.isPersonal = message.isPersonal }
+ if (message.start != null && message.hasOwnProperty('start')) {
+ if (typeof message.start === 'number') { object.start = options.longs === String ? String(message.start) : message.start } else { object.start = options.longs === String ? $util.Long.prototype.toString.call(message.start) : options.longs === Number ? new $util.LongBits(message.start.low >>> 0, message.start.high >>> 0).toNumber(true) : message.start }
+ }
+ if (message.end != null && message.hasOwnProperty('end')) {
+ if (typeof message.end === 'number') { object.end = options.longs === String ? String(message.end) : message.end } else { object.end = options.longs === String ? $util.Long.prototype.toString.call(message.end) : options.longs === Number ? new $util.LongBits(message.end.low >>> 0, message.end.high >>> 0).toNumber(true) : message.end }
}
- if (message.server != null && message.hasOwnProperty("server"))
- object.server = options.enums === String ? $root.PenguinProbe.Server[message.server] : message.server;
- if (message.isPersonal != null && message.hasOwnProperty("isPersonal"))
- object.isPersonal = message.isPersonal;
- if (message.start != null && message.hasOwnProperty("start"))
- if (typeof message.start === "number")
- object.start = options.longs === String ? String(message.start) : message.start;
- else
- object.start = options.longs === String ? $util.Long.prototype.toString.call(message.start) : options.longs === Number ? new $util.LongBits(message.start.low >>> 0, message.start.high >>> 0).toNumber(true) : message.start;
- if (message.end != null && message.hasOwnProperty("end"))
- if (typeof message.end === "number")
- object.end = options.longs === String ? String(message.end) : message.end;
- else
- object.end = options.longs === String ? $util.Long.prototype.toString.call(message.end) : options.longs === Number ? new $util.LongBits(message.end.low >>> 0, message.end.high >>> 0).toNumber(true) : message.end;
- if (message.interval != null && message.hasOwnProperty("interval"))
- if (typeof message.interval === "number")
- object.interval = options.longs === String ? String(message.interval) : message.interval;
- else
- object.interval = options.longs === String ? $util.Long.prototype.toString.call(message.interval) : options.longs === Number ? new $util.LongBits(message.interval.low >>> 0, message.interval.high >>> 0).toNumber(true) : message.interval;
- return object;
- };
+ if (message.interval != null && message.hasOwnProperty('interval')) {
+ if (typeof message.interval === 'number') { object.interval = options.longs === String ? String(message.interval) : message.interval } else { object.interval = options.longs === String ? $util.Long.prototype.toString.call(message.interval) : options.longs === Number ? new $util.LongBits(message.interval.low >>> 0, message.interval.high >>> 0).toNumber(true) : message.interval }
+ }
+ return object
+ }
/**
* Converts this AdvancedQuery to JSON.
@@ -1468,18 +1356,17 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- AdvancedQuery.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return AdvancedQuery;
- })();
+ AdvancedQuery.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
- return ExecutedAdvancedQuery;
- })();
+ return AdvancedQuery
+ })()
- PenguinProbe.Navigated = (function() {
+ return ExecutedAdvancedQuery
+ })()
+ PenguinProbe.Navigated = (function () {
/**
* Properties of a Navigated.
* @memberof PenguinProbe
@@ -1496,11 +1383,12 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.INavigated=} [properties] Properties to set
*/
- function Navigated(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function Navigated (properties) {
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -1509,7 +1397,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.Navigated
* @instance
*/
- Navigated.prototype.meta = null;
+ Navigated.prototype.meta = null
/**
* Navigated path.
@@ -1517,7 +1405,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.Navigated
* @instance
*/
- Navigated.prototype.path = "";
+ Navigated.prototype.path = ''
/**
* Creates a new Navigated instance using the specified properties.
@@ -1527,9 +1415,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.INavigated=} [properties] Properties to set
* @returns {PenguinProbe.Navigated} Navigated instance
*/
- Navigated.create = function create(properties) {
- return new Navigated(properties);
- };
+ Navigated.create = function create (properties) {
+ return new Navigated(properties)
+ }
/**
* Encodes the specified Navigated message. Does not implicitly {@link PenguinProbe.Navigated.verify|verify} messages.
@@ -1540,15 +1428,12 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Navigated.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.meta != null && Object.hasOwnProperty.call(message, "meta"))
- $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.path != null && Object.hasOwnProperty.call(message, "path"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
- return writer;
- };
+ Navigated.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.meta != null && Object.hasOwnProperty.call(message, 'meta')) { $root.PenguinProbe.Meta.encode(message.meta, writer.uint32(/* id 1, wireType 2 = */10).fork()).ldelim() }
+ if (message.path != null && Object.hasOwnProperty.call(message, 'path')) { writer.uint32(/* id 2, wireType 2 = */18).string(message.path) }
+ return writer
+ }
/**
* Encodes the specified Navigated message, length delimited. Does not implicitly {@link PenguinProbe.Navigated.verify|verify} messages.
@@ -1559,9 +1444,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Navigated.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ Navigated.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes a Navigated message from the specified reader or buffer.
@@ -1574,26 +1459,25 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Navigated.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.Navigated();
+ Navigated.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.Navigated()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32());
- break;
+ message.meta = $root.PenguinProbe.Meta.decode(reader, reader.uint32())
+ break
case 2:
- message.path = reader.string();
- break;
+ message.path = reader.string()
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes a Navigated message from the specified reader or buffer, length delimited.
@@ -1605,11 +1489,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Navigated.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ Navigated.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies a Navigated message.
@@ -1619,19 +1502,17 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Navigated.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.meta != null && message.hasOwnProperty("meta")) {
- var error = $root.PenguinProbe.Meta.verify(message.meta);
- if (error)
- return "meta." + error;
+ Navigated.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ if (message.meta != null && message.hasOwnProperty('meta')) {
+ var error = $root.PenguinProbe.Meta.verify(message.meta)
+ if (error) { return 'meta.' + error }
+ }
+ if (message.path != null && message.hasOwnProperty('path')) {
+ if (!$util.isString(message.path)) { return 'path: string expected' }
}
- if (message.path != null && message.hasOwnProperty("path"))
- if (!$util.isString(message.path))
- return "path: string expected";
- return null;
- };
+ return null
+ }
/**
* Creates a Navigated message from a plain object. Also converts values to their respective internal types.
@@ -1641,19 +1522,16 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.Navigated} Navigated
*/
- Navigated.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.Navigated)
- return object;
- var message = new $root.PenguinProbe.Navigated();
+ Navigated.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.Navigated) { return object }
+ var message = new $root.PenguinProbe.Navigated()
if (object.meta != null) {
- if (typeof object.meta !== "object")
- throw TypeError(".PenguinProbe.Navigated.meta: object expected");
- message.meta = $root.PenguinProbe.Meta.fromObject(object.meta);
+ if (typeof object.meta !== 'object') { throw TypeError('.PenguinProbe.Navigated.meta: object expected') }
+ message.meta = $root.PenguinProbe.Meta.fromObject(object.meta)
}
- if (object.path != null)
- message.path = String(object.path);
- return message;
- };
+ if (object.path != null) { message.path = String(object.path) }
+ return message
+ }
/**
* Creates a plain object from a Navigated message. Also converts values to other types if specified.
@@ -1664,20 +1542,17 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Navigated.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
+ Navigated.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
if (options.defaults) {
- object.meta = null;
- object.path = "";
+ object.meta = null
+ object.path = ''
}
- if (message.meta != null && message.hasOwnProperty("meta"))
- object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options);
- if (message.path != null && message.hasOwnProperty("path"))
- object.path = message.path;
- return object;
- };
+ if (message.meta != null && message.hasOwnProperty('meta')) { object.meta = $root.PenguinProbe.Meta.toObject(message.meta, options) }
+ if (message.path != null && message.hasOwnProperty('path')) { object.path = message.path }
+ return object
+ }
/**
* Converts this Navigated to JSON.
@@ -1686,15 +1561,14 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- Navigated.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- return Navigated;
- })();
+ Navigated.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
- PenguinProbe.ServerACK = (function() {
+ return Navigated
+ })()
+ PenguinProbe.ServerACK = (function () {
/**
* Properties of a ServerACK.
* @memberof PenguinProbe
@@ -1711,11 +1585,12 @@ $root.PenguinProbe = (function() {
* @constructor
* @param {PenguinProbe.IServerACK=} [properties] Properties to set
*/
- function ServerACK(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ function ServerACK (properties) {
+ if (properties) {
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
+ if (properties[keys[i]] != null) { this[keys[i]] = properties[keys[i]] }
+ }
+ }
}
/**
@@ -1724,7 +1599,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ServerACK
* @instance
*/
- ServerACK.prototype.type = 0;
+ ServerACK.prototype.type = 0
/**
* ServerACK message.
@@ -1732,7 +1607,7 @@ $root.PenguinProbe = (function() {
* @memberof PenguinProbe.ServerACK
* @instance
*/
- ServerACK.prototype.message = "";
+ ServerACK.prototype.message = ''
/**
* Creates a new ServerACK instance using the specified properties.
@@ -1742,9 +1617,9 @@ $root.PenguinProbe = (function() {
* @param {PenguinProbe.IServerACK=} [properties] Properties to set
* @returns {PenguinProbe.ServerACK} ServerACK instance
*/
- ServerACK.create = function create(properties) {
- return new ServerACK(properties);
- };
+ ServerACK.create = function create (properties) {
+ return new ServerACK(properties)
+ }
/**
* Encodes the specified ServerACK message. Does not implicitly {@link PenguinProbe.ServerACK.verify|verify} messages.
@@ -1755,15 +1630,12 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ServerACK.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
- if (message.message != null && Object.hasOwnProperty.call(message, "message"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
- return writer;
- };
+ ServerACK.encode = function encode (message, writer) {
+ if (!writer) { writer = $Writer.create() }
+ if (message.type != null && Object.hasOwnProperty.call(message, 'type')) { writer.uint32(/* id 1, wireType 0 = */8).int32(message.type) }
+ if (message.message != null && Object.hasOwnProperty.call(message, 'message')) { writer.uint32(/* id 2, wireType 2 = */18).string(message.message) }
+ return writer
+ }
/**
* Encodes the specified ServerACK message, length delimited. Does not implicitly {@link PenguinProbe.ServerACK.verify|verify} messages.
@@ -1774,9 +1646,9 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ServerACK.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ ServerACK.encodeDelimited = function encodeDelimited (message, writer) {
+ return this.encode(message, writer).ldelim()
+ }
/**
* Decodes a ServerACK message from the specified reader or buffer.
@@ -1789,26 +1661,25 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ServerACK.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PenguinProbe.ServerACK();
+ ServerACK.decode = function decode (reader, length) {
+ if (!(reader instanceof $Reader)) { reader = $Reader.create(reader) }
+ var end = length === undefined ? reader.len : reader.pos + length; var message = new $root.PenguinProbe.ServerACK()
while (reader.pos < end) {
- var tag = reader.uint32();
+ var tag = reader.uint32()
switch (tag >>> 3) {
case 1:
- message.type = reader.int32();
- break;
+ message.type = reader.int32()
+ break
case 2:
- message.message = reader.string();
- break;
+ message.message = reader.string()
+ break
default:
- reader.skipType(tag & 7);
- break;
+ reader.skipType(tag & 7)
+ break
}
}
- return message;
- };
+ return message
+ }
/**
* Decodes a ServerACK message from the specified reader or buffer, length delimited.
@@ -1820,11 +1691,10 @@ $root.PenguinProbe = (function() {
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ServerACK.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ ServerACK.decodeDelimited = function decodeDelimited (reader) {
+ if (!(reader instanceof $Reader)) { reader = new $Reader(reader) }
+ return this.decode(reader, reader.uint32())
+ }
/**
* Verifies a ServerACK message.
@@ -1834,25 +1704,25 @@ $root.PenguinProbe = (function() {
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- ServerACK.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.type != null && message.hasOwnProperty("type"))
+ ServerACK.verify = function verify (message) {
+ if (typeof message !== 'object' || message === null) { return 'object expected' }
+ if (message.type != null && message.hasOwnProperty('type')) {
switch (message.type) {
default:
- return "type: enum value expected";
+ return 'type: enum value expected'
case 0:
case 1:
case 2:
case 3:
case 64:
- break;
+ break
}
- if (message.message != null && message.hasOwnProperty("message"))
- if (!$util.isString(message.message))
- return "message: string expected";
- return null;
- };
+ }
+ if (message.message != null && message.hasOwnProperty('message')) {
+ if (!$util.isString(message.message)) { return 'message: string expected' }
+ }
+ return null
+ }
/**
* Creates a ServerACK message from a plain object. Also converts values to their respective internal types.
@@ -1862,36 +1732,34 @@ $root.PenguinProbe = (function() {
* @param {Object.} object Plain object
* @returns {PenguinProbe.ServerACK} ServerACK
*/
- ServerACK.fromObject = function fromObject(object) {
- if (object instanceof $root.PenguinProbe.ServerACK)
- return object;
- var message = new $root.PenguinProbe.ServerACK();
+ ServerACK.fromObject = function fromObject (object) {
+ if (object instanceof $root.PenguinProbe.ServerACK) { return object }
+ var message = new $root.PenguinProbe.ServerACK()
switch (object.type) {
- case "UNKNOWN":
+ case 'UNKNOWN':
case 0:
- message.type = 0;
- break;
- case "NAVIGATED":
+ message.type = 0
+ break
+ case 'NAVIGATED':
case 1:
- message.type = 1;
- break;
- case "ENTERED_SEARCH_RESULT":
+ message.type = 1
+ break
+ case 'ENTERED_SEARCH_RESULT':
case 2:
- message.type = 2;
- break;
- case "EXECUTED_ADVANCED_QUERY":
+ message.type = 2
+ break
+ case 'EXECUTED_ADVANCED_QUERY':
case 3:
- message.type = 3;
- break;
- case "SERVER_ACK":
+ message.type = 3
+ break
+ case 'SERVER_ACK':
case 64:
- message.type = 64;
- break;
+ message.type = 64
+ break
}
- if (object.message != null)
- message.message = String(object.message);
- return message;
- };
+ if (object.message != null) { message.message = String(object.message) }
+ return message
+ }
/**
* Creates a plain object from a ServerACK message. Also converts values to other types if specified.
@@ -1902,20 +1770,17 @@ $root.PenguinProbe = (function() {
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- ServerACK.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
+ ServerACK.toObject = function toObject (message, options) {
+ if (!options) { options = {} }
+ var object = {}
if (options.defaults) {
- object.type = options.enums === String ? "UNKNOWN" : 0;
- object.message = "";
+ object.type = options.enums === String ? 'UNKNOWN' : 0
+ object.message = ''
}
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = options.enums === String ? $root.PenguinProbe.MessageType[message.type] : message.type;
- if (message.message != null && message.hasOwnProperty("message"))
- object.message = message.message;
- return object;
- };
+ if (message.type != null && message.hasOwnProperty('type')) { object.type = options.enums === String ? $root.PenguinProbe.MessageType[message.type] : message.type }
+ if (message.message != null && message.hasOwnProperty('message')) { object.message = message.message }
+ return object
+ }
/**
* Converts this ServerACK to JSON.
@@ -1924,14 +1789,14 @@ $root.PenguinProbe = (function() {
* @instance
* @returns {Object.} JSON object
*/
- ServerACK.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ ServerACK.prototype.toJSON = function toJSON () {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions)
+ }
- return ServerACK;
- })();
+ return ServerACK
+ })()
- return PenguinProbe;
-})();
+ return PenguinProbe
+})()
-module.exports = $root;
+module.exports = $root
diff --git a/src/models/recognition/charHash.js b/src/models/recognition/charHash.js
new file mode 100644
index 00000000..a60cfba2
--- /dev/null
+++ b/src/models/recognition/charHash.js
@@ -0,0 +1,127 @@
+export default {
+ "result": {
+ "CN": "2003e00be3f82b0c3c00fc77fb18331878187f70ff20f160f540bd921b92010",
+ "US": "c010c018801880188a9f9b9f999bd199d09ada9b9b9b91999199b199bbdfbadf",
+ "JP": "a200b270b217ef7cff7cba1fdf73df709e00def3cef31f60ff403b903990190",
+ "KR": "100cf77cf774561576157f7c590ad008bf709f761666166000f000f07600760"
+ },
+ "stage": {
+ "A": "3c007e007e007e00ff00ff01ff81e781e783c3c3ffc7ffe7ffe781ef81ff00f",
+ "B": "3fe03ff83ff83cf83c3c3c783ff83ff03ff83ffc3c3c3c3c3c7c3ffc3ff83ff0",
+ "C": "7f00ff83ffc3ffe7c3c7800f800f000f000f80078107c3f3ffe3ffc0ff807e0",
+ "D": "ffe0fff8fffcfffcf03ef01ef01ff01ff01ff01ff01ef03efffefffcfff8ffe0",
+ "E": "3ffc3ffc3ffc3ffc3c003c003ff03ff03ff03ff03c003c003ffc3ffc3ffc3ffc",
+ "F": "3ffc3ffc3ffc3ffc3c003c003c003ff03ff03ff03c003c003c003c003c003c00",
+ "G": "7e00ff83ffc3ffe7c1c7800f800f8fff8fff8ff780f7e1f3fff3fff0fff07ef",
+ "H": "781e781e781e781e781e781e7ffe7ffe7ffe7ffe781e781e781e781e781e781e",
+ "I": "3c003c003c003c003c003c003c003c003c003c003c003c003c003c003c003c0",
+ "J": "1e001e001e001e001e001e001e001e001e001e003e383c7ffc3ff81ff80fe0",
+ "K": "f83ef87cf8f8f9f0fbe0ffc0ff80ff80ffc0ffc0fbe0f9f0f8f8f87cf87cf83e",
+ "L": "3c003c003c003c003c003c003c003c003c003c003c003c003ffc3ffc3ffc3ffc",
+ "M": "f00ff81ff83ffc3ffe7ffe7ffffffffff7eff7eff3cff3cff00ff00ff00ff00f",
+ "N": "781e7c1e7c1e7e1e7f1e7f9e7fde7fde7bfe7bfe79fe78fe787e787e783e781e",
+ "O": "7e01ff83ffc7ffe7c3ef81ff00ff00ff00ff00ff81f7c3f7ffe3ffc1ff807f0",
+ "P": "3ff03ff83ffc3ffc3c3c3c3c3c3c3ffc3ffc3ff83ff03c003c003c003c003c00",
+ "Q": "7e01ff83ffc3e7c781e781e781e781e781e7c3e3ffc3ff80ff007e003c003c0",
+ "R": "7fe07ff87ff87ffc7c3c7c3c7c7c7ffc7ff87ff07ff07df07cf87c787c7c7c3e",
+ "S": "7e00ff81ffc3ffc3c3c3f001fc01ff007fc01fc0c3c3c3c3ffc1ffc0ff807f0",
+ "T": "7ffe7ffe7ffe7ffe03c003c003c003c003c003c003c003c003c003c003c003c0",
+ "U": "781e781e781e781e781e781e781e781e781e781e781e7c3e3ffc3ffc1ff80fe0",
+ "V": "f80ff81f781e7c1e3c3e3c3c3e7c1e781e780f780ff00ff007e007e007e003c0",
+ "W": "e007e18773ce73ce73ce77ee3fec3e7c3e7c1e781c381c3800000000",
+ "X": "7c3e7c3e3e7c3ff81ff80ff00fe007e007e00ff00ff01ff83efc3e7c7c3ef83f",
+ "Y": "f81f7c3e7c3c3e7c1ff81ff00ff007e003c003c003c003c003c003c003c003c0",
+ "Z": "7ffe7ffe7ffe7ffe00fc01f803f003e007c00fc01f803f007ffe7ffe7ffe7ffe",
+ "1": "f001f003f007f00ff00ff006f002f000f000f000f000f000f000f000f000f0",
+ "2": "7e00ff01ff83ffc3e7c043c007c00f801f803f007e00f803ffc3ffc3ffc3ffc",
+ "3": "7e00ff81ff83e7c3c7c007c03f803f003f8007c003c3c3c3ffc3ffc1ff807e0",
+ "4": "7800f801f801f803f807f80f781f783e783c787ffe7ffe7ffe007800780078",
+ "5": "ff80ff81ff81ff81e001fc01ff01ff81efc043c003c1c3c3efc1ff81ff007e0",
+ "6": "1f003e003c007800f801fe01ff83ffc3e7c3c3c3c3c3c3c3ffc1ffc0ff807e0",
+ "7": "3ffc3ffc3ffc3ffc007800f801f001e003e003c007c007800f801f001e003e00",
+ "8": "7e00ff01ff81c781c381e781ff00fe01ff83ffc3c3c3c3c3e7c3ffc1ff807e0",
+ "9": "7e01ff83ff83ffc3c3c383c3c3c3e7c3ffc1ff80ff801f003e007c007800f00",
+ "0": "7e01ff03ff83ffc7c3e783e781e781e781e781e783e7c3e3ffc3ffc1ff007e0",
+ "-": "ffffffffffffffffffffffff00000000000000000000"
+ },
+ "dropType": {
+ "CN": {
+ "NORMAL_DROP": "564e564ffeeffee3fee7fe47fe477cf77cf71067fe6ffe6dd2fdd6ddde97d697",
+ "SPECIAL_DROP": "4404c4fcdefcfe4fe47fff74df74c2ff7fffffeeffaeda2e4a5f4a5f46d546c4",
+ "EXTRA_DROP": "40646f64ff74f474fe74fed6fed6eef76ef7fe35be35fe24be64bee4fbc4fbc4",
+ "FURNITURE": "100010de7ede7e401000ffffffff24cc6e5efe5a7e56fe7ffe51fee010ff10bf"
+ },
+ "US": {
+ "NORMAL_DROP": "c0001800a0000400bb27869bd02706b2b02306b1b3671a9b0000001003000010",
+ "SPECIAL_DROP": "e0089800a000800096ee83db76c88202364c8201b6ce9adb1000000010000000",
+ "EXTRA_DROP": "e100e0008100800095549fad894c9a2e8d549a29f554ebad0000002000000020",
+ "FURNITURE": "80201c0080201400956895559533155595331555f56b1d550000000400020004"
+ },
+ "JP": {
+ "NORMAL_DROP": "3e2abe2a4a7f4c7f1e41027fde22de3e423e5e08427f427f4249604bff4a9f08",
+ "SPECIAL_DROP": "800080ff80ff8003800380128216821e86148c108c109830b030f060c0e00040",
+ "EXTRA_DROP": "a718a71ca22432257601f791bfd13a503250345424143424162c532873000",
+ "FURNITURE": "abb5abb5abb5a891a8d1a8c1acc9acc9acc9acc9a889a88988a8cba9dba9d3a9"
+ },
+ "KR": {
+ "NORMAL_DROP": "20272daf2da9afa9afadadbf2db72fa00fa7efa7e027e627e6060607e7e7e7e",
+ "SPECIAL_DROP": "7e187e1840187e1c403c7e777e670000ffffffff00187e187e18061806180618",
+ "EXTRA_DROP": "100610067e7e7e7e181e38167c17e61742360026ff6610c610c6100610061006",
+ "FURNITURE": "201f201f2791209fe09fe198279fa79fa19023100317e610261024102010201"
+ }
+ },
+ "item": {
+ "CN": {
+ "1": "3800f800f80018001800180018001800180018001800180018001801ff01ff0",
+ "2": "7c00fe0187000300030003000300070006000e001c0038007000e001ff81ff8",
+ "3": "7c00ff00c3000300030003000f003c003f0003000180018001818381ff007e0",
+ "4": "6000e001e001e00360076006600c600c6018603ffc3ffc0060006000600060",
+ "5": "7f00ff00c000c000c000c000fe00c700038001800180018003818381ff007c0",
+ "6": "1e007f80e100c000c00180019e01ff01c301818181818180c180e3007f003e0",
+ "7": "1ff81ff800300070006000c000c001c001800180018003800380038003000300",
+ "8": "3c007f00c300c300c100c30073003e007e00c701838181818181c380ff007e0",
+ "9": "3c00fe00c3018301818181818180c380ff807d800180030003008701fe007c0",
+ "0": "3c007e00c300c301c3818181818181818181818181818380c300c3007e003c0",
+ "W": "ffffffff06000600060007fc07fc04040c040c04080c180c300c700ce0f80000"
+ },
+ "US": {
+ "1": "1e003e007e007e004e000e000e000e000e000e000e000e000e000e000e000e0",
+ "2": "7e00ff00e300c380c380038007001f007e00f801c001c001c001c001ff81ff8",
+ "3": "7e00ff01c301c380038003000f003e000f00038003800381c381c380ff00fe0",
+ "4": "e001e001e003e0036007600e600e601c6018601ff81ff80060006000600060",
+ "5": "1ff01ff01c001c001c001fe01ff01e701c380038003800381c381c300ff00fe0",
+ "6": "7e00ff00e700c301c001dc01ff01ff01c301c381c381c380c300e700ff007e0",
+ "7": "ff00ff000700070007000e000e000e000c001c0018003800380030007000700",
+ "8": "7e00ff01c301c381c380c300ff007e00e701c381c381c381c381c380ff007e0",
+ "9": "7e00ff01c701c301c3018381c381c380ff80ff8003000300c300c700ff007e0",
+ "0": "7e00ff00e700c301c381c381c381c381c381c381c381c380c300e700ff007e0",
+ "K": "1878187018e019c01bc01b801f001f801f801fc019c018e018e0187018701838"
+ },
+ "JP": {
+ "1": "e001e007e007e006e000e000e000e000e000e000e000e000e000e000e000e0",
+ "2": "7e00ff01e781c3818180038003800f003e007c00f000e001c0018001ff81ff8",
+ "3": "7e00ff01e381c380018003801f003e003f80038001c081c381c1c381ff807f0",
+ "4": "7000f001f003f003f007700e701c701c7038707ffc7ffc7ffc007000700070",
+ "5": "1ff81ff81c00180018001bc01ff01e783838001c001c081c38381c781ff007e0",
+ "6": "7e00ff81e381c18180039c03ff03ff83c38381c381c381c1c181e380ff007e0",
+ "7": "3ffc3ffc00380070007000e001c001c003800380038007000700070007000700",
+ "8": "7e00ff01c38181818181c381ff80ff01ff83c1c381c381c381c1c381ff807e0",
+ "9": "7e00ff01c783838381c381c381c1c3c1ffc0ffc039c001818381c781ff007e0",
+ "0": "7e00ff01e781c381818381c381c381c381c381c381c18181c381e780ff007e0",
+ "W": "ffffffff0c000c000c000ffe0ffe0c0e1c0e1c0e180e380c781cf0fce0780000"
+ },
+ "KR": {
+ "1": "3c01fc01fc01fc003c003c003c003c003c003c003c003c003c01ff81ff81ff8",
+ "2": "7c01ff01ff01c78007800780078007000f001e003e007c00f801ff81ff81ff8",
+ "3": "7e01ff01ff80c780078007801f003e003f000f80038003818781ff81ff00fe0",
+ "4": "1f001f003f003f007f00f700e701e701c703ffc3ffc3ffc0070007000700070",
+ "5": "ff80ff80ff80e000e000fc00ff00ff80c7800380038003818783ff81ff00fe0",
+ "6": "3e007f80ff80e101e001c001ff01ff81f781c381c381c381e380ff807f003e0",
+ "7": "3ff83ff83ff8007000f000e001e001c003c003c0038003800380078007800780",
+ "8": "3e00ff01ff01e381c381e380f7007e00ff01ef81c781c381c381e781ff007e0",
+ "9": "7c00fe01ff01c781c381c381c381e781ff807b80038007808781ff01fe00fc0",
+ "0": "7e00ff00ff01e781c381c383c383c383c383c381c381c381e780ff00ff007e0",
+ "W": "187f987f9863986398639e639e7f987f98001800183818380038003ffc3ffc"
+ }
+ }
+}
diff --git a/src/models/supports.js b/src/models/supports.js
new file mode 100644
index 00000000..f2c381ed
--- /dev/null
+++ b/src/models/supports.js
@@ -0,0 +1,38 @@
+export default {
+ localizations: [
+ {
+ value: 'zh',
+ push: 'ZH_CN',
+ text: '简体中文'
+ },
+ // {
+ // value: 'zh-TW',
+ // text: '繁体中文',
+ // beta: true
+ // },
+ {
+ value: 'en',
+ push: 'EN_US',
+ text: 'English'
+ },
+ {
+ value: 'ja',
+ push: 'JA_JP',
+ text: '日本語'
+ },
+ {
+ value: 'ko',
+ push: 'KO_KR',
+ text: '한국어'
+ }
+ ],
+ servers: ['CN', 'US', 'JP', 'KR'],
+ push: {
+ categories: [
+ 'NewStage',
+ 'ImportantTimePoint',
+ 'Maintenance',
+ 'ClientUpgrade'
+ ]
+ }
+}
diff --git a/src/plugins/confirmation-dialog/Confirm.vue b/src/plugins/confirmation-dialog/Confirm.vue
new file mode 100644
index 00000000..45e33c7c
--- /dev/null
+++ b/src/plugins/confirmation-dialog/Confirm.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+ {{ icon }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/plugins/confirmation-dialog/index.js b/src/plugins/confirmation-dialog/index.js
new file mode 100644
index 00000000..5fd9b67f
--- /dev/null
+++ b/src/plugins/confirmation-dialog/index.js
@@ -0,0 +1,41 @@
+import Confirm from './Confirm.vue'
+
+function Install (Vue, options = {}) {
+ const property = options.property || '$confirm'
+ delete options.property
+ const vuetify = options.vuetify
+ delete options.vuetify
+ const i18n = options.i18n
+ delete options.i18n
+ if (!vuetify) {
+ console.warn('Module confirmation-dialog needs vuetify instance. Use Vue.use(ConfirmationDialog, { vuetify })')
+ }
+ const Ctor = Vue.extend(Object.assign({ vuetify, i18n }, Confirm))
+ function createDialogCmp (options) {
+ const container = document.querySelector('[data-app=true]') || document.body
+ return new Promise(resolve => {
+ const cmp = new Ctor(Object.assign({}, {
+ propsData: Object.assign({}, Vue.prototype[property].options, options),
+ destroyed: () => {
+ container.removeChild(cmp.$el)
+ resolve(cmp.value)
+ }
+ }))
+ container.appendChild(cmp.$mount().$el)
+ })
+ }
+
+ function show (message, options = {}) {
+ options.message = message
+ return createDialogCmp(options)
+ }
+
+ Vue.prototype[property] = show
+ Vue.prototype[property].options = options || {}
+}
+
+if (typeof window !== 'undefined' && window.Vue) {
+ window.Vue.use(Install)
+}
+
+export default Install
diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js
index 85abb565..a445e420 100644
--- a/src/plugins/vuetify.js
+++ b/src/plugins/vuetify.js
@@ -1,6 +1,6 @@
import '@mdi/font/css/materialdesignicons.min.css'
-import Vue from 'vue';
-import Vuetify from 'vuetify/lib';
+import Vue from 'vue'
+import Vuetify from 'vuetify/lib'
import colors from 'vuetify/lib/util/colors'
import zhHans from 'vuetify/es5/locale/zh-Hans'
@@ -8,11 +8,14 @@ import ja from 'vuetify/es5/locale/ja'
import ko from 'vuetify/es5/locale/ko'
import en from 'vuetify/es5/locale/en'
-Vue.use(Vuetify);
+import ConfirmationDialog from './confirmation-dialog'
+import i18n from "@/i18n";
-export default new Vuetify({
+Vue.use(Vuetify)
+
+const vuetify = new Vuetify({
icons: {
- iconfont: 'mdi',
+ iconfont: 'mdi'
},
lang: {
locales: { zh: zhHans, ja, ko, en }
@@ -23,27 +26,33 @@ export default new Vuetify({
},
themes: {
light: {
+ // primary: '#C03443',
accent1: colors.indigo.darken4,
accent2: colors.orange.darken4,
accent3: colors.blue.darken4,
- background: "#fff",
- lightenedBackground: "#d9d9d9",
- indigoBackground: "#fff",
- text: "#0e0e0e",
+ background: '#f5f5f5',
+ lightenedBackground: '#d9d9d9',
+ indigoBackground: '#eee',
+ text: '#0e0e0e',
textDarken: colors.grey.darken4
},
dark: {
+ // primary: '#C03443',
accent1: colors.indigo.lighten3,
accent2: colors.orange.lighten3,
accent3: colors.blue.lighten3,
background: colors.blueGrey.darken4,
lightenedBackground: colors.blueGrey.darken3,
- indigoBackground: "#191d37",
- text: "#f0f0f0",
+ indigoBackground: '#191d37',
+ text: '#ececec',
textDarken: colors.grey.lighten3
- },
- },
- },
-});
\ No newline at end of file
+ }
+ }
+ }
+})
+
+Vue.use(ConfirmationDialog, { vuetify, i18n })
+
+export default vuetify
diff --git a/src/router.js b/src/router.js
index 7bcdd5ad..7275ebfa 100644
--- a/src/router.js
+++ b/src/router.js
@@ -2,7 +2,8 @@ import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home'
-import Report from './views/Report'
+import ReportLayout from './layouts/ReportLayout'
+import Report from './views/Report/Report'
import StatsLayout from './layouts/StatsLayout'
import StatsByStage from './views/Stats/Stage'
import StatsByItem from './views/Stats/Item'
@@ -13,28 +14,42 @@ import AboutContact from './views/About/Contact'
import AboutDonate from './views/About/Donate'
import AboutLinks from './views/About/Links'
-import NotFound from "@/views/NotFound";
-import SiteStats from "@/views/SiteStats";
-import Planner from "@/views/Planner";
-
-import i18n from "@/i18n";
-import Search from "@/views/Search";
-import store from "@/store";
+import NotFound from '@/views/NotFound'
+import SiteStats from '@/views/SiteStats'
+import Planner from '@/views/Planner'
+import Search from '@/views/Search'
+import store from '@/store'
+import helmet from "@/utils/helmet";
// import DataDebugger from "@/components/debug/DataDebugger";
// this is to fix error named something like DuplicatedRoute
-const originalPush = Router.prototype.push;
-Router.prototype.push = function push(location, onResolve, onReject) {
+const originalPush = Router.prototype.push
+Router.prototype.push = function push (location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err)
-};
+}
-Vue.use(Router);
+const routerChildrenNull = {
+ path: '',
+ name: 'RouterChildrenNull',
+ meta: {
+ icon: 'mdi-close',
+ i18n: 'meta.notfound',
+ hide: true
+ },
+ beforeEnter(to, from, next) {
+ return next({
+ name: "Home",
+ replace: true
+ })
+ }
+}
+Vue.use(Router)
const router = new Router({
mode: 'history',
- scrollBehavior() { // params: (to, from, savedPosition)
+ scrollBehavior () { // params: (to, from, savedPosition)
return { x: 0, y: 0 }
},
routes: [{
@@ -48,23 +63,83 @@ const router = new Router({
},
{
path: '/report',
- name: 'ReportByZone',
- component: Report,
+ name: 'Report',
+ component: ReportLayout,
meta: {
icon: 'mdi-upload',
- i18n: 'menu.report',
- forceSingle: true
+ i18n: 'menu.report._name',
+ active: true
},
children: [
{
- path: ':zoneId/:stageId',
- name: 'ReportByZone_Selected',
+ path: '',
+ name: 'RouterChildrenNull',
+ meta: {
+ icon: 'mdi-close',
+ i18n: 'meta.notfound',
+ hide: true
+ },
+ beforeEnter(to, from, next) {
+ return next({
+ name: "ReportByZone",
+ replace: true
+ })
+ }
+ },
+ {
+ path: 'stage',
+ name: 'ReportByZone',
component: Report,
- props: true,
meta: {
- i18n: 'menu.report'
+ icon: 'mdi-cursor-default-click',
+ i18n: 'menu.report.stage'
},
- }
+ children: [
+ {
+ path: ':zoneId/:stageId',
+ name: 'ReportByZone_Selected',
+ component: Report,
+ props: true,
+ meta: {
+ i18n: 'menu.report.stage'
+ }
+ }
+ ]
+ },
+ {
+ path: 'recognition',
+ name: 'RecognitionReport',
+ component: () => import(/* webpackChunkName: "recognition" */ './views/Report/RecognitionReport'),
+ meta: {
+ async: true,
+ icon: 'mdi-image-filter-center-focus',
+ i18n: 'menu.report.recognition',
+ beta: true
+ }
+ },
+ {
+ path: ':zoneId/:stageId',
+ name: 'ReportByZoneLegacy',
+ meta: {
+ hide: true,
+ icon: 'mdi-cursor-default-click',
+ i18n: 'menu.report.stage'
+ },
+ beforeEnter(to, from, next) {
+ if (to.params.zoneId && to.params.stageId) {
+ return next({
+ name: "ReportByZone_Selected",
+ params: to.params,
+ replace: true
+ })
+ } else {
+ return next({
+ name: "ReportByZone",
+ replace: true
+ })
+ }
+ }
+ },
]
},
{
@@ -77,6 +152,7 @@ const router = new Router({
active: true
},
children: [
+ routerChildrenNull,
{
path: 'stage',
name: 'StatsByStage',
@@ -85,7 +161,7 @@ const router = new Router({
meta: {
icon: 'mdi-cube',
i18n: 'menu.stats.stage'
- },
+ }
},
{
path: 'stage/:zoneId/:stageId',
@@ -105,7 +181,7 @@ const router = new Router({
meta: {
icon: 'mdi-treasure-chest',
i18n: 'menu.stats.item'
- },
+ }
},
{
path: 'item/:itemId',
@@ -115,7 +191,7 @@ const router = new Router({
meta: {
hide: true,
i18n: 'menu.stats.item'
- },
+ }
}
]
},
@@ -138,7 +214,7 @@ const router = new Router({
async: true,
icon: 'mdi-database-search',
i18n: 'menu.stats.advanced'
- },
+ }
},
{
path: '/search',
@@ -149,7 +225,7 @@ const router = new Router({
icon: 'mdi-magnify',
i18n: 'menu.search',
hide: true
- },
+ }
},
{
path: '/statistics',
@@ -170,6 +246,7 @@ const router = new Router({
active: true
},
children: [
+ routerChildrenNull,
{
path: 'members',
name: 'AboutMembers',
@@ -179,7 +256,7 @@ const router = new Router({
async: true,
icon: 'mdi-account-multiple',
i18n: 'menu.about.members'
- },
+ }
},
{
path: 'contribute',
@@ -190,7 +267,7 @@ const router = new Router({
icon: 'mdi-hammer',
i18n: 'menu.about.contribute',
hide: true
- },
+ }
},
{
path: 'changelog',
@@ -201,7 +278,7 @@ const router = new Router({
async: true,
icon: 'mdi-timeline',
i18n: 'menu.about.changelog'
- },
+ }
},
{
path: 'contact',
@@ -212,7 +289,7 @@ const router = new Router({
icon: 'mdi-account-card-details',
i18n: 'menu.about.contact',
hide: true
- },
+ }
},
{
path: 'donate',
@@ -223,7 +300,7 @@ const router = new Router({
icon: 'mdi-gift',
i18n: 'menu.about.donate',
hide: true
- },
+ }
},
{
path: 'links',
@@ -233,7 +310,7 @@ const router = new Router({
meta: {
icon: 'mdi-link-variant',
i18n: 'menu.about.links'
- },
+ }
},
{
path: 'credits',
@@ -244,36 +321,10 @@ const router = new Router({
async: true,
icon: 'mdi-license',
i18n: 'menu.about.credits'
- },
- },
+ }
+ }
]
},
- // {
- // path: '/_redirect/v1',
- // name: 'OldVersion',
- // meta: {
- // ga: {
- // category: 'redirect',
- // action: 'links',
- // label: 'OldVersion',
- // value: 1
- // },
- // link: "https://v1.penguin-stats.io",
- // icon: 'mdi-penguin',
- // i18n: 'menu.v1',
- // externalRedirect: true
- // }
- // },
- // {
- // path: '/_internal/debugger/data',
- // name: 'DataDebugger',
- // component: DataDebugger,
- // meta: {
- // icon: 'mdi-file',
- // i18n: 'meta.notfound',
- // hide: true
- // }
- // },
{
path: '*',
name: 'ErrorNotFound',
@@ -282,21 +333,19 @@ const router = new Router({
i18n: 'meta.notfound',
hide: true
}
- },
+ }
]
-});
+})
router.beforeEach((to, from, next) => {
// If this isn't an initial page load and is an async route
if (to.meta.async && to.name) store.commit('ui/setLoadingRoute', true)
-
- document.title = `${i18n.t(to.meta.i18n)} | ${i18n.t('app.name')}`;
- next();
-});
+ return next()
+})
router.afterEach((to) => {
- document.title = `${i18n.t(to.meta.i18n)} | ${i18n.t('app.name')}`;
+ helmet.title.update(to)
store.commit('ui/setLoadingRoute', false)
-});
+})
export default router
diff --git a/src/store/index.js b/src/store/index.js
index a4add413..4bdec388 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -3,81 +3,66 @@ import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
// store file
-import ajax from './modules/ajax';
-import auth from './modules/auth';
-import cache from "./modules/cache";
-import data from './modules/data';
-import dataSource from './modules/dataSource';
-import mirror from './modules/mirror';
-import options from './modules/options';
-import planner from './modules/planner';
-import settings from './modules/settings';
-import stagePreferences from './modules/stagePreferences';
-import ui from './modules/ui';
+import ajax from './modules/ajax'
+import auth from './modules/auth'
+import cache from './modules/cache'
+import data from './modules/data'
+import dataSource from './modules/dataSource'
+import mirror from './modules/mirror'
+import options from './modules/options'
+import planner from './modules/planner'
+import settings from './modules/settings'
+import stagePreferences from './modules/stagePreferences'
+import ui from './modules/ui'
// import compressor from "@/utils/compressor";
-Vue.use(Vuex);
+Vue.use(Vuex)
-const previousState = localStorage.getItem("penguin-stats-state");
+const previousState = localStorage.getItem('penguin-stats-state')
if (previousState) {
- localStorage.removeItem("penguin-stats-state")
- localStorage.setItem("penguin-stats-data", {data: previousState["data"]});
- localStorage.setItem("penguin-stats-settings", {settings: previousState["settings"]});
- localStorage.setItem("penguin-stats-auth", {auth: previousState["auth"]});
- localStorage.setItem("penguin-stats-cacheTTL", {cacheUpdateAt: previousState["cacheUpdateAt"]});
+ localStorage.removeItem('penguin-stats-state')
+ localStorage.setItem('penguin-stats-data', { data: previousState.data })
+ localStorage.setItem('penguin-stats-settings', { settings: previousState.settings })
+ localStorage.setItem('penguin-stats-auth', { auth: previousState.auth })
+ localStorage.setItem('penguin-stats-cacheTTL', { cacheUpdateAt: previousState.cacheUpdateAt })
}
-// const persistStorage = {
-// getItem: (key) => {
-// Console.debug("VuexPersist", "getting item", key)
-// localStorage.getItem(key)
-// },
-// setItem: (key, value) => {
-// Console.debug("VuexPersist", "setting item", key, `${value.length}`)
-// localStorage.setItem(key, value)
-// },
-// removeItem: (key) => {
-// Console.debug("VuexPersist", "removing item", key)
-// localStorage.removeItem(key)
-// }
-// }
-
export default new Vuex.Store({
plugins: [
createPersistedState({
- key: "penguin-stats-data",
+ key: 'penguin-stats-data',
paths: [
- "data",
- "dataSource"
+ 'data',
+ 'dataSource'
]
}),
createPersistedState({
- key: "penguin-stats-settings",
+ key: 'penguin-stats-settings',
paths: [
- "settings",
- "planner",
- "options",
- "stagePreferences"
+ 'settings',
+ 'planner',
+ 'options',
+ 'stagePreferences'
]
}),
createPersistedState({
- key: "penguin-stats-auth",
+ key: 'penguin-stats-auth',
paths: [
- "auth"
+ 'auth'
]
}),
createPersistedState({
- key: "penguin-stats-mirror",
+ key: 'penguin-stats-mirror',
paths: [
- "mirror"
+ 'mirror'
]
}),
- // createPersistedState({
- // key: "penguin-stats-cache",
- // paths: [
- // "cache"
- // ]
- // }),
+ createPersistedState({
+ key: 'penguin-stats-cache',
+ paths: [
+ 'cache'
+ ]
+ })
],
modules: {
ajax,
@@ -92,4 +77,4 @@ export default new Vuex.Store({
options,
ui
}
-});
\ No newline at end of file
+})
diff --git a/src/store/modules/ajax.js b/src/store/modules/ajax.js
index adfa6225..aa93fd46 100644
--- a/src/store/modules/ajax.js
+++ b/src/store/modules/ajax.js
@@ -4,37 +4,37 @@ export default {
states: []
},
mutations: {
- newState(state, payload) {
- state.states.push(payload);
+ newState (state, payload) {
+ state.states.push(payload)
}
},
actions: {
- _getOrCreateState ({commit, state}, id) {
- let found = state.states.find(value => value.id === id);
+ _getOrCreateState ({ commit, state }, id) {
+ const found = state.states.find(value => value.id === id)
if (found) {
return found
} else {
- let pushing = Object.create(null);
- pushing.id = id;
- pushing.pending = false;
- pushing.error = null;
+ const pushing = Object.create(null)
+ pushing.id = id
+ pushing.pending = false
+ pushing.error = null
- commit('newState', pushing);
+ commit('newState', pushing)
return pushing
}
- } ,
- started({dispatch}, {id}) {
+ },
+ started ({ dispatch }, { id }) {
dispatch('_getOrCreateState', id)
.then(res => {
res.pending = true
- });
+ })
},
- finished({dispatch}, {id, error}) {
+ finished ({ dispatch }, { id, error }) {
dispatch('_getOrCreateState', id)
.then(res => {
- res.pending = false;
+ res.pending = false
res.error = error
- });
+ })
}
},
getters: {
@@ -44,6 +44,6 @@ export default {
// return state.states.every(value => !value.pending)
// },
errors: state => state.states.filter(value => !!value.error),
- matrixPending: state => state.states.some(value => value.pending && value.id.includes("Matrix"))
+ matrixPending: state => state.states.some(value => value.pending && value.id.includes('Matrix'))
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/auth.js b/src/store/modules/auth.js
index 5395b252..009e3f5e 100644
--- a/src/store/modules/auth.js
+++ b/src/store/modules/auth.js
@@ -1,5 +1,5 @@
-import Cookies from "js-cookie";
-import config from "@/config";
+import Cookies from 'js-cookie'
+import config from '@/config'
export default {
namespaced: true,
@@ -20,16 +20,16 @@ export default {
}
},
actions: {
- login({commit, dispatch}, {userId, prompted = true}) {
+ login ({ commit, dispatch }, { userId, prompted = true }) {
commit('changeUsername', userId)
if (prompted) {
- Cookies.set(config.authorization.userId.cookieKey, userId, {expires: 90, path: "/"});
- dispatch("data/refreshPersonalMatrix", null, { root: true });
+ Cookies.set(config.authorization.userId.cookieKey, userId, { expires: 90, path: '/' })
+ dispatch('data/refreshPersonalMatrix', null, { root: true })
}
// only add true login ones
if (userId) commit('options/addUserIdHistory', userId, { root: true })
},
- logout({commit}) {
+ logout ({ commit }) {
commit('changeUsername', null)
}
},
@@ -40,6 +40,6 @@ export default {
username: state => {
return state.username || ''
},
- probeUid: state => state.probeUid,
+ probeUid: state => state.probeUid
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/cache.js b/src/store/modules/cache.js
index 17521d12..f0f2fb5c 100644
--- a/src/store/modules/cache.js
+++ b/src/store/modules/cache.js
@@ -1,4 +1,4 @@
-import Vue from "vue"
+import Vue from 'vue'
export default {
namespaced: true,
@@ -6,7 +6,7 @@ export default {
caches: {}
},
mutations: {
- set (state, {key, value}) {
+ set (state, { key, value }) {
Vue.set(state.caches, key, value)
}
},
@@ -14,4 +14,4 @@ export default {
content: state => key => state.caches[key],
have: state => key => key in state.caches
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/data.js b/src/store/modules/data.js
index 5d8ca044..6cff5c8f 100644
--- a/src/store/modules/data.js
+++ b/src/store/modules/data.js
@@ -1,5 +1,5 @@
-import Vue from 'vue';
-import store from '@/store';
+import Vue from 'vue'
+import store from '@/store'
import itemsManager from '@/models/managers/items'
import stagesManager from '@/models/managers/stages'
import zonesManager from '@/models/managers/zones'
@@ -10,8 +10,8 @@ import globalMatrixManager from '@/models/managers/matrices/globalMatrix'
import personalMatrixManager from '@/models/managers/matrices/personalMatrix'
import globalPatternMatrixManager from '@/models/managers/matrices/globalPatternMatrix'
import personalPatternMatrixManager from '@/models/managers/matrices/personalPatternMatrix'
-import strings from "@/utils/strings";
-import router from "@/router";
+import strings from '@/utils/strings'
+import router from '@/router'
export default {
namespaced: true,
@@ -23,7 +23,7 @@ export default {
data: {}
},
mutations: {
- storeData: (state, {name, value, server}) => {
+ storeData: (state, { name, value, server }) => {
// this server has not stored any data, thus there's no such object. create one
if (!state.data[server]) Vue.set(state.data, server, {})
@@ -36,27 +36,27 @@ export default {
})
},
clearData: (state) => {
- Vue.set(state, "data", {})
+ Vue.set(state, 'data', {})
}
},
actions: {
// eslint-disable-next-line
async fetch({commit}, refresh = false) {
- if (refresh) commit("clearData")
- itemsManager.refresh(refresh);
- stagesManager.refresh(refresh);
- zonesManager.refresh(refresh);
- globalMatrixManager.refresh(refresh);
- globalPatternMatrixManager.refresh(refresh);
- if (router.currentRoute.matched.find(el => el.name === "Stats") && store.getters["dataSource/source"] === "personal") {
- personalMatrixManager.refresh(refresh);
- personalPatternMatrixManager.refresh(refresh);
+ if (refresh) commit('clearData')
+ itemsManager.refresh(refresh)
+ stagesManager.refresh(refresh)
+ zonesManager.refresh(refresh)
+ globalMatrixManager.refresh(refresh)
+ globalPatternMatrixManager.refresh(refresh)
+ if (router.currentRoute.matched.find(el => el.name === 'Stats') && store.getters['dataSource/source'] === 'personal') {
+ personalMatrixManager.refresh(refresh)
+ personalPatternMatrixManager.refresh(refresh)
}
- trendsManager.refresh(refresh);
- periodManager.refresh(refresh);
- statsManager.refresh(refresh);
+ trendsManager.refresh(refresh)
+ periodManager.refresh(refresh)
+ statsManager.refresh(refresh)
},
- async refreshPersonalMatrix() {
+ async refreshPersonalMatrix () {
await Promise.all([
personalMatrixManager.refresh(true),
personalPatternMatrixManager.refresh(true)
@@ -64,23 +64,23 @@ export default {
}
},
getters: {
- byDataId: (state) => ({id, server = store.getters["dataSource/server"]}) => {
- if ("_shared" in state.data && id in state.data["_shared"]) return state.data["_shared"][id]
+ byDataId: (state) => ({ id, server = store.getters['dataSource/server'] }) => {
+ if ('_shared' in state.data && id in state.data._shared) return state.data._shared[id]
if (!(server in state.data) || !(id in state.data[server])) return {}
return state.data[server][id]
},
content: (_, getters) => (query) => {
- return getters.byDataId(query)["c"]
+ return getters.byDataId(query).c
},
updated: (_, getters) => (query) => {
- return getters.byDataId(query)["upd"]
+ return getters.byDataId(query).upd
},
stats: (state) => {
return {
size: strings.fileSize(JSON.stringify(state.data).length, true),
keys: Object.keys(state.data)
- };
+ }
}
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/dataSource.js b/src/store/modules/dataSource.js
index c8d6335f..f7c9f40d 100644
--- a/src/store/modules/dataSource.js
+++ b/src/store/modules/dataSource.js
@@ -4,18 +4,19 @@ export default {
/** current data source "global" | "personal" */
source: 'global',
/** current data source server "CN" | "US" | ... */
- server: "CN"
+ server: 'CN'
},
mutations: {
changeSource: (state, value) => {
- state.source = value;
+ state.source = value
},
changeServer: (state, value) => {
- state.server = value;
- },
+ state.server = value
+ }
},
getters: {
source: state => state.source,
server: state => state.server,
+ serverLocked: state => state.serverLocked
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/mirror.js b/src/store/modules/mirror.js
index a809865e..e74d47d0 100644
--- a/src/store/modules/mirror.js
+++ b/src/store/modules/mirror.js
@@ -5,15 +5,15 @@ export default {
ignoreNotification: false
},
mutations: {
- changePreference(state, newLocale) {
+ changePreference (state, newLocale) {
state.preference = newLocale
},
changeIgnoreNotification (state, newState) {
state.ignoreNotification = newState
- },
+ }
},
getters: {
preference: state => state.preference,
- ignoreNotification: state => state.ignoreNotification,
+ ignoreNotification: state => state.ignoreNotification
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/options.js b/src/store/modules/options.js
index 39ede458..dc065916 100644
--- a/src/store/modules/options.js
+++ b/src/store/modules/options.js
@@ -1,4 +1,4 @@
-import Vue from 'vue';
+import Vue from 'vue'
import config from '@/config'
export default {
@@ -7,7 +7,7 @@ export default {
dataTable: {
showPermanent: true,
showActivity: true,
- onlyOpen: false,
+ onlyOpen: false
},
randomBackground: Object.assign({}, {
last: Date.now(),
@@ -17,9 +17,9 @@ export default {
},
mutations: {
changeDataTable (state, value) {
- Vue.set(state, "dataTable", value)
+ Vue.set(state, 'dataTable', value)
},
- changeRandomBackground(state, {last, id}) {
+ changeRandomBackground (state, { last, id }) {
state.randomBackground.last = last
state.randomBackground.id = id
},
@@ -54,4 +54,4 @@ export default {
randomBackground: state => state.randomBackground,
userIdHistory: state => state.userIdHistory
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/planner.js b/src/store/modules/planner.js
index ecc5506f..16f68fc3 100644
--- a/src/store/modules/planner.js
+++ b/src/store/modules/planner.js
@@ -1,4 +1,4 @@
-import Vue from "vue";
+import Vue from 'vue'
export default {
namespaced: true,
@@ -7,13 +7,13 @@ export default {
options: {
byProduct: false,
requireExp: false,
- requireLmb: false,
+ requireLmb: false
// calculateStore: false
},
excludes: []
},
mutations: {
- changeItems(state, items) {
+ changeItems (state, items) {
state.items = items
},
changeOptions (state, options) {
@@ -23,11 +23,11 @@ export default {
state.excludes = excludes
},
clearExcludes (state) {
- Vue.set(state, "excludes", [])
+ Vue.set(state, 'excludes', [])
}
},
getters: {
config: state => state,
excludes: state => state.excludes
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js
index 228267a7..d5281dc8 100644
--- a/src/store/modules/settings.js
+++ b/src/store/modules/settings.js
@@ -1,29 +1,29 @@
-import Console from "@/utils/Console";
+import Console from '@/utils/Console'
export default {
namespaced: true,
state: {
- dark: "system",
+ dark: 'system',
language: null,
optimization: {
lowData: false
- },
+ }
},
mutations: {
- switchDark(state, newState) {
+ switchDark (state, newState) {
state.dark = newState
},
- changeLocale(state, newLocale) {
+ changeLocale (state, newLocale) {
state.language = newLocale
},
- changeOptimization (state, {type, value}) {
- if (!(type in state.optimization)) Console.warn("Store/Settings", "unknown optimization type", type)
+ changeOptimization (state, { type, value }) {
+ if (!(type in state.optimization)) Console.warn('Store/Settings', 'unknown optimization type', type)
state.optimization[type] = value
}
},
getters: {
language: state => state.language,
dark: state => state.dark,
- lowData: state => state.optimization.lowData,
+ lowData: state => state.optimization.lowData
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/stagePreferences.js b/src/store/modules/stagePreferences.js
index bb1a4c15..8b5e203e 100644
--- a/src/store/modules/stagePreferences.js
+++ b/src/store/modules/stagePreferences.js
@@ -1,4 +1,4 @@
-const MAX_HISTORY_RECORD_LENGTH = 30;
+const MAX_HISTORY_RECORD_LENGTH = 30
export default {
namespaced: true,
@@ -46,4 +46,4 @@ export default {
return state.favorites.includes(key)
}
}
-};
\ No newline at end of file
+}
diff --git a/src/store/modules/ui.js b/src/store/modules/ui.js
index 4bf2ae76..156a8af3 100644
--- a/src/store/modules/ui.js
+++ b/src/store/modules/ui.js
@@ -1,45 +1,49 @@
-import Vue from "vue"
+import Vue from 'vue'
export default {
namespaced: true,
state: {
snackbar: {
enabled: false,
- color: "",
+ color: '',
timeout: 0,
- text: "",
- icon: "",
+ text: '',
+ icon: '',
extra: {}
},
outdated: false,
- loadingRoute: ""
+ loadingRoute: '',
+ serverLocked: false,
},
mutations: {
- setSnackbar (state, {color, timeout, text, icon, extra}) {
- state.snackbar.enabled = false;
+ setSnackbar (state, { color, timeout, text, icon, extra }) {
+ state.snackbar.enabled = false
Vue.nextTick(() => {
- state.snackbar.enabled = true;
- state.snackbar.color = color;
- state.snackbar.timeout = timeout;
- state.snackbar.text = text;
- state.snackbar.icon = icon;
- state.snackbar.extra = extra;
+ state.snackbar.enabled = true
+ state.snackbar.color = color
+ state.snackbar.timeout = timeout
+ state.snackbar.text = text
+ state.snackbar.icon = icon
+ state.snackbar.extra = extra
})
},
setOutdated (state, value) {
state.outdated = value
},
setNotice (state, value) {
- Vue.set(state, "notice", value)
+ Vue.set(state, 'notice', value)
},
setLoadingRoute (state, value) {
state.loadingRoute = value
},
+ lockServer: state => state.serverLocked = true,
+ unlockServer: state => state.serverLocked = false,
},
getters: {
snackbar: state => state.snackbar,
outdated: state => state.outdated,
notice: state => state.notice,
loadingRoute: state => state.loadingRoute,
+ serverLocked: state => state.serverLocked,
}
-};
\ No newline at end of file
+}
diff --git a/src/styles/fonts.css b/src/styles/fonts.css
old mode 100755
new mode 100644
diff --git a/src/styles/global.css b/src/styles/global.css
index e20ba889..d7cee2ee 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -10,13 +10,20 @@
opacity: 0;
}
.theme--light.v-application {
- background: #fafafa !important;
+ background: #f5f5f5 !important;
}
.transition-all {
transition: all .225s cubic-bezier(0.165, 0.84, 0.44, 1);
}
+.opacity-hide {
+ opacity: 0;
+}
+.opacity-show {
+ opacity: 1;
+}
+
.transition-background {
transition: background .225s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@@ -71,7 +78,7 @@
}
.cursor-pointer {
- cursor: pointer;
+ cursor: pointer !important;
}
.cursor-default {
@@ -83,10 +90,10 @@
}
.transparentTable > .v-table__overflow > .v-table {
- background: transparent;
+ background: transparent !important;
}
.transparentTable {
- background: transparent;
+ background: transparent !important;
}
.line-height-wide {
@@ -166,7 +173,7 @@
.monospace {
font-family: "benderregular", SF Mono, "Droid Sans Mono", Ubuntu Mono, Consolas, Courier New, Courier, monospace !important;
- /*letter-spacing: .03rem;*/
+ letter-spacing: .03rem;
}
.monospace-pure {
@@ -745,4 +752,6 @@
display: none !important
}
-
+.full-width {
+ width: 100%;
+}
diff --git a/src/styles/modules.scss b/src/styles/modules.scss
index 6b45b072..1a50287e 100644
--- a/src/styles/modules.scss
+++ b/src/styles/modules.scss
@@ -44,4 +44,96 @@
background: linear-gradient(to right, rgba(200, 200, 200, 0), rgba(200, 200, 200, .8) .5rem, rgba(200, 200, 200, 0));
margin: 2rem -.5rem;
}
-}
\ No newline at end of file
+}
+
+.markdown-content-inline {
+ p {
+ margin-bottom: 0 !important;
+ }
+}
+
+.chip-label {
+ align-items: center;
+ display: inline-flex;
+ line-height: 20px;
+ max-width: 100%;
+ outline: none;
+ overflow: hidden;
+ padding: 0 9px 0 6px;
+ position: relative;
+ text-decoration: none;
+ vertical-align: middle;
+ white-space: nowrap;
+ font-size: 11px;
+ height: 20px;
+ border-radius: 4px;
+ background: #474747;
+ font-weight: bold;
+ color: #FFFFFF;
+ border: 1px solid rgba(255, 255, 255, 0.12);
+
+ .theme--light & {
+ border-color: rgba(0, 0, 0, 0.12);
+ background: #d7d7d7;
+ color: #323232
+ }
+
+ &--large {
+ font-size: 15px;
+ }
+}
+
+.list-style-none {
+ list-style: none;
+}
+
+.degraded-opacity {
+ opacity: 0.7;
+}
+
+.unknown-ratio-glow .v-image__image {
+ //box-shadow: inset 0 0 10px rgba(240, 240, 240, .4);
+ filter: drop-shadow(0 0 8px rgba(255, 255, 255, .12));
+
+ .theme--light & {
+ filter: drop-shadow(0 0 8px rgba(0, 0, 0, .12));
+ }
+}
+
+.border-outlined {
+ .theme--dark & {
+ border: thin solid;
+ border-color: hsla(0,0%,100%,.12) !important;
+ }
+ .theme--light & {
+ border: thin solid;
+ border-color: rgba(0,0,0,.12) !important;
+ }
+}
+
+.fallthrough {
+ user-select: none;
+ pointer-events: none;
+}
+
+.table--with-footer tbody {
+ tr:last-child {
+ & td {
+ border-top: thin solid rgba(0,0,0,.12) !important;
+ }
+
+ background: rgba(255, 255, 255, .12);
+ &:hover {
+ background: rgba(255, 255, 255, .12) !important;
+ }
+ .theme--light & {
+ background: rgba(0, 0, 0, .08);
+ &:hover {
+ background: rgba(0, 0, 0, .08) !important;
+ }
+ }
+ }
+ tr:nth-last-child(2) td {
+ border-bottom-width: 0 !important;
+ }
+}
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.ttf
new file mode 100644
index 00000000..271b11f5
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.ttf
new file mode 100644
index 00000000..a9d9b71f
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.ttf
new file mode 100644
index 00000000..d3e63c1a
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.ttf
new file mode 100644
index 00000000..7e8068ac
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.ttf
new file mode 100644
index 00000000..e967dd75
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.ttf
new file mode 100644
index 00000000..572bd7eb
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.ttf
new file mode 100644
index 00000000..d927e74c
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.ttf
new file mode 100644
index 00000000..600b81ec
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.ttf
new file mode 100644
index 00000000..ba6f4fbc
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.ttf
new file mode 100644
index 00000000..aec8753c
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.ttf
new file mode 100644
index 00000000..120dd685
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.ttf
new file mode 100644
index 00000000..7db21fa8
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.ttf
new file mode 100644
index 00000000..8cead8da
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.ttf
new file mode 100644
index 00000000..11f4f38b
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.ttf
new file mode 100644
index 00000000..a387bfea
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.ttf
new file mode 100644
index 00000000..9a869453
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.ttf
new file mode 100644
index 00000000..ea41cf16
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.ttf
new file mode 100644
index 00000000..b4cc855f
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.ttf
new file mode 100644
index 00000000..fc05a0e4
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.ttf
new file mode 100644
index 00000000..05b55e36
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.ttf b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.ttf
new file mode 100644
index 00000000..f00b776c
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.ttf
new file mode 100644
index 00000000..8da698d7
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.ttf
new file mode 100644
index 00000000..a679659d
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.ttf
new file mode 100644
index 00000000..8d19236a
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.ttf
new file mode 100644
index 00000000..e20448a9
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.ttf
new file mode 100644
index 00000000..0482219b
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.ttf
new file mode 100644
index 00000000..3e9047a1
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.ttf differ
diff --git a/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.ttf b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.ttf
new file mode 100644
index 00000000..4b72c255
Binary files /dev/null and b/src/templates/app/caches/roboto/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19-7DQk6YvNkeg.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19-7DQk6YvNkeg.ttf
new file mode 100644
index 00000000..44bd062d
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19-7DQk6YvNkeg.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-1927DQk6YvNkeg.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-1927DQk6YvNkeg.ttf
new file mode 100644
index 00000000..5f6603ea
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-1927DQk6YvNkeg.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-1967DQk6YvNkeg.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-1967DQk6YvNkeg.ttf
new file mode 100644
index 00000000..571e8eb1
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-1967DQk6YvNkeg.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19G7DQk6YvNkeg.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19G7DQk6YvNkeg.ttf
new file mode 100644
index 00000000..b93f80a1
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19G7DQk6YvNkeg.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19K7DQk6YvM.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19K7DQk6YvM.ttf
new file mode 100644
index 00000000..e075812d
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19K7DQk6YvM.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19a7DQk6YvNkeg.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19a7DQk6YvNkeg.ttf
new file mode 100644
index 00000000..b5d076f6
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19a7DQk6YvNkeg.ttf differ
diff --git a/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19y7DQk6YvNkeg.ttf b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19y7DQk6YvNkeg.ttf
new file mode 100644
index 00000000..55e81119
Binary files /dev/null and b/src/templates/app/caches/roboto/ieVl2ZhZI2eCN5jzbjEETS9weq8-19y7DQk6YvNkeg.ttf differ
diff --git a/src/templates/app/index.html b/src/templates/app/index.html
new file mode 100644
index 00000000..ed4abb11
--- /dev/null
+++ b/src/templates/app/index.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 企鹅物流数据统计
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/favicon/android-chrome-192x192.png b/src/templates/web/favicon/android-chrome-192x192.png
similarity index 100%
rename from public/favicon/android-chrome-192x192.png
rename to src/templates/web/favicon/android-chrome-192x192.png
diff --git a/public/favicon/android-chrome-512x512.png b/src/templates/web/favicon/android-chrome-512x512.png
similarity index 100%
rename from public/favicon/android-chrome-512x512.png
rename to src/templates/web/favicon/android-chrome-512x512.png
diff --git a/public/favicon/apple-touch-icon.png b/src/templates/web/favicon/apple-touch-icon.png
similarity index 100%
rename from public/favicon/apple-touch-icon.png
rename to src/templates/web/favicon/apple-touch-icon.png
diff --git a/public/favicon/favicon-16x16.png b/src/templates/web/favicon/favicon-16x16.png
similarity index 100%
rename from public/favicon/favicon-16x16.png
rename to src/templates/web/favicon/favicon-16x16.png
diff --git a/public/favicon/favicon-32x32.png b/src/templates/web/favicon/favicon-32x32.png
similarity index 100%
rename from public/favicon/favicon-32x32.png
rename to src/templates/web/favicon/favicon-32x32.png
diff --git a/public/favicon/mstile-150x150.png b/src/templates/web/favicon/mstile-150x150.png
similarity index 100%
rename from public/favicon/mstile-150x150.png
rename to src/templates/web/favicon/mstile-150x150.png
diff --git a/public/favicon/safari-pinned-tab.svg b/src/templates/web/favicon/safari-pinned-tab.svg
similarity index 100%
rename from public/favicon/safari-pinned-tab.svg
rename to src/templates/web/favicon/safari-pinned-tab.svg
diff --git a/src/templates/web/index.html b/src/templates/web/index.html
new file mode 100644
index 00000000..b5bbd1d8
--- /dev/null
+++ b/src/templates/web/index.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+ 企鹅物流数据统计
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 正在加载
+
+
+ 首次加载可能较慢,请耐心等待
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/opensearch.xml b/src/templates/web/opensearch.xml
similarity index 95%
rename from public/opensearch.xml
rename to src/templates/web/opensearch.xml
index 5673d588..5a520939 100644
--- a/public/opensearch.xml
+++ b/src/templates/web/opensearch.xml
@@ -9,7 +9,7 @@
https://penguin.upyun.galvincdn.com/logos/pack/favicon-16x16.png
Penguin Statistics
- Penguin Statistics Contributors 2020
+ Penguin Statistics Contributors 2021
false
UTF-8
diff --git a/src/templates/web/robots.txt b/src/templates/web/robots.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/public/under-deploy.html b/src/templates/web/under-deploy.html
similarity index 99%
rename from public/under-deploy.html
rename to src/templates/web/under-deploy.html
index 55bd6cf3..f750c31d 100644
--- a/public/under-deploy.html
+++ b/src/templates/web/under-deploy.html
@@ -1 +1 @@
-正在部署 | 企鹅物流数据统计部署进行中
新版本部署最多将持续5分钟
部署完成后页面将自动刷新。请耐心等待。
\ No newline at end of file
+正在部署 | 企鹅物流数据统计部署进行中
新版本部署最多将持续5分钟
部署完成后页面将自动刷新。请耐心等待。
\ No newline at end of file
diff --git a/src/templates/web/update-browser.html b/src/templates/web/update-browser.html
new file mode 100644
index 00000000..8f816611
--- /dev/null
+++ b/src/templates/web/update-browser.html
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+ 请升级你的浏览器
+
+
+
+
+
+
+
是时候升级你的浏览器了
+
很抱歉,但由于企鹅物流数据统计使用了 Vue.js 这样的 SPA (Single Page Application) Framework,诸多更新版本的网页 API 均需较新的浏览器支持。我们检测到你正在使用我们将不再支持的非常老旧的浏览器,这意味着在升级你的浏览器之前,你将无法访问此网站。
+
+
请注意:微软对 Windows XP 及旧版 Internet Explorer 的支持服务已终止
+
自 2016 年 1 月 12 日起,微软不再为 IE 11 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 微软对旧版 Internet Explorer 的支持服务已终止的说明 。
+
+
更先进的浏览器
+
推荐使用以下浏览器的最新版本。如果你的电脑已有以下浏览器的其中一个,请使用它浏览本站。
+
+
+
为什么会出现这个页面?
+
如果你不知道升级浏览器是什么意思,请请教一些熟练电脑操作的朋友。如果你使用的不是IE6/7/8/9/10,而是360浏览器、QQ浏览器、搜狗浏览器等,因对你的个人隐私、网页性能与无广告体验考量,我们也强烈建议你更换为上述三个浏览器的其中一个。
+
+
一起抵制 Internet Explorer
+
为了兼容这个曾经的浏览器霸主,我们需要做大量的代码工作。对于您而言,低版本 IE 更是一个岌岌可危的安全隐患,在 Windows 历史上几次大的木马病毒事件都是利用 IE 漏洞进行传播。所以,请和我们一起抵制 IE 的过期版本!
+
+
+
\ No newline at end of file
diff --git a/src/utils/Console.js b/src/utils/Console.js
index ad458f30..3d6c9c52 100644
--- a/src/utils/Console.js
+++ b/src/utils/Console.js
@@ -1,87 +1,93 @@
-import * as Sentry from "@sentry/browser";
-import environment from "@/utils/environment";
+import * as Sentry from '@sentry/browser'
+import environment from '@/utils/environment'
-function reportSentry(severity, component, contents) {
+function reportSentry (severity, component, contents) {
Sentry.withScope(scope => {
- scope.setFingerprint([component]);
- Sentry.captureMessage(contents.join(" "), severity)
+ scope.setFingerprint([component])
+ Sentry.captureMessage(contents.join(' '), severity)
})
}
const styleMap = {
debug: {
- background: "#424242",
- text: "#fff"
+ background: '#424242',
+ text: '#fff'
},
info: {
- background: "#1976D2",
- text: "#fff"
+ background: '#1976D2',
+ text: '#fff'
},
warn: {
- background: "#F57C00",
- text: "#fff"
+ background: '#F57C00',
+ text: '#fff'
},
error: {
- background: "#D32F2F",
- text: "#fff"
+ background: '#D32F2F',
+ text: '#fff'
},
fatal: {
- background: "#FFCCBC",
- text: "#f00"
+ background: '#FFCCBC',
+ text: '#f00'
},
log: {
- background: "#512DA8",
- text: "#fff"
+ background: '#512DA8',
+ text: '#fff'
}
}
class Console {
static debug (component, ...content) {
- this._render("debug", component, ...content)
+ this._render('debug', component, ...content)
}
+
static info (component, ...content) {
- this._render("info", component, ...content)
+ this._render('info', component, ...content)
}
+
static warn (component, ...content) {
- this._render("warn", component, ...content);
- reportSentry("warning", component, content)
+ this._render('warn', component, ...content)
+ reportSentry('warning', component, content)
}
+
static error (component, ...content) {
- this._render("error", component, ...content);
- reportSentry("error", component, content)
+ this._render('error', component, ...content)
+ reportSentry('error', component, content)
}
+
static fatal (component, ...content) {
- this._render("error", component, ...content);
- reportSentry("fatal", component, content)
+ this._render('error', component, ...content)
+ reportSentry('fatal', component, content)
}
+
static log (component, ...content) {
- this._render("log", component, ...content)
+ this._render('log', component, ...content)
}
+
/**
* @static
* @private
*/
static _render (level, component, ...content) {
- const PROD_IGNORE = ["debug"];
+ const PROD_IGNORE = ['debug']
if (
environment.production &&
(PROD_IGNORE.includes(level)) &&
!environment.debug.fullConsole
- ) return;
+ ) return
// const now = new Date();
// const date = `${now.getDate()} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}.${now.getMilliseconds()}`;
- let prefix;
+ let prefix
if (!environment.production || environment.debug.colorfulConsole) {
const styles = styleMap[level]
prefix = [
`%c${level}%c${component}`,
`background: ${styles.background}; color: ${styles.text}; padding: 2px 4px; border-radius: 4px; margin-right: 4px; font-weight: 900; font-size: 10px;`,
- "background: #673AB7; color: #fff; padding: 2px 4px; border-radius: 4px; font-weight: 700; font-size: 10px;"
- ];
+ 'background: #673AB7; color: #fff; padding: 2px 4px; border-radius: 4px; font-weight: 700; font-size: 10px;'
+ ]
} else {
- prefix = [`(${level})`, `[${component}]`];
+ prefix = [`(${level})`, `[${component}]`]
}
if (console[level]) {
@@ -92,4 +98,4 @@ class Console {
}
}
-export default Console
\ No newline at end of file
+export default Console
diff --git a/src/utils/ReconnectingWebSocket.js b/src/utils/ReconnectingWebSocket.js
index 41d4a91d..d7b0ac34 100644
--- a/src/utils/ReconnectingWebSocket.js
+++ b/src/utils/ReconnectingWebSocket.js
@@ -1,4 +1,4 @@
-import Console from "@/utils/Console";
+import Console from '@/utils/Console'
function noop () {}
diff --git a/src/utils/compressor.js b/src/utils/compressor.js
index 36f9d6b6..200057cb 100644
--- a/src/utils/compressor.js
+++ b/src/utils/compressor.js
@@ -1,10 +1,10 @@
-const pako = require("pako");
+const pako = require('pako')
export default {
compress (jsonData) {
return pako.deflate(
JSON.stringify(jsonData),
- {to: 'string'}
+ { to: 'string' }
)
},
decompress (compressed) {
@@ -13,4 +13,4 @@ export default {
{ to: 'string' }
)
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/environment.js b/src/utils/environment.js
index 231d6177..d43c4822 100644
--- a/src/utils/environment.js
+++ b/src/utils/environment.js
@@ -1,47 +1,79 @@
-const debugKey = "PENGUIN_STATS_DEBUG";
+import { Plugins } from '@capacitor/core'
+const { Device } = Plugins
-function getConfig() {
- return window && window[debugKey] || {}
+const debugKey = 'PENGUIN_STATS_DEBUG'
+
+function getConfig () {
+ return (window && window[debugKey]) || {}
}
-function boolean(key, rejectApp) {
+function boolean (key, rejectApp) {
// development & in-app: force true
// otherwise if specifically specified, use that value
// otherwise fallback to false
- if (rejectApp && PENGUIN_PLATFORM === "app") return false
- return process.env.NODE_ENV !== "production" || getConfig()[key] || false
+ if (rejectApp && PENGUIN_PLATFORM === 'app') return false
+ return process.env.NODE_ENV !== 'production' || getConfig()[key] || false
}
export default {
- get production () {return process.env.NODE_ENV === 'production'},
+ get device () {
+ return (async () => {
+ return {
+ info: await Device.getInfo(),
+ languageCode: await Device.getLanguageCode()
+ }
+ })()
+ },
+ get production () { return process.env.NODE_ENV === 'production' },
runtime: {
- get isApp () {return PENGUIN_PLATFORM === "app"},
+ get isApp () { return PENGUIN_PLATFORM === 'app' }
},
get isTouchScreen () {
- if (window.matchMedia) return window.matchMedia("(pointer: coarse)").matches
- return "ontouchstart" in window || window.navigator.maxTouchPoints > 0
+ if (window.matchMedia) return window.matchMedia('(pointer: coarse)').matches
+ return 'ontouchstart' in window || window.navigator.maxTouchPoints > 0
},
- get canHover() {
- if (window.matchMedia) return window.matchMedia("(any-hover)").matches
+ get canHover () {
+ if (window.matchMedia) return window.matchMedia('(any-hover)').matches
return !this.isTouchScreen
},
- get isWindows () {return navigator.platform.indexOf('Win') > -1},
+ get wasmSupport () {
+ try {
+ if (!(typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function")) return 'environment'
+
+ const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
+
+ if (!(
+ module instanceof WebAssembly.Module &&
+ new WebAssembly.Instance(module) instanceof WebAssembly.Instance
+ )) return 'notExecutable'
+
+ return true
+
+ } catch (e) {
+ return 'notExecutable'
+ }
+ },
+ get isWindows () { return navigator.platform.indexOf('Win') > -1 },
debug: {
- get performance() {return boolean("performance")},
- get devtools() {return boolean("devtools", true)},
- get colorfulConsole() {return boolean("colorfulConsole", true)},
- get fullConsole() {return boolean("fullConsole")},
- get frostnova() {return boolean("frostnova")}
- },
- get platform() {
- if (PENGUIN_PLATFORM === "web") return "web"
- if (PENGUIN_PLATFORM === "app") {
- if (window.$device && window.$device.info && window.$device.info.platform) return `app:${window.$device.info.platform}`
- return "web"
+ get performance () { return boolean('performance') },
+ get devtools () { return boolean('devtools') },
+ get colorfulConsole () { return boolean('colorfulConsole', true) },
+ get fullConsole () { return boolean('fullConsole') },
+ get frostnova () { return boolean('frostnova') }
+ },
+ get platform () {
+ if (PENGUIN_PLATFORM === 'app') {
+ return (async () => {
+ const device = await this.device
+ return `app:${device.info.platform}`
+ })()
}
- return "web"
+ return Promise.resolve('web')
},
- adapter({ prod, dev }) {
+ get isApp () {
+ return PENGUIN_PLATFORM === 'app'
+ },
+ adapter ({ prod, dev }) {
return this.production ? prod : dev
}
@@ -59,4 +91,4 @@ export default {
// return `https://${domain}/PenguinStats/api/v2`
// }
// }
-}
\ No newline at end of file
+}
diff --git a/src/utils/existUtils.js b/src/utils/existUtils.js
index 81efc390..513a93ed 100644
--- a/src/utils/existUtils.js
+++ b/src/utils/existUtils.js
@@ -1,21 +1,21 @@
-import store from "@/store"
+import store from '@/store'
export default {
- existence (object, parseTime = false, server = store.getters["dataSource/server"]) {
- let ext = object["existence"]
+ existence (object, parseTime = false, server = store.getters['dataSource/server']) {
+ let ext = object.existence
if (ext && ext[server]) {
ext = ext[server]
if (parseTime) {
- const now = Date.now();
+ const now = Date.now()
// Console.debug("Existence", "justifying data", object, ext, ext["openTime"] && ext["openTime"] > now, ext["closeTime"] && ext["closeTime"] < now)
- if (ext["openTime"] && ext["openTime"] > now) return false
- if (ext["closeTime"] && ext["closeTime"] < now) return false
+ if (ext.openTime && ext.openTime > now) return false
+ if (ext.closeTime && ext.closeTime < now) return false
}
- return ext["exist"]
+ return ext.exist
} else {
// partially parsed data
return true
}
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/formatter.js b/src/utils/formatter.js
index 06f8e683..050a0bc2 100644
--- a/src/utils/formatter.js
+++ b/src/utils/formatter.js
@@ -1,8 +1,8 @@
-import commaNumber from "comma-number";
+import commaNumber from 'comma-number'
export default {
thousandSeparator (value) {
if (value === null || value === undefined) return value
return commaNumber(value)
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/getters.js b/src/utils/getters.js
index 4b8d2ecc..81129ab1 100644
--- a/src/utils/getters.js
+++ b/src/utils/getters.js
@@ -1,20 +1,20 @@
import store from '@/store'
-import formatter from "@/utils/timeFormatter";
-import existUtils from "@/utils/existUtils";
+import formatter from '@/utils/timeFormatter'
+import existUtils from '@/utils/existUtils'
// import Console from "@/utils/Console";
-const Getters = {};
+const Getters = {}
Getters.items = {
_cache: null,
- validItemTypes: ["MATERIAL", "CARD_EXP", "CHIP", "FURN", "ACTIVITY_ITEM"],
- all(map = false, filter = true) {
- let items = store.getters["data/content"]({id: "items"});
+ validItemTypes: ['MATERIAL', 'CARD_EXP', 'CHIP', 'FURN', 'ACTIVITY_ITEM'],
+ all (map = false, filter = true) {
+ let items = store.getters['data/content']({ id: 'items' })
if (!items) return []
if (filter) {
items = items.filter(item => {
- return item["existence"][store.getters["dataSource/server"]]["exist"]
+ return item.existence[store.getters['dataSource/server']].exist
})
}
@@ -25,20 +25,20 @@ Getters.items = {
return items
}
},
- byItemId(itemId, ...options) {
- const got = this.all(...options);
- if (!got) return {};
+ byItemId (itemId, ...options) {
+ const got = this.all(...options)
+ if (!got) return {}
return got.find(el => el.itemId === itemId) || {}
},
byName (name, ...options) {
- const got = this.all(...options);
- if (!got) return {};
+ const got = this.all(...options)
+ if (!got) return {}
return got.find(el => el.name === name) || {}
},
byGroupId (groupId, ...options) {
if (!groupId) return []
- const got = this.all(...options);
- if (!got) return [];
+ const got = this.all(...options)
+ if (!got) return []
return got.filter(el => el.groupID === groupId) || []
}
}
@@ -53,12 +53,12 @@ Getters.items = {
Getters.statistics = {
base (filter) {
- const matrix = store.getters["data/content"]({id: `${store.getters["dataSource/source"]}Matrix`});
- if (!matrix) return null;
+ const matrix = store.getters['data/content']({ id: `${store.getters['dataSource/source']}Matrix` })
+ if (!matrix) return null
return matrix
.filter(filter)
.map(el => {
- const stage = Getters.stages.byStageId(el.stageId);
+ const stage = Getters.stages.byStageId(el.stageId)
const percentage = +(el.quantity / el.times).toFixed(5)
return {
...el,
@@ -68,9 +68,9 @@ Getters.statistics = {
apPPR: (stage.apCost / percentage).toFixed(2),
itemPerTime: (stage.minClearTime / percentage).toFixed(2)
}
- });
+ })
},
- byItemId(itemId) {
+ byItemId (itemId) {
const matrix = this.base(el => {
return el.itemId === itemId
})
@@ -81,9 +81,9 @@ Getters.statistics = {
...el,
zone: Getters.zones.byZoneId(el.stage.zoneId, false)
}
- });
+ })
},
- byStageId(stageId) {
+ byStageId (stageId) {
const matrix = this.base(el => {
return el.stageId === stageId
})
@@ -94,28 +94,28 @@ Getters.statistics = {
...el,
item: Getters.items.byItemId(el.itemId)
}
- });
+ })
}
}
Getters.patterns = {
base (filter) {
- const matrix = store.getters["data/content"]({id: `${store.getters["dataSource/source"]}PatternMatrix`});
- if (!matrix) return null;
+ const matrix = store.getters['data/content']({ id: `${store.getters['dataSource/source']}PatternMatrix` })
+ if (!matrix) return null
return matrix
.filter(filter)
.map(el => {
- const stage = Getters.stages.byStageId(el.stageId);
+ const stage = Getters.stages.byStageId(el.stageId)
const percentage = +(el.quantity / el.times).toFixed(5)
return {
...el,
stage,
percentage,
- percentageText: `${(percentage * 100).toFixed(2)}%`,
+ percentageText: `${(percentage * 100).toFixed(2)}%`
}
- });
+ })
},
- byStageId(stageId) {
+ byStageId (stageId) {
const matrix = this.base(el => {
return el.stageId === stageId
})
@@ -126,46 +126,63 @@ Getters.patterns = {
}
Getters.stages = {
- all() {
- let stages = store.getters["data/content"]({id: "stages"});
+ _cache: {
+ at: null,
+ c: null
+ },
+ all () {
+ const currStateTime = store.getters['data/updated']({ id: 'stages' })
+ if (this._cache) {
+ if (this._cache.at === currStateTime) return this._cache.c
+ }
+ const stages = store.getters['data/content']({ id: 'stages' })
+ this._cache = {
+ at: currStateTime,
+ c: stages
+ }
if (!stages) return []
return stages
},
- byStageId(stageId, options) {
+ byStageId (stageId, options) {
return this.all(options).find(el => {
return el.stageId === stageId
}) || {}
},
- byParentZoneId(zoneId, options) {
+ byParentZoneId (zoneId, options) {
return this.all(options).filter(el => {
return el.zoneId === zoneId
}) || {}
},
+ byStageCode (StageCode, options) {
+ return this.all(options).find(el => {
+ return el.code === StageCode
+ }) || {}
+ }
}
Getters.zones = {
- all(filter = true, parseTime = true) {
- let zones = store.getters["data/content"]({id: "zones"})
+ all (filter = true, parseTime = true) {
+ let zones = store.getters['data/content']({ id: 'zones' })
if (!zones) return []
- const server = store.getters["dataSource/server"]
+ const server = store.getters['dataSource/server']
if (filter) {
zones = zones.filter(el => existUtils.existence(el, parseTime))
}
zones = zones.slice().sort((a, b) => {
- return a["zoneIndex"] - b["zoneIndex"]
+ return a.zoneIndex - b.zoneIndex
}).map(el => {
- let toMerge = {}
+ const toMerge = {}
if (el.isActivity) {
- const existence = el["existence"][server]
+ const existence = el.existence[server]
- if (!existence["openTime"] && !existence["closeTime"]) {
+ if (!existence.openTime && !existence.closeTime) {
toMerge.isPermanentOpen = true
} else {
- toMerge.activityActiveTime = formatter.dates([existence["openTime"], existence["closeTime"]]);
- toMerge.timeValid = formatter.checkTimeValid(existence["openTime"], existence["closeTime"])
+ toMerge.activityActiveTime = formatter.dates([existence.openTime, existence.closeTime])
+ toMerge.timeValid = formatter.checkTimeValid(existence.openTime, existence.closeTime)
toMerge.isOutdated = toMerge.timeValid !== 0
}
}
@@ -176,72 +193,72 @@ Getters.zones = {
})
return zones
},
- byZoneId(zoneId, ...options) {
+ byZoneId (zoneId, ...options) {
return this.all(...options).find(el => {
return el.zoneId === zoneId
}) || {}
},
- byType(type, ...options) {
+ byType (type, ...options) {
return this.all(...options).filter(el => {
return el.type === type
- }) || {};
- },
+ }) || {}
+ }
}
Getters.trends = {
- byItemId(itemId) {
- let temp = {};
- let trends = this.all();
+ byItemId (itemId) {
+ const temp = {}
+ const trends = this.all()
if (trends) {
Object.keys(trends).map(key => {
// if stage contains item
if (
trends[key] &&
- trends[key]["results"] &&
- trends[key]["results"][itemId]
+ trends[key].results &&
+ trends[key].results[itemId]
) {
// create an obj in temp, keyed with stageId
- temp[key] = {};
+ temp[key] = {}
// only include the current item data in the object
- temp[key]["results"] = trends[key]["results"][itemId];
+ temp[key].results = trends[key].results[itemId]
// copy all other values
- temp[key]["startTime"] = trends[key]["startTime"];
+ temp[key].startTime = trends[key].startTime
}
- });
+ })
}
- return temp;
+ return temp
},
- byStageId(stageId) {
+ byStageId (stageId) {
// data has been already keyed with stageId. Just get it ;)
- return this.all() && this.all()[stageId];
+ return this.all() && this.all()[stageId]
},
- all() {
+ all () {
// when data source is not global, it is unable to get the trend
// (trend of personalMatrix is not supported)
if (store.getters['dataSource/source'] !== 'global') {
- return {};
+ return {}
}
// otherwise just return it
- return store.getters["data/content"]({id: "trends"}) || {}
+ return store.getters['data/content']({ id: 'trends' }) || {}
}
}
Getters.period = {
- all(server) {
- const period = store.getters["data/content"]({id: "period"})
+ all (server) {
+ const period = store.getters['data/content']({ id: 'period' })
if (!period) return []
return period.filter(el => existUtils.existence(el, false, server))
- },
+ }
}
Getters.siteStats = {
all () {
- return store.getters["data/content"]({id: "stats"})
+ return store.getters['data/content']({ id: 'stats' })
},
- byKey(key) {
+ byKey (key) {
return this.all()[key].map(el => Object.assign({}, el)).map(el => {
- el.stage = Getters.stages.byStageId(el.stageId);
- el.zone = Getters.zones.byZoneId(el.stage.zoneId, false);
+ el.stage = Getters.stages.byStageId(el.stageId)
+ el.zone = Getters.zones.byZoneId(el.stage.zoneId, false)
return el
})
}
diff --git a/src/utils/helmet.js b/src/utils/helmet.js
new file mode 100644
index 00000000..39590ced
--- /dev/null
+++ b/src/utils/helmet.js
@@ -0,0 +1,11 @@
+import i18n from '@/i18n'
+
+export default {
+ title: {
+ update ({ matched }) {
+ const titles = matched.map(el => i18n.t(el.meta.i18n))
+ titles.reverse()
+ document.title = `${titles.join(' ‹ ')} │ ${i18n.t('app.name')}`
+ }
+ }
+}
diff --git a/src/utils/humans.js b/src/utils/humans.js
index 0e1c0e34..a09a011a 100644
--- a/src/utils/humans.js
+++ b/src/utils/humans.js
@@ -1,7 +1,7 @@
import qs from 'qs'
-import mirror from "@/utils/mirror";
+import mirror from '@/utils/mirror'
-function paramUrl(base, queryParams) {
+function paramUrl (base, queryParams) {
let url
if (queryParams) {
url = `${base}?${qs.stringify(queryParams)}`
@@ -13,135 +13,143 @@ function paramUrl(base, queryParams) {
const socials = [
{
- "id": "twitter",
- "name": "Twitter",
- "icon": "mdi-twitter",
- "color": "#1DA1F2",
+ id: 'twitter',
+ name: 'Twitter',
+ icon: 'mdi-twitter',
+ color: '#1DA1F2',
canShare: !mirror.cn.isCurrent(),
- share({text, url}) {
- return paramUrl('https://twitter.com/intent/tweet', {text, url})
+ share ({ text, url }) {
+ return paramUrl('https://twitter.com/intent/tweet', { text, url })
}
},
{
- "id": "facebook",
- "name": "Facebook",
- "icon": "mdi-facebook",
- "color": "#1877F2",
+ id: 'facebook',
+ name: 'Facebook',
+ icon: 'mdi-facebook',
+ color: '#1877F2',
canShare: !mirror.cn.isCurrent(),
- share({text, url}) {
- return paramUrl('https://www.facebook.com/sharer.php', {t: text, u: url})
+ share ({ text, url }) {
+ return paramUrl('https://www.facebook.com/sharer.php', { t: text, u: url })
}
},
{
- "id": "weibo",
- "name": "Weibo",
- "icon": "mdi-sina-weibo",
- "color": "#E6162D",
+ id: 'weibo',
+ name: 'Weibo',
+ icon: 'mdi-sina-weibo',
+ color: '#E6162D',
canShare: true,
- share({text: title, url}) {
- return paramUrl('http://service.weibo.com/share/share.php', {title, url})
+ share ({ text: title, url }) {
+ return paramUrl('http://service.weibo.com/share/share.php', { title, url })
}
},
{
- "id": "github",
- "name": "GitHub",
- "icon": "mdi-github-circle",
- "color": "#181717",
- "canShare": false
+ id: 'github',
+ name: 'GitHub',
+ icon: 'mdi-github-circle',
+ color: '#181717',
+ canShare: false
},
{
- "id": "qq",
- "name": "QQ",
- "icon": "mdi-qqchat",
- "color": "#51b6ef",
- "canShare": false,
+ id: 'qq',
+ name: 'QQ',
+ icon: 'mdi-qqchat',
+ color: '#51b6ef',
+ canShare: false
// share({url}) {
// return paramUrl('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey', {url})
// }
},
{
- "id": "reddit",
- "name": "Reddit",
- "icon": "mdi-reddit",
- "color": "#FF4500",
- "canShare": true,
- share({text: title, url}) {
- return paramUrl('https://reddit.com/submit', {title, url})
+ id: 'reddit',
+ name: 'Reddit',
+ icon: 'mdi-reddit',
+ color: '#FF4500',
+ canShare: true,
+ share ({ text: title, url }) {
+ return paramUrl('https://reddit.com/submit', { title, url })
}
},
{
- "id": "email",
- "name": "Email",
- "icon": "mdi-email",
- "canShare": false
+ id: 'email',
+ name: 'Email',
+ icon: 'mdi-email',
+ canShare: false
}
]
const responsibilities = {
v1frontend: {
- id: "v1frontend",
- icon: "mdi-penguin"
+ id: 'v1frontend',
+ icon: 'mdi-penguin'
},
frontend: {
- id: "frontend",
- icon: "mdi-desktop-mac"
+ id: 'frontend',
+ icon: 'mdi-desktop-mac'
},
backend: {
- id: "backend",
- icon: "mdi-code-tags"
+ id: 'backend',
+ icon: 'mdi-code-tags'
},
maintenance: {
- id: "maintenance",
- icon: "mdi-hammer-screwdriver"
+ id: 'maintenance',
+ icon: 'mdi-hammer-screwdriver'
},
statistics: {
- id: "statistics",
- icon: "mdi-chart-areaspline"
+ id: 'statistics',
+ icon: 'mdi-chart-areaspline'
},
arkplanner: {
- id: "arkplanner",
- icon: "mdi-directions-fork"
+ id: 'arkplanner',
+ icon: 'mdi-directions-fork'
},
bulkupload: {
- id: "bulkupload",
- icon: "mdi-upload-multiple"
+ id: 'bulkupload',
+ icon: 'mdi-upload-multiple'
},
customersupport: {
- id: "customersupport",
- icon: "mdi-message-bulleted"
+ id: 'customersupport',
+ icon: 'mdi-message-bulleted'
},
logo: {
- id: "logo",
- icon: "mdi-drawing"
+ id: 'logo',
+ icon: 'mdi-drawing'
},
materials: {
- id: "materials",
- icon: "mdi-folder-image"
+ id: 'materials',
+ icon: 'mdi-folder-image'
},
localization: {
en: {
- id: "localization_en",
- icon: "mdi-alphabet-latin"
+ id: 'localization_en',
+ icon: 'mdi-alphabet-latin'
},
ja: {
- id: "localization_ja",
- icon: "mdi-syllabary-hiragana"
+ id: 'localization_ja',
+ icon: 'mdi-syllabary-hiragana'
},
ko: {
- id: "localization_ko",
- icon: "mdi-syllabary-hangul"
- },
+ id: 'localization_ko',
+ icon: 'mdi-syllabary-hangul'
+ }
},
widget: {
- id: "widget",
- icon: "mdi-widgets"
+ id: 'widget',
+ icon: 'mdi-widgets'
},
+ native: {
+ id: 'native',
+ icon: 'mdi-devices'
+ },
+ recognition: {
+ id: 'recognition',
+ icon: 'mdi-image-filter-center-focus'
+ }
}
export default {
socials,
- getSocial(id) {
+ getSocial (id) {
return socials.find(v => v.id === id)
},
responsibilities
-}
\ No newline at end of file
+}
diff --git a/src/utils/marshaller.js b/src/utils/marshaller.js
index 55f7e3bc..aba883b9 100644
--- a/src/utils/marshaller.js
+++ b/src/utils/marshaller.js
@@ -1,55 +1,56 @@
-import store from "@/store";
+import store from '@/store'
+import supports from '@/models/supports'
export default {
planner: {
- config ({items, options, excludes}) {
- const sanitizedItems = [];
+ config ({ items, options, excludes }) {
+ const sanitizedItems = []
for (const item of items.filter(el => el.need || el.have)) {
const current = {
id: item.id
- };
+ }
if (item.have) current.have = item.have
if (item.need) current.need = item.need
sanitizedItems.push(current)
}
return {
- "@type": "@penguin-statistics/planner/config",
+ '@type': '@penguin-statistics/planner/config',
items: sanitizedItems,
options,
excludes
}
},
- plan ({items, options, excludes}) {
+ plan ({ items, options, excludes }) {
const body = {
required: {},
owned: {},
extra_outc: options.byProduct,
exp_demand: options.requireExp,
gold_demand: options.requireLmb,
- input_lang: "id",
- output_lang: "id",
- server: store.getters["dataSource/server"]
- };
+ input_lang: 'id',
+ output_lang: 'id',
+ server: store.getters['dataSource/server']
+ }
items.forEach(el => {
- if (el.need) body.required[el.id] = el.need;
- if (el.have) body.owned[el.id] = el.have;
- });
+ if (el.need) body.required[el.id] = el.need
+ if (el.have) body.owned[el.id] = el.have
+ })
if (excludes.length > 0) {
- body["exclude"] = excludes
+ body.exclude = excludes
}
return body
}
},
- advancedQuery(queries) {
+ advancedQuery (queries) {
const marshalled = []
for (const query of queries) {
- let start;
- let end;
+ let start
+ let end
if (query.timeRange && query.timeRange[0]) start = new Date(query.timeRange[0]).getTime()
if (query.timeRange && query.timeRange[1]) end = new Date(query.timeRange[1]).getTime()
@@ -58,15 +59,25 @@ export default {
stageId: query.stage,
itemIds: query.item,
server: query.server,
- isPersonal: query.source === "personal",
+ isPersonal: query.source === 'personal',
start,
end
}
- if (query.type === "trend") marshalledQuery["interval"] = query["interval"]
+ if (query.type === 'trend') marshalledQuery.interval = query.interval
marshalled.push(marshalledQuery)
}
- return {queries: marshalled}
+ return { queries: marshalled }
+ },
+ pushPreferences (preferences) {
+ const marshalled = []
+ for (const preference of preferences) {
+ marshalled.push({
+ ...preference,
+ locale: supports.localizations.find(el => el.value === preference.locale).push
+ })
+ }
+ return marshalled
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/mirror.js b/src/utils/mirror.js
index 240b3a85..e872897f 100644
--- a/src/utils/mirror.js
+++ b/src/utils/mirror.js
@@ -1,33 +1,42 @@
-import extractDomain from "extract-domain";
+import extractDomain from 'extract-domain'
+import config from "@/config";
-function isDomain(domain, location = window.location.href) {
+function isDomain (domain, location = window.location.href) {
return extractDomain(location) === domain
}
const mirror = {
global: {
- identifier: "penguin-stats.io",
+ identifier: 'penguin-stats.io',
isCurrent () {
return isDomain(this.identifier)
}
},
cn: {
- identifier: "penguin-stats.cn",
+ identifier: 'penguin-stats.cn',
isCurrent () {
return isDomain(this.identifier)
}
},
vercel: {
- identifier: "vercel.app",
+ identifier: 'vercel.app',
isCurrent () {
- return isDomain("now.sh") || isDomain("vercel.app")
+ return isDomain('now.sh') || isDomain('vercel.app')
}
}
}
-mirror.adapter = function ({cn, io}) {
+mirror.adapter = function ({ cn, io }) {
if (mirror.cn.isCurrent()) return cn
return io
}
+mirror.deliver = function (path) {
+ if (mirror.global.isCurrent()) {
+ return config.cdn.global + path
+ } else {
+ return config.cdn.cn + path
+ }
+}
+
export default mirror
diff --git a/src/utils/native/device.js b/src/utils/native/device.js
index 4b0daf88..edda45bb 100644
--- a/src/utils/native/device.js
+++ b/src/utils/native/device.js
@@ -1,9 +1,9 @@
-import { Plugins } from '@capacitor/core';
-const { Device } = Plugins;
+import { Plugins } from '@capacitor/core'
+const { Device } = Plugins
let deviceInfoCache = null
-function getDeviceInfo() {
+function getDeviceInfo () {
if (!deviceInfoCache) deviceInfoCache = Device.getInfo()
return deviceInfoCache
}
@@ -25,6 +25,6 @@ export default {
},
isWeb () {
return this.is('web')
- },
+ }
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/native/haptics.js b/src/utils/native/haptics.js
index 1378e946..e9a1d0b9 100644
--- a/src/utils/native/haptics.js
+++ b/src/utils/native/haptics.js
@@ -1,12 +1,12 @@
import {
Plugins,
HapticsImpactStyle, HapticsNotificationType, Capacitor
-} from '@capacitor/core';
-import Console from "@/utils/Console";
+} from '@capacitor/core'
+import Console from '@/utils/Console'
-const { Haptics, PenguinPlugin } = Plugins;
+const { Haptics, PenguinPlugin } = Plugins
-function invoke(method, ...args) {
+function invoke (method, ...args) {
if (Capacitor.isPluginAvailable('Haptics')) {
Console.info('Haptics', 'invoking haptics', method, args)
Haptics[method](...args)
@@ -15,40 +15,40 @@ function invoke(method, ...args) {
}
export default {
- light() {
+ light () {
invoke('impact', {
style: HapticsImpactStyle.Heavy
})
},
- error() {
+ error () {
invoke('notification', {
style: HapticsNotificationType.ERROR
})
},
- warning() {
+ warning () {
invoke('notification', {
style: HapticsNotificationType.WARNING
})
},
- success() {
+ success () {
invoke('notification', {
style: HapticsNotificationType.SUCCESS
})
},
- general() {
+ general () {
if (Capacitor.isPluginAvailable('PenguinPlugin')) {
PenguinPlugin.hapticsGeneral()
}
},
- notification(type) {
+ notification (type) {
invoke('notification', type)
},
- impact(style) {
+ impact (style) {
invoke('impact', style)
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/native/penguin.js b/src/utils/native/penguin.js
new file mode 100644
index 00000000..b019c1f3
--- /dev/null
+++ b/src/utils/native/penguin.js
@@ -0,0 +1,30 @@
+import {
+ Plugins,
+ Capacitor
+} from '@capacitor/core'
+import Console from '@/utils/Console'
+
+const { PenguinPlugin } = Plugins
+
+function invoke (method, ...args) {
+ if (Capacitor.isPluginAvailable('PenguinPlugin')) {
+ Console.info('PenguinPlugin', 'invoking PenguinPlugin with', method, args)
+ return PenguinPlugin[method](...args)
+ .catch(e => Console.warn('PenguinPlugin', 'failed to invoke', e))
+ } else {
+ Console.info('PenguinPlugin', 'cancelled invoking PenguinPlugin with', method, args, 'plugin unavailable under current platform')
+ return Promise.reject(new Error('PenguinPlugin does not exist under current platform'))
+ }
+}
+
+export default {
+ openBundleSettings () {
+ return invoke('openBundleSettings')
+ },
+ getLastSyncedPushPreferences () {
+ return invoke('getLastSyncedPushPreferences')
+ },
+ submitNewPushPreferences (preferences) {
+ return invoke('submitNewPushPreferences', { preferences })
+ }
+}
diff --git a/src/utils/native/share.js b/src/utils/native/share.js
index 08b44fd7..6afbf09d 100644
--- a/src/utils/native/share.js
+++ b/src/utils/native/share.js
@@ -1,6 +1,6 @@
-import { Plugins } from '@capacitor/core';
-const { Share } = Plugins;
+import { Plugins } from '@capacitor/core'
+const { Share } = Plugins
export default function (content) {
return Share.share(content)
-}
\ No newline at end of file
+}
diff --git a/src/utils/objectManager.js b/src/utils/objectManager.js
index 225966a6..ee36db1e 100644
--- a/src/utils/objectManager.js
+++ b/src/utils/objectManager.js
@@ -1,6 +1,6 @@
-import {service} from '@/utils/service'
+import { service } from '@/utils/service'
import store from '@/store'
-import Console from "@/utils/Console";
+import Console from '@/utils/Console'
/**
* Object Life-cycle manager
@@ -15,13 +15,13 @@ class ObjectManager {
* @param {number} ttl time-to-live (TTL), in milliseconds
* @param {Object} ajaxHooks the first function will be called before sending the request, and the second function will be called after done receiving the request, with the request Promise as the argument
*/
- constructor({ name, api, transform, validator, ttl, ajaxHooks}) {
- this.name = name;
- this.api = api;
- this.transform = transform ? [...transform, o => o] : [o => o];
- this.validator = validator ? validator : () => true;
- this.ttl = ttl;
- this.ajaxHooks = ajaxHooks;
+ constructor ({ name, api, transform, validator, ttl, ajaxHooks }) {
+ this.name = name
+ this.api = api
+ this.transform = transform ? [...transform, o => o] : [o => o]
+ this.validator = validator || (() => true)
+ this.ttl = ttl
+ this.ajaxHooks = ajaxHooks
}
// private methods
@@ -34,16 +34,16 @@ class ObjectManager {
* @returns {Object} the transformed object
*/
_transform (data) {
- let context = this;
- let current = data; // the current transform result
- for (let func of context.transform) {
+ const context = this
+ let current = data // the current transform result
+ for (const func of context.transform) {
current = func(current) // transform the object by calling the function and refresh its result
}
return current
}
get server () {
- return store.getters["dataSource/server"]
+ return store.getters['dataSource/server']
}
/**
@@ -51,26 +51,26 @@ class ObjectManager {
*
* @returns {boolean} validity of the current cache
*/
- get cacheValid() {
- let cacheUpdateAt = store.getters['data/updated']({
+ get cacheValid () {
+ const cacheUpdateAt = store.getters['data/updated']({
id: this.name,
- server: this.api.serverSensitive ? this.server : "_shared"
+ server: this.api.serverSensitive ? this.server : '_shared'
})
- Console.debug("ObjectManager", "cache status of id:",
+ Console.debug('ObjectManager', 'cache status of id:',
this.name,
- "serverSensitive:",
+ 'serverSensitive:',
this.api.serverSensitive,
- "server:",
+ 'server:',
this.server,
- "valid:",
+ 'valid:',
cacheUpdateAt + this.ttl > Date.now(),
- "updated:",
+ 'updated:',
cacheUpdateAt,
- "ttl:",
+ 'ttl:',
this.ttl,
- "timeNow:",
+ 'timeNow:',
Date.now()
- );
+ )
return cacheUpdateAt + this.ttl > Date.now()
}
@@ -85,8 +85,8 @@ class ObjectManager {
}
return {
- method: "GET",
- url,
+ method: 'GET',
+ url
// params: {
// ...this.api.extraParams
// }
@@ -94,11 +94,11 @@ class ObjectManager {
}
_updateData (value) {
- return store.commit("data/storeData", {
+ return store.commit('data/storeData', {
name: this.name,
value: value,
- server: this.api.serverSensitive ? this.server : "_shared"
- });
+ server: this.api.serverSensitive ? this.server : '_shared'
+ })
}
/**
@@ -109,54 +109,54 @@ class ObjectManager {
* @param {boolean} forced equals true can skip tll check
* @returns {Promise} the promise that resolves when refresh completed
*/
- async refresh(forced = false) {
- const context = this;
+ async refresh (forced = false) {
+ const context = this
// Console.debug("ObjectManager",
// `${context.name}: requireAuthorization ${context.api.requireAuthorization}, authorized ${store.getters["auth/loggedIn"]}`)
- if (context.api.requireAuthorization && !store.getters["auth/loggedIn"]) {
- Console.info("ObjectManager",
+ if (context.api.requireAuthorization && !store.getters['auth/loggedIn']) {
+ Console.info('ObjectManager',
`skipped fetching ${context.name} due to requireAuthorization and !authorized.`)
return this._updateData([])
}
if (!forced && context.cacheValid) {
// valid cache
- Console.debug("ObjectManager", "cache: valid. id:",
+ Console.debug('ObjectManager', 'cache: valid. id:',
this.name,
- "server:",
+ 'server:',
this.server
- );
- return Promise.resolve();
+ )
+ return Promise.resolve()
} else {
// outdated cache, fetch api
- context.ajaxHooks.request(context.name);
- Console.debug("ObjectManager", `cache: invalid, fetching api. reason:`,
+ context.ajaxHooks.request(context.name)
+ Console.debug('ObjectManager', 'cache: invalid, fetching api. reason:',
forced ? '[Force Refresh]' : '[Cache Outdated]',
- "id:",
+ 'id:',
context.name,
- "server:",
+ 'server:',
context.server,
- "apiConfig:",
+ 'apiConfig:',
context.apiConfig
- );
+ )
const promise = new Promise((resolve, reject) => {
service(context.apiConfig)
.then(({ data }) => {
- data = context._transform(data);
+ data = context._transform(data)
- const validatorResponse = context.validator(data);
+ const validatorResponse = context.validator(data)
if (validatorResponse !== true) {
- return reject({
+ return reject(new Error({
errorMessage: `Invalid structure: ${validatorResponse}`
- })
+ }))
}
this._updateData(data)
- Console.info("ObjectManager", `fetched data "${context.name}" at ${Date.now()} for server "${context.server}"`);
+ Console.info('ObjectManager', `fetched data "${context.name}" at ${Date.now()} for server "${context.server}"`)
resolve(data)
})
@@ -165,11 +165,10 @@ class ObjectManager {
})
})
- context.ajaxHooks.response(context.name, promise);
- return promise;
+ context.ajaxHooks.response(context.name, promise)
+ return promise
}
}
}
-
export default ObjectManager
diff --git a/src/utils/performance.js b/src/utils/performance.js
index 5a1baa24..eaa84461 100644
--- a/src/utils/performance.js
+++ b/src/utils/performance.js
@@ -20,4 +20,4 @@ export default {
})
}
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/probe.js b/src/utils/probe.js
index fa125d3c..ea8f23ca 100644
--- a/src/utils/probe.js
+++ b/src/utils/probe.js
@@ -1,23 +1,23 @@
-import ReconnectingWebSocket from "@/utils/ReconnectingWebSocket"
-import config from "@/config";
+import ReconnectingWebSocket from '@/utils/ReconnectingWebSocket'
+import config from '@/config'
import qs from 'qs'
import pe from '@/models/probe/probeevents'
-import environment from "@/utils/environment"
-import Console from "@/utils/Console"
+import environment from '@/utils/environment'
+import Console from '@/utils/Console'
import store from '@/store'
-import i18n from "@/i18n";
+import i18n from '@/i18n'
function randomString (length) {
- let result = '';
- const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- const charactersLength = characters.length;
+ let result = ''
+ const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
+ const charactersLength = characters.length
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength))
}
return result
}
-function properlySupportedWebSocket() {
+function properlySupportedWebSocket () {
if (!('ArrayBuffer' in window)) return false
try {
@@ -25,13 +25,12 @@ function properlySupportedWebSocket() {
// eslint-disable-next-line no-empty
} catch (e) {}
- const protocol = 'https:' === window.location.protocol ? 'wss' : 'ws'
- let protoBin
+ const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
- protoBin = 'binaryType' in WebSocket.prototype
+ const protoBin = 'binaryType' in WebSocket.prototype
if (protoBin) return protoBin
try {
- return !!(new WebSocket(protocol + '://.').binaryType);
+ return !!(new WebSocket(protocol + '://.').binaryType)
// eslint-disable-next-line no-empty
} catch (e) {}
@@ -39,7 +38,8 @@ function properlySupportedWebSocket() {
}
class FakeTransport {
- send() {}
+ constructor() {}
+ send () {}
}
class PenguinProbe {
@@ -51,24 +51,32 @@ class PenguinProbe {
probeUid = store.getters['auth/probeUid']
}
- const platform = environment.platform
+ if (environment.production) {
+ this.initiate(probeUid.c)
+ .catch(err => {
+ Console.warn('Probe', 'failed to initialize transport', err)
+ this.transport = new FakeTransport()
+ })
+ } else {
+ this.transport = new FakeTransport()
+ }
+ }
+
+ async initiate (probeUid) {
+ const platform = await environment.platform
const queries = qs.stringify({
v: config.version,
p: platform,
- u: probeUid.c,
+ u: probeUid,
r: window.location.pathname
})
- this.initiate(queries)
- }
-
- initiate(queries) {
const endpoint = environment.adapter(config.probe.endpoint)
if (!properlySupportedWebSocket()) {
Console.info('ProbeTransport', 'client does not support binary websocket. sending pv and quit')
- new Image().src = `${endpoint.legacy}?` + queries + `&l=1`
+ new Image().src = `${endpoint.legacy}?` + queries + '&l=1'
this.transport = new FakeTransport()
return
}
@@ -140,7 +148,7 @@ class PenguinProbe {
this.transport.send(pe.PenguinProbe.Navigated.encode(message).finish())
}
- reportEnteredSearchResult ({stageId, itemId, query, position}) {
+ reportEnteredSearchResult ({ stageId, itemId, query, position }) {
const message = pe.PenguinProbe.EnteredSearchResult.create({
meta: this.buildMeta(pe.PenguinProbe.MessageType.ENTERED_SEARCH_RESULT),
stageId,
@@ -151,7 +159,7 @@ class PenguinProbe {
this.transport.send(pe.PenguinProbe.EnteredSearchResult.encode(message).finish())
}
- reportExecutedAdvancedQuery ({queries}) {
+ reportExecutedAdvancedQuery ({ queries }) {
const marshalledQueries = []
for (const query of queries) {
marshalledQueries.push(pe.PenguinProbe.ExecutedAdvancedQuery.AdvancedQuery.create(query))
diff --git a/src/utils/randomUtils.js b/src/utils/randomUtils.js
index 5e24c4dc..a2f8ba3a 100644
--- a/src/utils/randomUtils.js
+++ b/src/utils/randomUtils.js
@@ -1,13 +1,13 @@
import config from '@/config'
import store from '@/store'
-import timeFormatter from "@/utils/timeFormatter";
-import Console from "@/utils/Console";
+import timeFormatter from '@/utils/timeFormatter'
+import Console from '@/utils/Console'
-function randomInt(max) {
- return Math.floor(Math.random() * (Math.floor(max) + 1));
+function randomInt (max) {
+ return Math.floor(Math.random() * (Math.floor(max) + 1))
}
-function randomFromArray(arr) {
+function randomFromArray (arr) {
return arr[randomInt(arr.length - 1)]
}
@@ -18,17 +18,17 @@ export default {
return randomInt(config.randomBackground.max)
},
get () {
- const already = store.getters["options/randomBackground"];
+ const already = store.getters['options/randomBackground']
// if not current day
- if (!timeFormatter.dayjs(already.last).isSame(timeFormatter.dayjs(), "day")) {
- Console.debug("CachedRandom", "time reached. clearing cachedRandom cache")
- store.commit("options/clearRandomBackground")
+ if (!timeFormatter.dayjs(already.last).isSame(timeFormatter.dayjs(), 'day')) {
+ Console.debug('CachedRandom', 'time reached. clearing cachedRandom cache')
+ store.commit('options/clearRandomBackground')
}
if (already.id.length < this.limit) {
const id = this._getNewId()
- Console.debug("CachedRandom", "limit NOT reached. new random", id, already.id)
- store.commit("options/changeRandomBackground", {
+ Console.debug('CachedRandom', 'limit NOT reached. new random', id, already.id)
+ store.commit('options/changeRandomBackground', {
last: already.last,
id: [...already.id, id]
})
@@ -42,4 +42,4 @@ export default {
},
randomInt,
randomFromArray
-}
\ No newline at end of file
+}
diff --git a/src/utils/recognizer.js b/src/utils/recognizer.js
new file mode 100644
index 00000000..d50368af
--- /dev/null
+++ b/src/utils/recognizer.js
@@ -0,0 +1,236 @@
+import charHash from '@/models/recognition/charHash'
+import store from '@/store'
+import JSZip from 'jszip'
+import uniq from 'lodash/uniq'
+import Console from "@/utils/Console";
+import strings from "@/utils/strings";
+import ReportValidator from "@/utils/reportValidator";
+import get from '@/utils/getters'
+import existUtils from "@/utils/existUtils";
+import mirror from "@/utils/mirror";
+
+const recognizerVersion = 'v3.2.2-1'
+
+async function image2wasmHeapOffset (blob) {
+ const Module = window.Module
+ const imageData = await blob.arrayBuffer()
+ const uint8 = new Uint8Array(imageData)
+ const numBytes = uint8.length
+ const dataPtr = Module._malloc(numBytes * Uint8Array.BYTES_PER_ELEMENT)
+ const dataOnHeap = new Uint8Array(Module.HEAPU8.buffer, dataPtr, numBytes)
+ dataOnHeap.set(uint8)
+
+ return {
+ offset: dataPtr,
+ length: numBytes,
+ blobUrl: URL.createObjectURL(blob)
+ }
+}
+
+function safeParseJson (s) {
+ const result = JSON.parse(s)
+ if (result === undefined || result === null || Array.isArray(result)) throw new TypeError("Unexpected result type: " + typeof s)
+ return result
+}
+
+class Recognizer {
+ async initialize (server) {
+ // console.groupCollapsed('Initialization')
+
+ // Lazy load of recognize.js and recognize.wasm
+ if (window.Module) {
+ Console.info('Recognizer', 'init: recognition backend: both js and wasm are already loaded')
+ } else {
+ const script = document.createElement('script')
+ script.src = mirror.deliver(`/recognition/${recognizerVersion}/penguin.js`)
+ // script.src = "/penguin.js"
+ document.body.appendChild(script)
+ await new Promise(resolve => {
+ script.onload = function () {
+ resolve()
+ Console.info('Recognizer', 'init: recognition backend: js loaded')
+ }
+ })
+ await new Promise(resolve => {
+ window.Module.onRuntimeInitialized = () => {
+ Console.info('Recognizer', 'init: recognition backend: wasm loaded')
+ resolve()
+ }
+ })
+ }
+ const Module = window.Module
+
+ this.wasm = {
+ load_server: Module.cwrap('load_server', 'void', ['string']),
+ load_tmpl: Module.cwrap('load_templ', 'void', ['string', 'number']),
+ load_json: Module.cwrap('load_json', 'void', ['string', 'string']),
+ recognize: Module.cwrap('recognize', 'string', ['number', 'number']),
+ get_info: Module.cwrap('get_info', 'string', []),
+ // free_buffer: Module.cwrap('free_buffer', 'void', ['number'])
+ }
+
+ const stages = {}
+
+ store.getters['data/content']({ id: 'stages' })
+ .forEach((stage) => {
+ let drops = (stage.dropInfos || [])
+ .map(drop => drop.itemId)
+ .filter(drop => !!drop && drop !== 'furni')
+
+ if (stage.recognitionOnly) drops = [...drops, ...stage.recognitionOnly]
+
+ stages[stage.code] = {
+ stageId: stage.stageId,
+ drops: uniq(drops),
+ existence: existUtils.existence(stage, true)
+ }
+ })
+
+
+ Console.debug('Recognizer', 'init: preload json: preloading with', stages, charHash)
+
+ this.wasm.load_json(
+ JSON.stringify(stages),
+ JSON.stringify(charHash)
+ )
+
+ Console.debug('Recognizer', 'init: preload server: preloading with', server)
+
+ this.wasm.load_server(server)
+
+ Console.info('Recognizer', 'init: preload icons: preloading')
+
+ // await fetch(mirror.deliver(`/recognition/${recognizerVersion}/items.zip`))
+ await fetch("/items.zip")
+ .then((response) => {
+ if (response.status >= 200 && response.status < 400) {
+ return Promise.resolve(response.blob())
+ } else {
+ return Promise.reject(new Error(response.statusText))
+ }
+ })
+ .then((zip) => JSZip.loadAsync(zip))
+ .then(async (zip) => {
+ const imageBuffer = []
+ zip.forEach((relativePath, file) => {
+ imageBuffer.push(new Promise(resolve => {
+ const item = file.name.split('.')[0]
+ Console.debug('Recognizer', 'init: preload icons: adding', item, 'to preloaded item icon')
+ file.async('blob').then(async (blob) => {
+ const { offset, length } = await image2wasmHeapOffset(blob, file.name)
+ this.wasm.load_tmpl(item, offset, length)
+ }).then(resolve)
+ }))
+ })
+ return Promise.all(imageBuffer)
+ })
+
+
+ Console.info('Recognizer', 'init: preload icons: preloaded')
+
+ const version = this.wasm.get_info()
+
+ Console.info('Recognizer', 'initialization completed with wasm version', version)
+
+ this.instanceInfo = {
+ server,
+ version
+ }
+
+ return this
+ }
+
+ async recognize (files, resultCb) {
+ for (const file of files) {
+ const id = `${Date.now()}_${Math.random()}`
+ // console.groupCollapsed('Recognition of', file.name)
+ // console.log('start recognizing file', file.name)
+ // console.time(file.name)
+ const data = await image2wasmHeapOffset(file)
+ // console.log('finished writing file to wasm heap. starting recognition')
+ // console.timeLog(file.name)
+ Console.info('Recognizer', 'start recognizing file', file.name, 'with wasm heap offset', data.offset, data.length)
+ const start = performance.now()
+ let result, parsedResult
+ try {
+ result = this.wasm.recognize(data.offset, data.length)
+ Console.debug('Recognizer', 'recognized with raw result', result)
+ parsedResult = safeParseJson(result)
+ } catch (e) {
+ Console.error('Recognizer', 'caught wasm error', e, 'responding with null result')
+ const duration = performance.now() - start
+ resultCb({
+ id,
+ file,
+ blobUrl: data.blobUrl,
+ duration,
+ result: {
+ exceptions: [{ what: "Result::False" }],
+ drops: []
+ }
+ })
+ continue
+ }
+ const duration = performance.now() - start
+
+ Console.debug('Recognizer', 'Recognized. Took', duration + 'ms', 'with result', parsedResult)
+
+ parsedResult.exceptions = parsedResult.exceptions.map(exception => {
+ exception.what = `${
+ strings.capitalize(
+ exception.where
+ .split('.')
+ .filter(el => !el.match(/^-?\d+$/))
+ .map(strings.capitalize)
+ .join('')
+ )
+ }::${exception.what}`
+ return exception
+ })
+
+ if (parsedResult.stage.stageCode) {
+ const stage = get.stages.byStageId(parsedResult.stage.stageId)
+
+ if (Array.isArray(stage.recognitionOnly)) {
+ parsedResult.drops = parsedResult.drops.filter(el => !stage.recognitionOnly.includes(el.itemId))
+ }
+
+ if (!parsedResult.exceptions.length) {
+ const zone = get.zones.byZoneId(stage.zoneId)
+
+ Console.debug('Recognizer', 'validating drops', parsedResult)
+ const validate = new ReportValidator(
+ this.instanceInfo.server,
+ zone,
+ stage,
+ parsedResult.drops
+ ).validate()
+ Console.debug('Recognizer', 'validated with result', validate)
+
+ if (validate.rate > 0) {
+ parsedResult.exceptions.push({
+ what: "DropInfos::Violation",
+ details: validate
+ })
+ }
+ }
+ }
+
+ resultCb({
+ id,
+ file,
+ blobUrl: data.blobUrl,
+ duration,
+ result: parsedResult
+ })
+ // console.log('callback executed')
+ // console.timeLog(file.name)
+ // this.wasm.free_buffer(data.offset)
+ // console.log('buffer freed. timer ended')
+ // console.timeEnd(file.name)
+ // console.groupEnd()
+ }
+ }
+}
+
+export default Recognizer
diff --git a/src/utils/reportValidator.js b/src/utils/reportValidator.js
new file mode 100644
index 00000000..8942b1f8
--- /dev/null
+++ b/src/utils/reportValidator.js
@@ -0,0 +1,287 @@
+import get from "@/utils/getters";
+import i18n from "@/i18n";
+import strings from "@/utils/strings";
+
+const categories = [
+ "NORMAL_DROP",
+ "SPECIAL_DROP",
+ "EXTRA_DROP",
+]
+
+class ReportValidator {
+ constructor(server, zone, stage, drops) {
+ this.server = server
+ this.zone = zone
+ this.stage = stage
+ this.drops = drops
+
+ this.dropInfos = this._getDropInfos()
+ }
+
+ static null() {
+ return {
+ item: [],
+ type: [],
+ rate: 0
+ }
+ }
+
+ _getDropInfos() {
+ const dropInfos = {
+ type: [],
+ item: []
+ }
+
+ for (const drop of this.stage.dropInfos) {
+ if (drop.itemId) {
+ dropInfos.item.push({
+ ...drop,
+ item: get.items.byItemId(drop.itemId)
+ })
+ } else {
+ // when an itemId is not presented, a category drop bound is described.
+ dropInfos.type.push(drop)
+ }
+ }
+
+ dropInfos.item.sort((a, b) => a.item.sortId - b.item.sortId)
+
+ return dropInfos
+ }
+
+ _getVerificationRule(type, query) {
+ // if (!this.dropInfos) {
+ // return {
+ // rules: [
+ // () => {
+ // return () => {
+ // return true
+ // }
+ // }
+ // ],
+ // limitation: {}
+ // }
+ // }
+
+ let limitation
+ let verificationResponse = {
+ stage: i18n.t(`stage.loots.${query.dropType}`)
+ }
+ // console.log("generating verification rule for", type, query)
+ if (type === 'item') {
+ limitation = this.dropInfos.item
+ .find(v => v.itemId === query.itemId && v.dropType === query.dropType).bounds
+
+ verificationResponse = {
+ ...verificationResponse,
+ item: strings.translate(get.items.byItemId(query.itemId), 'name')
+ }
+ } else if (type === 'type') {
+ limitation = this.dropInfos.type
+ .find(v => v.dropType === query.dropType).bounds
+ } else {
+ throw new TypeError(`_getVerificationRule: Invalid argument ${type}`)
+ }
+
+ // can't found drop info based on the queries, means it should be zero/not presenting.
+ if (!limitation) {
+ return {
+ rules: [
+ () => {
+ return () => {
+ return i18n.t('report.rules.null', {type})
+ }
+ }
+ ],
+ limitation
+ }
+ }
+
+ // rule declarations
+
+ // greater than or equal to
+ const gte = (value) => {
+ return (compare) => {
+ // console.log("executing rule: gte with compare", compare, "should", value)
+ const response = {...verificationResponse, quantity: compare, should: value}
+ return compare >= value ? true : [i18n.t(`report.rules.${type}.gte`, response), response]
+ }
+ }
+
+ // less than or equal to
+ const lte = (value) => {
+ return (compare) => {
+ // console.log("executing rule: lte with compare", compare, "should", value)
+ const response = {...verificationResponse, quantity: compare, should: value}
+ return compare <= value ? true : [i18n.t(`report.rules.${type}.lte`, response), response]
+ }
+ }
+
+ // not including
+ const notIncludes = (values) => {
+ return (compare) => {
+ // console.log("executing rule: notIncludes with compare", compare, "should", values)
+ const response = {...verificationResponse, quantity: compare, should: values.join(',')}
+ return values.indexOf(compare) === -1 ? true : [i18n.t(`report.rules.${type}.not`, response), response]
+ }
+ }
+
+ // compose generation
+ const generated = {
+ rules: [
+ gte(limitation.lower),
+ lte(limitation.upper)
+ ],
+ limitation
+ }
+
+ // if there's limitation then we also need to validate the notIncludes.
+ if (limitation.exceptions) generated.rules.push(notIncludes(limitation.exceptions))
+
+ return generated
+ }
+
+ /**
+ * @typedef {{lower: number, upper: number, exceptions: number[]}} Limitation
+ * @typedef {{itemId: string, type: string, quantity: number, limitation: Limitation, rate: number, message: string}} ItemOutlier
+ * @typedef {{type: string, quantity: number, limitation: Limitation, rate: number, message: string}|null} TypeOutlier
+ * @returns {{item: ItemOutlier[], type: TypeOutlier[], rate: number}} returns item data outliers and type data outliers in the whole dataset, respectively
+ */
+ validate() {
+ // initiate the array that will be storing every data outlier
+ /** @type ItemOutlier[] */
+ const itemOutliers = []
+
+ /** @type TypeOutlier[] */
+ const typeOutliers = []
+
+ const nullValidation = {item: itemOutliers, type: typeOutliers, rate: 0}
+
+ // if (!this.selectedZone || this.invalidStage) return nullValidation
+
+ /**
+ * validate the quantity using their corresponding rule
+ */
+ function validate(rules, quantity) {
+ for (const rule of rules) {
+ const evaluation = rule(quantity)
+ if (evaluation !== true) return evaluation
+ }
+ return [true, {}]
+ }
+
+ /**
+ * calculate the outlier rate
+ * @param {Limitation} limitation rules to validate with
+ * @param {number} value value to validate with
+ * @returns {number} percentage in decimal format (e.g. 150% = 1.5)
+ */
+ function calculateOutlierRate(limitation, value) {
+ const upper = (value - limitation.upper) ? Math.max(0, (value - limitation.upper) / limitation.upper) : 0
+ const lower = (limitation.lower - value) ? Math.max(0, (limitation.lower - value) / limitation.lower) : 0
+ return upper + lower
+ }
+
+ // loop the candidate results that user provided
+ for (const dropInfo of this.dropInfos.item) {
+ const record = this.drops.find(el => el.itemId === dropInfo.itemId && el.dropType === dropInfo.dropType) || {
+ ...dropInfo,
+ quantity: 0
+ }
+
+ // generate rules. rules: Function[]; limitation: the bounds
+ const {rules, limitation} = this._getVerificationRule('item', dropInfo)
+
+ if (limitation === null) {
+ return {
+ error: 'EMPTY_RULE',
+ ...nullValidation
+ }
+ }
+
+ const quantity = record.quantity
+
+ // execute validation rules.
+ const [validation, extras] = validate(rules, quantity)
+
+ // console.log("generated & executed", dropInfo, "->", {rules, limitation, validation, extras})
+
+ // if validation fails on a rule
+ if (validation !== true) {
+ // calculate the outlier rate based on the bounds and current value
+ // e.g. [0, 3), 6: will get 1 (outlier value 100%)
+ const rate = calculateOutlierRate(limitation, record.quantity)
+
+ // store this outlier
+ itemOutliers.push({
+ itemId: dropInfo.itemId,
+ type: dropInfo.dropType,
+ quantity,
+ limitation,
+ rate,
+ message: validation,
+ extras
+ })
+ }
+ }
+
+ // loop the type declarations (dropType limitations)
+ for (const category of categories) {
+ const dropType = category
+ // generate rules
+ const {rules, limitation} = this._getVerificationRule('type', {
+ dropType
+ })
+
+ if (limitation === null) {
+ return {
+ error: 'EMPTY_RULE',
+ ...nullValidation
+ }
+ }
+
+ const quantity = this.drops
+ .filter(el => el.dropType === dropType)
+ .length
+
+ // execute validation rules.
+ const [validation, extras] = validate(rules, quantity)
+
+ // if validation fails on a rule
+ if (validation !== true) {
+ // calculate the outlier rate based on the bounds and current value
+ // e.g. [0, 3), 6: will get 1 (outlier value 100%)
+ const rate = calculateOutlierRate(limitation, quantity)
+
+ // store this outlier
+ typeOutliers.push({
+ type: dropType,
+ quantity,
+ limitation,
+ rate,
+ message: validation,
+ extras
+ })
+ }
+ }
+
+ // calculate total outlier rate
+ const itemRates = itemOutliers.reduce(
+ (accumulator, current) => accumulator + current.rate,
+ 0
+ )
+ const typeRates = typeOutliers.reduce(
+ (accumulator, current) => accumulator + current.rate,
+ 0
+ )
+ const totalRates = itemRates + typeRates
+
+ return {
+ item: itemOutliers,
+ type: typeOutliers,
+ rate: totalRates
+ }
+ }
+}
+
+export default ReportValidator;
\ No newline at end of file
diff --git a/src/utils/searchEngine.js b/src/utils/searchEngine.js
index 04d4580a..ac18c105 100644
--- a/src/utils/searchEngine.js
+++ b/src/utils/searchEngine.js
@@ -1,14 +1,14 @@
-import store from "@/store"
-import strings from "@/utils/strings"
+import store from '@/store'
+import strings from '@/utils/strings'
import Fuse from 'fuse.js'
-import i18n from "@/i18n";
+import i18n from '@/i18n'
import get from '@/utils/getters'
-function arrByLang(object, lang = i18n.locale) {
+function arrByLang (object, lang = i18n.locale) {
return object ? (object[lang] || object[i18n.fallbackLocale] || []) : []
}
-function processPron(arr) {
+function processPron (arr) {
const replaced = arr.map(el => el.replace(/`/g, ' '))
const chunked = arr.map(el => el.replace(/`/g, ''))
const firstChar = replaced.map(e => e.split(' ').map(el => el.charAt(0)).join(''))
@@ -16,7 +16,7 @@ function processPron(arr) {
}
class SearchEngine {
- constructor({ name, data }) {
+ constructor ({ name, data }) {
this.name = name
this.engineOptions = {
includeScore: true,
@@ -27,34 +27,35 @@ class SearchEngine {
this.ready = new Promise(() => {})
this.update(data)
}
- updateEngine() {}
- update(data) {
+
+ updateEngine () {}
+ update (data) {
this.data = data || []
this.updateEngine()
}
- query(keyword) {
- if (!this.engine) throw new Error("search engine called before not initialized")
+
+ query (keyword) {
+ if (!this.engine) throw new Error('search engine called before not initialized')
return this.engine.query(keyword)
}
}
class StageSearchEngine extends SearchEngine {
- constructor(options) { super(options); }
updateEngine () {
const docs = this.data.map(el => ({
stageId: el.stageId,
- code: strings.translate(el, "code"),
+ code: strings.translate(el, 'code'),
alias: arrByLang(el.alias),
- pron: processPron(arrByLang(el.pron)),
+ pron: processPron(arrByLang(el.pron))
}))
// console.log('stage docs mapped as', docs)
- this.engine = new Fuse(docs,{
+ this.engine = new Fuse(docs, {
...this.engineOptions,
keys: [
- "stageId",
- "code",
- "alias",
- "pron"
+ 'stageId',
+ 'code',
+ 'alias',
+ 'pron'
]
})
this.ready = Promise.resolve()
@@ -62,23 +63,22 @@ class StageSearchEngine extends SearchEngine {
}
class ItemSearchEngine extends SearchEngine {
- constructor(options) { super(options); }
updateEngine () {
const docs = this.data
.filter(el => get.items.validItemTypes.includes(el.itemType))
.map(el => ({
itemId: el.itemId,
- name: strings.translate(el, "name"),
+ name: strings.translate(el, 'name'),
alias: arrByLang(el.alias),
- pron: processPron(arrByLang(el.pron)),
+ pron: processPron(arrByLang(el.pron))
}))
- this.engine = new Fuse(docs,{
+ this.engine = new Fuse(docs, {
...this.engineOptions,
keys: [
- "itemId",
- "name",
- "alias",
- "pron"
+ 'itemId',
+ 'name',
+ 'alias',
+ 'pron'
]
})
this.ready = Promise.resolve()
@@ -86,35 +86,35 @@ class ItemSearchEngine extends SearchEngine {
}
class CompactedSearchEngine {
- constructor() {
+ constructor () {
this.engines = [
new ItemSearchEngine({
name: 'items',
- data: store.getters["data/content"]({id: "items"})
+ data: store.getters['data/content']({ id: 'items' })
}),
new StageSearchEngine({
name: 'stages',
- data: store.getters["data/content"]({id: "stages"})
+ data: store.getters['data/content']({ id: 'stages' })
})
]
}
- update(key, data) {
+ update (key, data) {
this.engines.find(el => el.name === key).update(data)
}
- ready() {
+ ready () {
return Promise.all(this.engines.map(el => el.ready))
}
- search(query, options = {}) {
+ search (query, options = {}) {
if (!query) return []
- const results = [];
+ const results = []
// const start = Date.now()
for (const engine of this.engines) {
const result = engine.engine.search(query, options)
- .map(el => ({...el, type: engine.name}))
+ .map(el => ({ ...el, type: engine.name }))
results.push(...result)
}
// console.log(Date.now() - start)
@@ -124,4 +124,4 @@ class CompactedSearchEngine {
}
}
-export default CompactedSearchEngine
\ No newline at end of file
+export default CompactedSearchEngine
diff --git a/src/utils/service.js b/src/utils/service.js
index bfad3558..28b3d5ea 100644
--- a/src/utils/service.js
+++ b/src/utils/service.js
@@ -1,24 +1,29 @@
import axios from 'axios'
-import Console from "@/utils/Console";
-import store from "@/store";
-import mirror from "@/utils/mirror";
-import semver from "semver";
-import config from "@/config"
-import i18n from "@/i18n";
+import Console from '@/utils/Console'
+import store from '@/store'
+import mirror from '@/utils/mirror'
+import semver from 'semver'
+import config from '@/config'
+import i18n from '@/i18n'
-let baseURL;
+let baseURL
if (mirror.global.isCurrent() || mirror.cn.isCurrent()) {
// those are official mirrors. just use the relative path.
- baseURL = "/PenguinStats/api/v2"
-} else if (process.env.NODE_ENV === "development") {
+ baseURL = '/PenguinStats/api/v2'
+} else if (process.env.NODE_ENV === 'development') {
// developing at localhost.
// also use the relative path, but we left the task to WebpackDevServer for proxying local API responses
// so use relative path.
- baseURL = "/PenguinStats/api/v2"
+ baseURL = '/PenguinStats/api/v2'
+} else if (process.env.VUE_APP_IS_DOCKER === 'true') {
+ // docker build
+ // backend and frontend are on the same server
+ // so use relative path.
+ baseURL = '/PenguinStats/api/v2'
} else {
// high chance of using a staging environment where api is not available with the frontend deployment.
// use the absolute endpoint to get the juicy responses :)
- baseURL = "https://penguin-stats.io/PenguinStats/api/v2"
+ baseURL = 'https://penguin-stats.io/PenguinStats/api/v2'
}
const service = axios.create({
@@ -26,20 +31,20 @@ const service = axios.create({
baseURL,
withCredentials: true,
timeout: 90 * 1000 // 1.5 minute
-});
+})
-const deployingFlag = ``
+const deployingFlag = ''
-function needsUpdate(response) {
- if ("x-penguin-upgrade" in response.headers) {
+function needsUpdate (response) {
+ if ('x-penguin-upgrade' in response.headers) {
// X-Penguin-Upgrade: Client version must be outdated due to
- // API endpoint changes or other changes that must be updated.
+ // API *endpoint* changes or other changes that must be updated.
return true
}
- if ("x-penguin-compatible" in response.headers) {
- const version = response.headers["x-penguin-compatible"]
+ if ('x-penguin-compatible' in response.headers) {
+ const version = response.headers['x-penguin-compatible']
// replace prefix
- .replace(new RegExp("^" + config.project + "@"), "")
+ .replace(new RegExp('^' + config.project + '@'), '')
const cleaned = semver.clean(version)
@@ -58,23 +63,22 @@ function needsUpdate(response) {
// Add a response interceptor
service.interceptors.response.use(function (response) {
if (needsUpdate(response)) {
- store.commit("ui/setOutdated", true)
+ store.commit('ui/setOutdated', true)
}
- return response;
+ return response
}, function (error) {
if (error.response) {
-
if (needsUpdate(error.response)) {
- store.commit("ui/setOutdated", true)
+ store.commit('ui/setOutdated', true)
}
// eliminate `user not found` errors (reports 404).
if (error.response.status !== 404) {
- Console.error("Ajax", "failed", error)
+ Console.error('Ajax', 'failed', error)
}
- let message;
+ let message
if (error && error.response && error.response.data && error.response.data.indexOf(deployingFlag) >= 0) {
message = i18n.t('fetch.failed.deploying')
@@ -82,16 +86,16 @@ service.interceptors.response.use(function (response) {
message = error.response.data || error.message
}
- error.errorMessage = `(s=${error.response.status}) ${message}`;
+ error.errorMessage = `(s=${error.response.status}) ${message}`
} else {
- error.errorMessage = `(s=-1) ${error.message}`;
+ error.errorMessage = `(s=-1) ${error.message}`
}
// Do something with response error
- return Promise.reject(error);
-});
+ return Promise.reject(error)
+})
const externalService = axios.create({
withCredentials: false
})
-export {service, externalService}
+export { service, externalService }
diff --git a/src/utils/snackbar.js b/src/utils/snackbar.js
index 7ceae99c..1c0aad74 100644
--- a/src/utils/snackbar.js
+++ b/src/utils/snackbar.js
@@ -1,28 +1,28 @@
-import store from "../store";
-import haptics from "@/utils/native/haptics";
+import store from '../store'
+import haptics from '@/utils/native/haptics'
function getDefaultIcon (type) {
const MAP = {
- "success": "mdi-check-circle",
- "error": "mdi-close-circle",
- };
+ success: 'mdi-check-circle',
+ error: 'mdi-close-circle'
+ }
return MAP[type]
}
export default {
launch (type, timeout, text, extra, icon) {
- if (type === "error") haptics.error()
- if (type === "success") haptics.success()
+ if (type === 'error') haptics.error()
+ if (type === 'success') haptics.success()
- store.commit("ui/setSnackbar", {
+ store.commit('ui/setSnackbar', {
color: type,
timeout,
text,
extra,
- icon: icon || getDefaultIcon(type) || "mdi-alert-circle"
+ icon: icon || getDefaultIcon(type) || 'mdi-alert-circle'
})
},
networkError () {
- this.launch("error", 0, "network.error")
+ this.launch('error', 0, 'network.error')
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/strings.js b/src/utils/strings.js
index e07fff73..88127219 100644
--- a/src/utils/strings.js
+++ b/src/utils/strings.js
@@ -1,46 +1,46 @@
-import I18n from "@/i18n"
-import Console from "@/utils/Console";
-import marked from "marked"
+import I18n from '@/i18n'
+import Console from '@/utils/Console'
+import marked from 'marked'
marked.setOptions({
breaks: true,
silent: true
})
-function markdown(content) {
+function markdown (content) {
return marked(content)
}
function translateMarkdown (object, key) {
- return marked(translate(object, key).replace(/\\n/gm, "\n"))
+ return marked(translate(object, key).replace(/\\n/gm, '\n'))
}
-function getLocaleMessage(object, localeKey, key, language) {
- return object[localeKey][language] || object[localeKey][I18n.fallbackLocale] || object[key] || "";
+function getLocaleMessage (object, localeKey, key, language) {
+ return object[localeKey][language] || object[localeKey][I18n.fallbackLocale] || object[key] || ''
}
function translate (object, key) {
- let locale = I18n.locale;
- let localeKey = `${key}_i18n`;
+ const locale = I18n.locale
+ const localeKey = `${key}_i18n`
// Console.debug("StringI18n", `generating translation. locale-${locale} key-${localeKey} [${key}]`, object)
if (object) {
if (object[localeKey]) {
if (object[localeKey][locale]) {
return getLocaleMessage(object, localeKey, key, locale)
} else {
- let languages = locale.split("-");
- if (languages[0] !== "") {
+ const languages = locale.split('-')
+ if (languages[0] !== '') {
return getLocaleMessage(object, localeKey, key, languages[0])
} else {
- Console.warn("StringI18n", `translation error: ${key}: Specific country code detected but it's invalid`, locale, languages)
- return ""
+ Console.warn('StringI18n', `translation error: ${key}: Specific country code detected but it's invalid`, locale, languages)
+ return ''
}
}
} else {
- return object[key] || ""
+ return object[key] || ''
}
} else {
- return ""
+ return ''
}
}
@@ -65,49 +65,49 @@ function translate (object, key) {
// from https://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference
-function getFirstBrowserLanguageWithRegionCode() {
- let nav = window.navigator,
- browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'],
- i,
- language,
- len,
- shortLanguage = null;
+function getFirstBrowserLanguageWithRegionCode () {
+ const nav = window.navigator
+ const browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage']
+ let i
+ let language
+ let len
+ let 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;
+ language = nav.languages[i]
+ len = language.length
if (!shortLanguage && len) {
- shortLanguage = language;
+ shortLanguage = language
}
- if (language && len>2) {
- return 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;
+ 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;
+ shortLanguage = language
}
if (language && len > 2) {
- return language;
+ return language
}
}
- return shortLanguage;
+ return shortLanguage
}
function getFirstBrowserLanguage () {
- const language = getFirstBrowserLanguageWithRegionCode().replace("_", "-");
- if (!language) return I18n.fallbackLocale; // use default
- const languages = language.split("-");
+ const language = getFirstBrowserLanguageWithRegionCode().replace('_', '-')
+ if (!language) return I18n.fallbackLocale // use default
+ const languages = language.split('-')
if (languages.length === 1) {
return language
} else if (languages.length === 2) {
@@ -118,20 +118,24 @@ function getFirstBrowserLanguage () {
}
}
-function fileSize(bytes, si) {
- var thresh = si ? 1000 : 1024;
- if(Math.abs(bytes) < thresh) {
- return bytes + ' B';
+function fileSize (bytes, si) {
+ var thresh = si ? 1000 : 1024
+ if (Math.abs(bytes) < thresh) {
+ return bytes + ' B'
}
var units = si
- ? ['kB','MB','GB','TB','PB','EB','ZB','YB']
- : ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
- var u = -1;
+ ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
+ : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
+ var u = -1
do {
- bytes /= thresh;
- ++u;
- } while(Math.abs(bytes) >= thresh && u < units.length - 1);
- return bytes.toFixed(1)+' '+units[u];
+ bytes /= thresh
+ ++u
+ } while (Math.abs(bytes) >= thresh && u < units.length - 1)
+ return bytes.toFixed(1) + ' ' + units[u]
}
-export default {translate, markdown, translateMarkdown, getFirstBrowserLanguage, fileSize}
\ No newline at end of file
+function capitalize(string) {
+ return string.charAt(0).toUpperCase() + string.slice(1);
+}
+
+export default { translate, markdown, translateMarkdown, getFirstBrowserLanguage, fileSize, capitalize }
diff --git a/src/utils/timeFormatter.js b/src/utils/timeFormatter.js
index 79da9e8d..321aaf45 100644
--- a/src/utils/timeFormatter.js
+++ b/src/utils/timeFormatter.js
@@ -3,7 +3,7 @@ import 'dayjs/locale/zh'
import 'dayjs/locale/ja'
import 'dayjs/locale/ko'
-import i18n from "@/i18n";
+import i18n from '@/i18n'
const relativeTime = require('dayjs/plugin/relativeTime')
const isBetween = require('dayjs/plugin/isBetween')
@@ -13,16 +13,16 @@ dayjs.extend(isBetween)
dayjs.extend(duration)
const FORMATS = {
- MD: "M.D",
- YMD: "YY.M.D",
- HM: "H:mm",
- HMS: "H:mm:ss",
-};
+ MD: 'M.D',
+ YMD: 'YY.M.D',
+ HM: 'H:mm',
+ HMS: 'H:mm:ss'
+}
-function needYear(moments) {
+function needYear (moments) {
for (const index in moments) {
- if (index === "0") continue;
- if (!dayjs().isSame(moments[index], 'year') || !(moments[index].isSame.apply(moments[index], [moments[index - 1], 'year']))) {
+ if (index === '0') continue
+ if (!dayjs().isSame(moments[index], 'year') || !(moments[index].isSame(moments[index], [moments[index - 1], 'year']))) {
return true
}
}
@@ -34,27 +34,27 @@ export default {
dayjs.locale(i18n.locale)
return dayjs
},
- isOutdated(rangeStart, rangeEnd) {
+ isOutdated (rangeStart, rangeEnd) {
return dayjs().isBefore(rangeStart) || dayjs().isAfter(rangeEnd)
},
- checkTimeValid(rangeStart, rangeEnd) {
- if (dayjs().isBefore(rangeStart)) return -1 // not yet arrived
- if (dayjs().isAfter(rangeEnd)) return 1 // already outdated
+ checkTimeValid (rangeStart, rangeEnd) {
+ if (dayjs().isBefore(rangeStart)) return -1 // not yet arrived
+ if (dayjs().isAfter(rangeEnd)) return 1 // already outdated
return 0 // OK
},
- dates (times, includeTime=true) {
+ dates (times, includeTime = true) {
times = times.map(ts => {
return dayjs(ts)
- });
- let needsYear = needYear(times);
+ })
+ const needsYear = needYear(times)
times = times.map(time => {
if (includeTime) return time.format(`${needsYear ? FORMATS.YMD : FORMATS.MD} ${FORMATS.HM}`)
return time.format(`${needsYear ? FORMATS.YMD : FORMATS.MD}`)
- });
+ })
return times
},
- date (date, detectSameYear=false, includeTime=false) {
- let template = FORMATS.MD;
+ date (date, detectSameYear = false, includeTime = false) {
+ let template = FORMATS.MD
if (detectSameYear) {
const isSameYear = dayjs(date).isSame(dayjs(), 'year')
template = isSameYear ? FORMATS.MD : FORMATS.YMD
@@ -63,24 +63,24 @@ export default {
return dayjs(date).format(template)
},
/** duration: duration in milliseconds; returns: localized string */
- duration (duration, unit = "s", digits=1) {
- if (!duration) return ""
- let message = ""
+ duration (duration, unit = 's', digits = 1) {
+ if (!duration) return ''
+ let message = ''
const d = dayjs.duration(duration / 1000, unit)
let minutes = d.get('minutes')
if (d.get('hours') > 0) minutes += 60 * d.get('hours')
- if (d.get('minutes') > 0) message += i18n.t('meta.time.minute', {m: minutes})
- const ms = d.get('milliseconds') > 0 ? ((d.get('milliseconds') / 1000).toFixed(digits)).slice(1) : ""
- if (d.get('seconds') > 0) message += i18n.t('meta.time.second', {s: `${d.get('seconds')}${ms}`})
+ if (d.get('minutes') > 0) message += i18n.t('meta.time.minute', { m: minutes })
+ const ms = d.get('milliseconds') > 0 ? ((d.get('milliseconds') / 1000).toFixed(digits)).slice(1) : ''
+ if (d.get('seconds') > 0) message += i18n.t('meta.time.second', { s: `${d.get('seconds')}${ms}` })
return message
},
- startEnd (start, end, selector=false) {
+ startEnd (start, end, selector = false) {
if (start && end) {
return i18n.t('stats.timeRange.inBetween', this.dates([start, end], false))
} else if (start && !end) {
- return i18n.t('stats.timeRange.toPresent', {date: this.date(start, true)})
+ return i18n.t('stats.timeRange.toPresent', { date: this.date(start, true) })
} else if (!start && end) {
- return i18n.t('stats.timeRange.endsAt', {date: this.date(end, true)})
+ return i18n.t('stats.timeRange.endsAt', { date: this.date(end, true) })
} else {
if (selector) return i18n.t('stats.timeRange.notSelected')
return i18n.t('stats.timeRange.unknown')
diff --git a/src/utils/unmarshaller.js b/src/utils/unmarshaller.js
index ad726af1..153913f6 100644
--- a/src/utils/unmarshaller.js
+++ b/src/utils/unmarshaller.js
@@ -1,17 +1,22 @@
-import Console from "@/utils/Console";
-import get from "@/utils/getters";
-import validator from "@/utils/validator";
+import Console from '@/utils/Console'
+import get from '@/utils/getters'
+import validator from '@/utils/validator'
+import supports from '@/models/supports'
const errors = {
planner: {
config: {
- invalidJSON: "invalidJSON",
- invalidItemSegment: "invalidItemSegment",
- unrecognized: "unrecognized"
+ invalidJSON: 'invalidJSON',
+ invalidItemSegment: 'invalidItemSegment',
+ unrecognized: 'unrecognized'
}
}
}
+function unmarshalLocale (s) {
+ return (supports.localizations.find(el => el.push === s) || {}).value
+}
+
export default {
planner: {
config: {
@@ -19,7 +24,7 @@ export default {
// []ItemData
// which, ItemData = {id, need?, have?} | {name, need?, have?}
legacy (config) {
- const convertedItems = [];
+ const convertedItems = []
const convertionErrors = []
for (const [index, item] of config.entries()) {
// `have` or `need` param check
@@ -27,37 +32,37 @@ export default {
if (
// if it is valid then we don't need to add the error message
!(
- // we need whether a `need` or `have` param.
- // and if the config file have any of those param, it should also pass the validation
+ // we need whether a `need` or `have` param.
+ // and if the config file have any of those param, it should also pass the validation
// valid need OR valid have
- (validator.have(item, "need") && Number.isInteger(item.need) && item.need >= 0) ||
- (validator.have(item, "have") && Number.isInteger(item.have) && item.have >= 0)
+ (validator.have(item, 'need') && Number.isInteger(item.need) && item.need >= 0) ||
+ (validator.have(item, 'have') && Number.isInteger(item.have) && item.have >= 0)
)
) {
convertionErrors.push({
index,
item,
reason: errors.planner.config.invalidItemSegment
- });
+ })
Console.info(
- "PlannerIO",
- validator.have(item, "need"), Number.isInteger(item.need), item.need >= 0,
- validator.have(item, "have"), Number.isInteger(item.have), item.have >= 0
+ 'PlannerIO',
+ validator.have(item, 'need'), Number.isInteger(item.need), item.need >= 0,
+ validator.have(item, 'have'), Number.isInteger(item.have), item.have >= 0
)
- Console.info("PlannerImport", "one of the item data is invalid. not importing this and continue to the next one (reason: need or have invalid): ", index, item)
+ Console.info('PlannerImport', 'one of the item data is invalid. not importing this and continue to the next one (reason: need or have invalid): ', index, item)
continue
}
// item identifier `id` or `name` check
- const haveId = validator.have(item, "id"); // later versions use id to represent item
- const haveName = validator.have(item, "name"); // older versions use (chinese) name to represent item
+ const haveId = validator.have(item, 'id') // later versions use id to represent item
+ const haveName = validator.have(item, 'name') // older versions use (chinese) name to represent item
if (haveId) {
if (haveName) {
// we don't need the name anymore if the item have an id
- delete item["name"]
+ delete item.name
}
// you are all good my friend!
convertedItems.push(item)
@@ -67,11 +72,11 @@ export default {
index,
item,
reason: errors.planner.config.invalidItemSegment
- });
- Console.info("PlannerImport", "one of the item data is invalid. not importing this and continue to the next one (reason: no id or name): ", index, item)
+ })
+ Console.info('PlannerImport', 'one of the item data is invalid. not importing this and continue to the next one (reason: no id or name): ', index, item)
continue
}
- const gotItem = get.items.byName(item.name);
+ const gotItem = get.items.byName(item.name)
convertedItems.push({
id: gotItem.itemId,
need: item.need,
@@ -98,7 +103,7 @@ export default {
// decode encoded config string, automatically determine the config version and convert accordingly
auto (config) {
- let converted;
+ let converted
try {
converted = JSON.parse(config)
} catch (e) {
@@ -113,7 +118,7 @@ export default {
} else {
// not an array... maybe it's a new data format.
// need verification
- if (converted["@type"] === "@penguin-statistics/planner/config") {
+ if (converted['@type'] === '@penguin-statistics/planner/config') {
// yup this is the new data format.
return this.modern(converted)
} else {
@@ -124,6 +129,22 @@ export default {
}
}
}
- },
+ }
+ },
+ pushPreferences (preferences) {
+ let parsed
+ try {
+ parsed = JSON.parse(preferences)
+ } catch { return [] }
+
+ const unmarshalled = []
+ for (const preference of parsed) {
+ unmarshalled.push({
+ ...preference,
+ locale: unmarshalLocale(preference.locale)
+ })
+ }
+
+ return unmarshalled
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/validator.js b/src/utils/validator.js
index bfd3d9a7..d0bbaf74 100644
--- a/src/utils/validator.js
+++ b/src/utils/validator.js
@@ -5,10 +5,10 @@ export default {
return false
},
isArray (data) {
- return Array.isArray(data) || "data must be an array"
+ return Array.isArray(data) || 'data must be an array'
},
notEmptyArray (data) {
- return data.length > 0 || "data must be an non-empty array"
+ return data.length > 0 || 'data must be an non-empty array'
},
have (object, key) {
return Object.prototype.hasOwnProperty.call(object, key)
@@ -22,4 +22,4 @@ export default {
}
return true
}
-}
\ No newline at end of file
+}
diff --git a/src/vendors/plotly.js b/src/vendors/plotly.js
deleted file mode 100644
index 3297611d..00000000
--- a/src/vendors/plotly.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// const Plotly = require('plotly.js/lib/core');
-//
-// // load only bar chart and line chart
-// Plotly.register([
-// require('plotly.js/lib/bar'),
-// require('plotly.js/lib/scatter')
-// ]);
-//
-// require('plotly.js/dist/plotly-locale-ja')
-// require('plotly.js/dist/plotly-locale-ko')
-// require('plotly.js/dist/plotly-locale-zh-cn')
-//
-// module.exports = Plotly;
\ No newline at end of file
diff --git a/src/views/About/Banner.vue b/src/views/About/Banner.vue
new file mode 100644
index 00000000..5d85fa26
--- /dev/null
+++ b/src/views/About/Banner.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ 企鹅物流数据统计恭祝各位刀客塔
+
+
+ 新年快乐,身体健康,万事如意
+
+
+
+
+
+
+
+
diff --git a/src/views/About/Bulletin.vue b/src/views/About/Bulletin.vue
index 82924f3c..e1105a39 100644
--- a/src/views/About/Bulletin.vue
+++ b/src/views/About/Bulletin.vue
@@ -53,66 +53,66 @@
\ No newline at end of file
+
diff --git a/src/views/About/Contact.vue b/src/views/About/Contact.vue
index 585cd8f8..01d64f56 100644
--- a/src/views/About/Contact.vue
+++ b/src/views/About/Contact.vue
@@ -44,8 +44,8 @@
-
diff --git a/src/views/About/Contribute.vue b/src/views/About/Contribute.vue
index 1267d514..ae30bb09 100644
--- a/src/views/About/Contribute.vue
+++ b/src/views/About/Contribute.vue
@@ -178,7 +178,7 @@
target="_blank"
rel="noopener"
>
-
+
{{ link.icon }}
@@ -210,14 +210,14 @@
\ No newline at end of file
+
diff --git a/src/views/About/Donate.vue b/src/views/About/Donate.vue
index ad1405d1..abc3b5a6 100644
--- a/src/views/About/Donate.vue
+++ b/src/views/About/Donate.vue
@@ -75,8 +75,8 @@
-
@@ -103,7 +103,7 @@
{{ $t('donate.donate_1') }}
-
+
{{ $t('donate.donate_4') }}
-
+
-
+
mdi-handshake
@@ -177,7 +177,7 @@
{{ $t('donate.donate_1') }}
-
+
-
+
-
+
-
+
{{ $t('meta.details') }}
-
-
-
- {{ $t('report.rules.type._name') }}
-
-
-
-
- mdi-alert-circle-outline
-
-
-
- {{ $t('report.rules.type.now', type.extras) }}
-
-
- {{ type.message }}
-
-
-
-
-
-
-
- {{ $t('report.rules.item._name') }}
-
-
-
-
-
-
-
- {{ $t('report.rules.item.now', item.extras) }}
-
-
- {{ item.message }}
-
-
-
-
-
+
-
{{ $t('report.alert.causes.noDrop') }}
@@ -511,42 +450,43 @@
@@ -49,4 +49,4 @@ export default {
max-width: 1185px
}
}
-
\ No newline at end of file
+
diff --git a/src/views/SiteStats.vue b/src/views/SiteStats.vue
index fd7ffc27..5f1e07f5 100644
--- a/src/views/SiteStats.vue
+++ b/src/views/SiteStats.vue
@@ -42,7 +42,7 @@
>
-
+
-
+
mdi-treasure-chest
@@ -89,7 +89,7 @@
-
+
mdi-cube
@@ -113,7 +113,7 @@
:title="$t('stats.site.all')"
/>
-
+
\ No newline at end of file
+
diff --git a/src/views/Stats/Item.vue b/src/views/Stats/Item.vue
index 14feb1e2..c4712f7b 100644
--- a/src/views/Stats/Item.vue
+++ b/src/views/Stats/Item.vue
@@ -6,24 +6,24 @@
"title": "{item} 统计结果"
}
},
- "en": {
- "result": {
- "name": "Statistics",
- "title": "Statistics of {item}"
- }
- },
- "ja": {
- "result": {
- "name": "統計結果",
- "title": "{item} 統計結果"
- }
- },
- "ko": {
- "result": {
- "name": "통계 결과",
- "title": "{item}의 통계 결과"
- }
- }
+ "en": {
+ "result": {
+ "name": "Statistics",
+ "title": "Statistics of {item}"
+ }
+ },
+ "ja": {
+ "result": {
+ "name": "統計結果",
+ "title": "{item} 統計結果"
+ }
+ },
+ "ko": {
+ "result": {
+ "name": "통계 결과",
+ "title": "{item}의 통계 결과"
+ }
+ }
}
@@ -149,20 +149,20 @@
\n \n\n\n\n\n\n \n \n\n
\n\n
\n\n
\n 正在加载\n
\n\n
\n 首次加载可能较慢,请耐心等待\n
\n\n \n \n \n\n \n
\n\n\n\n\n\n