From 8751cc1387092f1ae2ef92e0bdc863e329492078 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Fri, 3 Apr 2020 23:57:31 -0400 Subject: [PATCH 01/20] fix(sentry-spike): add more ignore errors --- src/App.vue | 25 ++++++++++++++++++ src/main.js | 5 ++-- src/utils/Console.js | 23 ++++++++++++----- src/views/Home.vue | 60 ++++++++++++++++++++++--------------------- src/views/Planner.vue | 6 ++--- 5 files changed, 79 insertions(+), 40 deletions(-) diff --git a/src/App.vue b/src/App.vue index d742e53a..37f4dd5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,6 +3,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + { + scope.setFingerprint([component]); + Sentry.captureMessage(contents.join(" "), severity) + }) +} + class Console { static debug (...content) { this._render("debug", ...content) @@ -7,16 +14,20 @@ class Console { static info (...content) { this._render("info", ...content) } - static warn (...content) { - this._render("warn", ...content) + static warn (component, ...content) { + const contents = [`[${component}]`, ...content]; + this._render("warn", ...contents); + reportSentry("warning", component, contents) } static error (component, ...content) { const contents = [`[${component}]`, ...content]; this._render("error", ...contents); - Sentry.withScope(scope => { - scope.setFingerprint([component]); - Sentry.captureMessage(contents.join(" "), "error") - }) + reportSentry("error", component, contents) + } + static fatal (component, ...content) { + const contents = [`[FATAL] [${component}]`, ...content]; + this._render("error", ...contents); + reportSentry("fatal", component, contents) } static log (...content) { this._render("log", ...content) diff --git a/src/views/Home.vue b/src/views/Home.vue index dbc4afb0..8c4f7470 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -103,7 +103,7 @@ export default { const el1 = document.querySelector(".card-translate-up"); const el2 = document.querySelector(".card-translate-up h1"); if (el1.style.opacity === "0" || el2.style.opacity === "0") { - Console.error("HomeAnimation", "potential blank screen on home detected"); + Console.warn("HomeAnimation", "potential blank screen on home detected"); // try to fix this const selectors = [ @@ -135,13 +135,13 @@ export default { height: 100%; } -.animation-blink { - animation-play-state: running; -} +/*.animation-blink {*/ +/* animation-play-state: running;*/ +/*}*/ -.animation-blink:hover{ - animation-play-state: paused !important; -} +/*.animation-blink:hover{*/ +/* animation-play-state: paused !important;*/ +/*}*/ .theme--light .animation-blink { background: repeating-linear-gradient( @@ -151,7 +151,8 @@ export default { rgba(255, 255, 255, 0.9) 45px, rgba(255, 255, 255, 0.9) 90px ) !important; - animation: light-blink 3s infinite alternate ease-in-out; + box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); +/* animation: light-blink 3s infinite alternate ease-in-out;*/ } .theme--dark .animation-blink { @@ -162,28 +163,29 @@ export default { rgba(46, 46, 46, 0.9) 45px, rgba(46, 46, 46, 0.9) 90px ) !important; - animation: dark-blink 3s infinite alternate ease-in-out; + box-shadow: 0 0 0 3px rgba(255, 255, 255, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); + /*animation: dark-blink 3s infinite alternate ease-in-out;*/ } -@keyframes light-blink { - from { - text-shadow: 0 0 0 rgba(0, 0, 0, .2); - box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); - } - to { - text-shadow: 0 0 5px rgba(0, 0, 0, .2); - box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); - } -} +/*@keyframes light-blink {*/ +/* from {*/ +/* text-shadow: 0 0 0 rgba(0, 0, 0, .2);*/ +/* box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);*/ +/* }*/ +/* to {*/ +/* text-shadow: 0 0 5px rgba(0, 0, 0, .2);*/ +/* box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);*/ +/* }*/ +/*}*/ -@keyframes dark-blink { - from { - text-shadow: 0 0 0 rgba(255, 255, 255, .3); - box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); - } - to { - text-shadow: 0 0 5px rgba(255, 255, 255, .3); - box-shadow: 0 0 0 3px rgba(255, 255, 255, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); - } -} +/*@keyframes dark-blink {*/ +/* from {*/ +/* text-shadow: 0 0 0 rgba(255, 255, 255, .3);*/ +/* box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);*/ +/* }*/ +/* to {*/ +/* text-shadow: 0 0 5px rgba(255, 255, 255, .3);*/ +/* box-shadow: 0 0 0 3px rgba(255, 255, 255, .5), 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);*/ +/* }*/ +/*}*/ \ No newline at end of file diff --git a/src/views/Planner.vue b/src/views/Planner.vue index 26305a90..86b13aba 100644 --- a/src/views/Planner.vue +++ b/src/views/Planner.vue @@ -898,7 +898,7 @@ for (const itemData of imported) { if (!(itemData.hasOwnProperty("need") && Number.isInteger(itemData.need) && itemData.need >= 0 && itemData.hasOwnProperty("have") && Number.isInteger(itemData.have) && itemData.have >= 0)) { - Console.warn("one of the item data is invalid. not importing this and continue to the next one (reason: need or have invalid): ", itemData) + Console.info("one of the item data is invalid. not importing this and continue to the next one (reason: need or have invalid): ", itemData) continue } const haveId = itemData.hasOwnProperty("id"); @@ -910,7 +910,7 @@ convertedImported.push(itemData) } else if (!haveId) { if (!haveName) { - Console.warn("one of the item data is invalid. not importing this and continue to the next one (reason: no id and name): ", itemData) + Console.info("one of the item data is invalid. not importing this and continue to the next one (reason: no id and name): ", itemData) continue } const item = get.items.byName(itemData.name); @@ -928,7 +928,7 @@ for (const item of convertedImported) { const object = this.itemsData.find(el => el.id === item.id); if (!object) { - Console.warn("no item found with", item); + Console.info("no item found with", item); continue } object.have = item.have; From 46b32e932088331cdd69ba49fb78113b23c95985 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sat, 4 Apr 2020 00:35:14 -0400 Subject: [PATCH 02/20] refactor(const-instead-of-let): use `const` for applicable variable declarations instead of `let` --- src/components/global/ItemStepper.vue | 2 +- src/components/global/RandomBackground.vue | 8 +-- src/components/stats/StageSelector.vue | 8 +-- src/components/toolbar/AccountManager.vue | 6 +-- src/main.js | 19 ++++++- src/mixins/SpecialUI.js | 2 +- src/mixins/hooks/CrispCustomizer.js | 6 +++ src/utils/strings.js | 2 +- src/utils/timeFormatter.js | 2 +- src/views/About/Members.vue | 4 +- src/views/Home.vue | 3 +- src/views/Planner.vue | 10 ++-- src/views/Report.vue | 58 +++++++++++----------- src/views/Stats/Item.vue | 8 +-- 14 files changed, 80 insertions(+), 58 deletions(-) diff --git a/src/components/global/ItemStepper.vue b/src/components/global/ItemStepper.vue index 13ba6bae..e4313c6b 100644 --- a/src/components/global/ItemStepper.vue +++ b/src/components/global/ItemStepper.vue @@ -91,7 +91,7 @@ }, watch: { quantity: function (newValue, oldValue) { - let diff = newValue - oldValue; + const diff = newValue - oldValue; this.$emit("change", [this.item.itemId, diff]) } }, diff --git a/src/components/global/RandomBackground.vue b/src/components/global/RandomBackground.vue index 40c7f85a..decfc6ba 100644 --- a/src/components/global/RandomBackground.vue +++ b/src/components/global/RandomBackground.vue @@ -92,20 +92,20 @@ }, async updateBackgroundByRandom(ignoreUrl) { // Console.log("check at random", this.isSpecialUrl(this.$route), this.$route) - let isSpecial = this.isSpecialUrl(this.$route); + const isSpecial = this.isSpecialUrl(this.$route); if (ignoreUrl || isSpecial === false) { this.updateBackgroundByUrl(await this.getRandomBackgroundUrl()) } }, async updateBackgroundByUrl(url) { - let background = this.$refs.background; + const background = this.$refs.background; this.lastLoading = true; window.fetch(url) .then((response) => { return response.blob(); }) .then((blob) => { - let dataUrl = URL.createObjectURL(blob); + const dataUrl = URL.createObjectURL(blob); background.style.backgroundImage = `url(${dataUrl})`; // Console.log(`created ${dataUrl} | revoking ${this.lastUrl}`) !this.lastUrl && URL.revokeObjectURL(this.lastUrl); @@ -125,7 +125,7 @@ checkSpecialImage (to, from) { if (this.isSpecialUrl(to)) { // yes we do have a special image for the CURRENT path. APPLY IT! - let imageUrl = this.specialImageMap[to.params.stageId] + const imageUrl = this.specialImageMap[to.params.stageId] this.updateBackgroundByUrl(imageUrl) } else if (this.isSpecialUrl(from)) { // we do not have a special image for the current path but we DO have a special image for the PREVIOUS path. diff --git a/src/components/stats/StageSelector.vue b/src/components/stats/StageSelector.vue index 3f13aaa0..0f857400 100644 --- a/src/components/stats/StageSelector.vue +++ b/src/components/stats/StageSelector.vue @@ -322,10 +322,10 @@ categorizedZones() { const categoriesSet = [["ACTIVITY_OPEN", "MAINLINE"], ["WEEKLY"]]; if (!this.hideClosed) categoriesSet[1].push("ACTIVITY_CLOSED"); - let result = [[], []]; - for (let [index, categories] of categoriesSet.entries()) { - for (let category of categories) { - let filter = null; + const result = [[], []]; + for (const [index, categories] of categoriesSet.entries()) { + for (const category of categories) { + let filter; let zones = get.zones.byType(category.startsWith("ACTIVITY") ? "ACTIVITY" : category); if (category === "ACTIVITY_OPEN") { filter = zone => !zone.isOutdated; diff --git a/src/components/toolbar/AccountManager.vue b/src/components/toolbar/AccountManager.vue index 17ae8e0b..c85408cc 100644 --- a/src/components/toolbar/AccountManager.vue +++ b/src/components/toolbar/AccountManager.vue @@ -208,7 +208,7 @@ } }, mounted () { - let userId = Cookies.get(this.cookies.key); + const userId = Cookies.get(this.cookies.key); if (userId !== this.$store.getters['auth/username']) { this.$store.commit("auth/login", userId); } @@ -226,12 +226,12 @@ color: "success", text: this.$t('success') }; - this.$store.dispatch("data/refreshPersonalMatrix"); this.$emit('afterLogin'); this.auth.dialog = false + this.$store.dispatch("data/refreshPersonalMatrix"); }) .catch((err) => { - Console.error("AccountManager", "auth failed", err) + Console.info("[AccountManager] auth failed", err) if (err.response && err.response.status && err.response.status === 404) { this.error = this.$t('failed.message', {message: this.$t('failed.notfound')}) } else { diff --git a/src/main.js b/src/main.js index a5603faf..752c707f 100644 --- a/src/main.js +++ b/src/main.js @@ -54,7 +54,24 @@ if (production) { "QuotaExceededError", "vivoNewsDetailPage", "Request aborted", - "TypeError: Cannot read property 'style' of null" + "TypeError: Cannot read property 'style' of null", + "removeAD" + ], + ignoreUrls: [ + // Facebook flakiness + /graph\.facebook\.com/i, + // Facebook blocked + /connect\.facebook\.net\/en_US\/all\.js/i, + // Woopra flakiness + /eatdifferent\.com\.woopra-ns\.com/i, + /static\.woopra\.com\/js\/woopra\.js/i, + // Chrome extensions + /extensions\//i, + /^chrome:\/\//i, + // Other plugins + /127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb + /webappstoolbarba\.texthelp\.com\//i, + /metrics\.itunes\.apple\.com\.edgesuite\.net\//i ] }); } diff --git a/src/mixins/SpecialUI.js b/src/mixins/SpecialUI.js index 1f362dae..c51858e2 100644 --- a/src/mixins/SpecialUI.js +++ b/src/mixins/SpecialUI.js @@ -4,7 +4,7 @@ export default { computed: { isInSpecialUI () { const time = new Date().getTime() >= 1585929600000 && new Date().getTime() <= 1586031000000 - Console.info( + Console.debug( "Special UI conditions matching:", "In special ui time duration", time, diff --git a/src/mixins/hooks/CrispCustomizer.js b/src/mixins/hooks/CrispCustomizer.js index 144a0a67..affcef8a 100644 --- a/src/mixins/hooks/CrispCustomizer.js +++ b/src/mixins/hooks/CrispCustomizer.js @@ -7,10 +7,16 @@ export default { 'crispOpacityChanger' ], }, + data() { + return { + crispLoaded: false + } + }, mixins: [SpecialUI], created () { 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") try { diff --git a/src/utils/strings.js b/src/utils/strings.js index 738f983a..1f60ecf6 100644 --- a/src/utils/strings.js +++ b/src/utils/strings.js @@ -18,7 +18,7 @@ function translate (object, key) { if (languages.length <= 2 && languages[0] !== "") { return getLocaleMessage(object, localeKey, key, languages[0]) } else { - Console.warn(`translation error: ${key}: Specific country code detected but it's invalid`, locale, languages) + Console.warn("StringI18n", `translation error: ${key}: Specific country code detected but it's invalid`, locale, languages) return "" } } diff --git a/src/utils/timeFormatter.js b/src/utils/timeFormatter.js index a29ba066..08d1b160 100644 --- a/src/utils/timeFormatter.js +++ b/src/utils/timeFormatter.js @@ -18,7 +18,7 @@ const FORMATS = { }; function needYear(moments) { - for (let index in 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']))) { return true diff --git a/src/views/About/Members.vue b/src/views/About/Members.vue index ffe38f4d..130360f8 100644 --- a/src/views/About/Members.vue +++ b/src/views/About/Members.vue @@ -451,8 +451,8 @@ return this.socials.find(v => v.id === id) }, renderResponsibility (responsibilities) { - let translated = []; - for (let responsibility of responsibilities) { + const translated = []; + for (const responsibility of responsibilities) { translated.push(this.$t(`responsibilities.${responsibility}`)) } return translated.join(this.$t('meta.separator')) diff --git a/src/views/Home.vue b/src/views/Home.vue index 8c4f7470..fb95610f 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -74,7 +74,6 @@ export default { components: {License, Contribute, Donate, Intro, Bulletin, Contact }, data: () => ({}), mounted () { - Console.info("mounted"); setTimeout(() => { try { anime({ @@ -94,7 +93,7 @@ export default { easing: "easeOutQuint" }) } catch (e) { - Console.error("HomeAnimation", "error when animating home entry animation", e) + Console.warn("HomeAnimation", "error when animating home entry animation", e) } }, 0); diff --git a/src/views/Planner.vue b/src/views/Planner.vue index 86b13aba..0345474f 100644 --- a/src/views/Planner.vue +++ b/src/views/Planner.vue @@ -829,7 +829,7 @@ data.stages = data.stages.map(el => { el.materials = []; - for (let [name, value] of Object.entries(el.items)) { + for (const [name, value] of Object.entries(el.items)) { const item = get.items.byName(name); el.materials.push({ name: strings.translate(item, "name"), @@ -845,7 +845,7 @@ }; el.target.name = strings.translate(el.target.item, "name"); el.items = []; - for (let [name, value] of Object.entries(el.materials)) { + for (const [name, value] of Object.entries(el.materials)) { const item = get.items.byName(name); el.items.push({ name: strings.translate(item, "name"), @@ -857,7 +857,7 @@ }); data.values = data.values.map(el => { el.materials = []; - for (let {name, value} of el.items) { + for (const {name, value} of el.items) { if (parseFloat(value) === 0) continue; const itemObject = get.items.byName(name); el.materials.push({ @@ -868,7 +868,7 @@ } return el }); - Console.log(data) + Console.debug(data) this.$set(this.calculation, "data", data); this.calculation.done = true }) @@ -894,7 +894,7 @@ this.importToItemsData(imported) }, importToItemsData(imported) { - let convertedImported = []; + const convertedImported = []; for (const itemData of imported) { if (!(itemData.hasOwnProperty("need") && Number.isInteger(itemData.need) && itemData.need >= 0 && itemData.hasOwnProperty("have") && Number.isInteger(itemData.have) && itemData.have >= 0)) { diff --git a/src/views/Report.vue b/src/views/Report.vue index 32432e44..a9d3b374 100644 --- a/src/views/Report.vue +++ b/src/views/Report.vue @@ -566,8 +566,8 @@ export default { }, stageItems() { if (!this.selected.stage) return []; - let stages = this.selectedStage; - let items = []; + const stages = this.selectedStage; + const items = []; const categories = [{ i18n: "normal", value: "normalDrop" @@ -580,12 +580,12 @@ export default { }]; for (let category of categories) { - let dropIds = stages[category.value]; + const dropIds = stages[category.value]; // skip the category where it is not having any drop if (dropIds.length === 0) continue; - let drops = []; + const drops = []; for (let drop of dropIds) { drops.push(get.items.byItemId(drop)) } @@ -611,7 +611,7 @@ export default { validation() { // initiate the array that will be storing every data outlier /** @type ItemOutlier[] */ - let itemOutliers = []; + const itemOutliers = []; /** @type TypeOutlier */ let typeOutlier = null; @@ -623,8 +623,8 @@ export default { * @returns {String|boolean} error message or success */ function validate(rules, quantity) { - for (let rule of rules) { - let evaluation = rule(quantity); + for (const rule of rules) { + const evaluation = rule(quantity); if (evaluation !== true) return evaluation } return true @@ -637,19 +637,19 @@ export default { * @returns {number} percentage in decimal format (e.g. 150% = 1.5) */ function calculateOutlierRate(limitation, value) { - let upper = (value - limitation.upper) ? Math.max(0, (value - limitation.upper) / limitation.upper) : 0; - let lower = (limitation.lower - value) ? Math.max(0, (limitation.lower - value) / limitation.lower) : 0; + 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; } // check for item outlier - for (let item of this.results) { + for (const item of this.results) { // if the item is not having a limitation record then skip it if (!this.limitation["itemQuantityBounds"].find(v => v["itemId"] === item.itemId)) continue; - let [rules, limitation] = this.generateVerificationRule("item", item.itemId); - let validation = validate(rules, item.quantity); + const [rules, limitation] = this.generateVerificationRule("item", item.itemId); + const validation = validate(rules, item.quantity); if (validation !== true) { - let rate = calculateOutlierRate(limitation, item.quantity); + const rate = calculateOutlierRate(limitation, item.quantity); itemOutliers.push({ id: item.itemId, quantity: item.quantity, @@ -662,9 +662,9 @@ export default { // check for type outlier if (!this.isGacha && this.limitation["itemTypeBounds"]) { - let [rules, limitation] = this.generateVerificationRule("type"); - let quantity = this.results.length; - let validation = validate(rules, quantity); + const [rules, limitation] = this.generateVerificationRule("type"); + const quantity = this.results.length; + const validation = validate(rules, quantity); if (validation !== true) { let rate = calculateOutlierRate(limitation, quantity); typeOutlier = { @@ -677,12 +677,12 @@ export default { } // calculate total outlier rate - let itemRatesInitial = 0; - let itemRates = itemOutliers.reduce( + const itemRatesInitial = 0; + const itemRates = itemOutliers.reduce( (accumulator, current) => accumulator + current.rate, itemRatesInitial ); - let totalRates = itemRates + (typeOutlier ? typeOutlier.rate : 0); + const totalRates = itemRates + (typeOutlier ? typeOutlier.rate : 0); return { item: itemOutliers, @@ -691,7 +691,7 @@ export default { } }, valid() { - let { item, type } = this.validation; + const { item, type } = this.validation; return item.length === 0 && type === null }, limitation() { @@ -733,7 +733,7 @@ export default { item.quantity <= 0 && (this.results = this.results.filter(v => v.itemId !== item.itemId)) }, getOrCreateItem(itemId) { - let item = this.results.find(v => v.itemId === itemId); + const item = this.results.find(v => v.itemId === itemId); if (item === undefined) { this.results.push({ itemId, @@ -759,13 +759,13 @@ export default { async doSubmit() { this.submitted = false; this.submitting = true; - let userId = Cookies.get('userID'); - let { data } = await report.submitReport({ + const userId = Cookies.get('userID'); + const { data } = await report.submitReport({ stageId: this.selected.stage, drops: this.results, furnitureNum: this.furniture ? 1 : 0 }); - let reportedUserId = Cookies.get('userID'); + const reportedUserId = Cookies.get('userID'); if (userId !== reportedUserId) { this.$store.commit("auth/login", reportedUserId); } @@ -793,7 +793,7 @@ export default { this.dialogs.repeat.enabled = false }, generateVerificationRule(type, value = null) { - let isItemType = type === "item"; + const isItemType = type === "item"; let limitation; if (isItemType) { limitation = this.limitation["itemQuantityBounds"].find(v => v["itemId"] === value)["bounds"]; @@ -804,25 +804,25 @@ export default { return []; } - let itemResponse = isItemType ? { item: strings.translate(this.getItem(value), "name") } : {}; + const itemResponse = isItemType ? { item: strings.translate(this.getItem(value), "name") } : {}; const gte = (value) => { return (compare) => { - let response = { ...itemResponse, quantity: Array.isArray(value) ? value.join(", ") : value }; + const response = { ...itemResponse, quantity: Array.isArray(value) ? value.join(", ") : value }; return compare >= value ? true : this.$t(`report.rules.${type}.gte`, response) } }; const lte = (value) => { return (compare) => { - let response = { ...itemResponse, quantity: Array.isArray(value) ? value.join(", ") : value }; + const response = { ...itemResponse, quantity: Array.isArray(value) ? value.join(", ") : value }; return compare <= value ? true : this.$t(`report.rules.${type}.lte`, response) } }; const notIncludes = (values) => { return (compare) => { - let response = { ...itemResponse, quantity: Array.isArray(value) ? value.join(", ") : value }; + const response = { ...itemResponse, quantity: Array.isArray(value) ? value.join(", ") : value }; return values.indexOf(compare) === -1 ? true : this.$t(`report.rules.${type}.not`, response) } }; diff --git a/src/views/Stats/Item.vue b/src/views/Stats/Item.vue index 141a493f..31172489 100644 --- a/src/views/Stats/Item.vue +++ b/src/views/Stats/Item.vue @@ -247,10 +247,10 @@ export default { ]; }, categorizedItems() { - let all = get.items.all(); + const all = get.items.all(); const categories = ["MATERIAL", "CARD_EXP", "FURN", "ACTIVITY_ITEM"]; - let results = {}; - for (let category of categories) { + const results = {}; + for (const category of categories) { results[category] = all.filter(el => el.itemType === category); // move 3003 to the last member results[category].sort((a, b) => { @@ -295,7 +295,7 @@ export default { }); break; default: - Console.error( + Console.warn( "StatsByItem", "unexpected step number", newValue, From 7e9267da19cc3f1427104ce6130f77b038238ab4 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sat, 4 Apr 2020 01:12:57 -0400 Subject: [PATCH 03/20] fix(sentry-spike): add rate limit to every client sending error report --- src/main.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 752c707f..db0a4449 100644 --- a/src/main.js +++ b/src/main.js @@ -18,13 +18,18 @@ import { Integrations as ApmIntegrations } from '@sentry/apm'; const production = process.env.NODE_ENV === 'production'; if (production) { + const sentEvents = {}; + + // set the limitation of a same client sending the same message event to Sentry for every session + const maxSameEventPerClient = 20; + Sentry.init({ dsn: 'https://9636aaa824a744f98a619df0aaabba00@sentry.io/1536764', integrations: [ new Integrations.Vue({Vue, attachProps: true}), new ApmIntegrations.Tracing(), ], - tracesSampleRate: 0.001, + tracesSampleRate: 0.005, release: 'frontend-v2@' + (config.version || 'unknown'), ignoreErrors: [ //// START: those errors are found at https://docs.sentry.io/platforms/javascript/#decluttering-sentry @@ -72,7 +77,25 @@ if (production) { /127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb /webappstoolbarba\.texthelp\.com\//i, /metrics\.itunes\.apple\.com\.edgesuite\.net\//i - ] + ], + beforeSend(event) { + const {message} = event; + if (message in sentEvents) { + 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; + // report event + return event + } + } else { + // this has not yet been sent; init var and send it + sentEvents[message] = 1; + return event + } + } }); } From 7eb7b19162c12b1589519c415108e85bf8d1e3dd Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sat, 4 Apr 2020 14:23:37 -0400 Subject: [PATCH 04/20] feat(csp): add csp support for zeit now previews --- build/serve.json | 26 +++++++++++++++++++ now.json | 18 ++++++++++--- package.json | 7 ++--- .../preloader-i18n-inline.js | 0 src/utils/Console.js | 23 +++++++--------- src/views/Home.vue | 2 +- src/views/Planner.vue | 2 +- 7 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 build/serve.json rename src/{build => assets}/preloader-i18n-inline.js (100%) diff --git a/build/serve.json b/build/serve.json new file mode 100644 index 00000000..d5c9d01a --- /dev/null +++ b/build/serve.json @@ -0,0 +1,26 @@ +{ + "public": "dist", + "headers": [ + { + "source": "/service-worker.js", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=0, must-revalidate" + } + ] + }, + { + "source": "**", + "headers": [ + { + "key": "Content-Security-Policy", + "value": "default-src 'self'; script-src 'self' 'unsafe-inline' https://client.crisp.chat https://settings.crisp.chat https://www.google-analytics.com/; script-src-attr 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://client.crisp.chat; img-src 'self' data: blob: https://penguin.upyun.galvincdn.com https://www.google-analytics.com https://stats.g.doubleclick.net https://image.crisp.chat https://client.crisp.chat; font-src 'self' https://fonts.gstatic.com https://fonts.gstatic.cn https://client.crisp.chat; connect-src 'self' https://penguin-stats.io https://penguin.upyun.galvincdn.com https://sentry.io https://client.crisp.chat wss://client.relay.crisp.chat https://storage.crisp.chat; prefetch-src 'self' https://penguin.upyun.galvincdn.com; upgrade-insecure-requests; block-all-mixed-content" + } + ] + } + ], + "rewrites": [ + { "source": "**", "destination": "/index.html" } + ] +} \ No newline at end of file diff --git a/now.json b/now.json index 608fa279..6674faf0 100644 --- a/now.json +++ b/now.json @@ -4,12 +4,24 @@ "headers": [ { "source": "/service-worker.js", - "headers" : [ + "headers": [ { - "key" : "Cache-Control", - "value" : "public, max-age=0, must-revalidate" + "key": "Cache-Control", + "value": "public, max-age=0, must-revalidate" + } + ] + }, + { + "source": "**", + "headers": [ + { + "key": "Content-Security-Policy", + "value": "default-src 'self'; script-src 'self' 'unsafe-inline' https://client.crisp.chat https://settings.crisp.chat https://www.google-analytics.com/; script-src-attr 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://client.crisp.chat; img-src 'self' data: blob: https://penguin.upyun.galvincdn.com https://www.google-analytics.com https://stats.g.doubleclick.net https://image.crisp.chat https://client.crisp.chat; font-src 'self' https://fonts.gstatic.com https://fonts.gstatic.cn https://client.crisp.chat; connect-src 'self' https://penguin-stats.io https://penguin.upyun.galvincdn.com https://sentry.io https://client.crisp.chat wss://client.relay.crisp.chat https://storage.crisp.chat; prefetch-src 'self' https://penguin.upyun.galvincdn.com; upgrade-insecure-requests; block-all-mixed-content" } ] } + ], + "rewrites": [ + { "source": "**", "destination": "/index.html" } ] } \ No newline at end of file diff --git a/package.json b/package.json index 4fd9b01d..8ca185ac 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,10 @@ "build:single": "npx --max_old_space_size=4096 vue-cli-service build", "lint": "vue-cli-service lint", "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'", - "submit": "git add . && git cz && git push", - "preview": "yarn build && serve -s -d dist", - "preview:single": "yarn build:single && serve -s -d dist" + + "serveDist": "serve -c build/serve.json", + "preview": "yarn build && yarn serveDist", + "preview:single": "yarn build:single && yarn serveDist" }, "dependencies": { "@babel/plugin-transform-modules-commonjs": "^7.8.3", diff --git a/src/build/preloader-i18n-inline.js b/src/assets/preloader-i18n-inline.js similarity index 100% rename from src/build/preloader-i18n-inline.js rename to src/assets/preloader-i18n-inline.js diff --git a/src/utils/Console.js b/src/utils/Console.js index 69f0d7e3..8d57b5a9 100644 --- a/src/utils/Console.js +++ b/src/utils/Console.js @@ -8,28 +8,25 @@ function reportSentry(severity, component, contents) { } class Console { - static debug (...content) { + static debug (component, ...content) { this._render("debug", ...content) } - static info (...content) { + static info (component, ...content) { this._render("info", ...content) } static warn (component, ...content) { - const contents = [`[${component}]`, ...content]; - this._render("warn", ...contents); - reportSentry("warning", component, contents) + this._render("warn", ...content); + reportSentry("warning", component, content) } static error (component, ...content) { - const contents = [`[${component}]`, ...content]; - this._render("error", ...contents); - reportSentry("error", component, contents) + this._render("error", ...content); + reportSentry("error", component, content) } static fatal (component, ...content) { - const contents = [`[FATAL] [${component}]`, ...content]; - this._render("error", ...contents); - reportSentry("fatal", component, contents) + this._render("error", ...content); + reportSentry("fatal", component, content) } - static log (...content) { + static log (component, ...content) { this._render("log", ...content) } /** @@ -38,7 +35,7 @@ class Console { */ static _render (level, ...content) { const PROD_IGNORE = ["debug"]; - if (process.env.NODE_ENV !== "production" && (PROD_IGNORE.includes(level))) return; + if (process.env.NODE_ENV === "production" && (PROD_IGNORE.includes(level))) return; const now = new Date(); const date = `${now.getDate()} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}.${now.getMilliseconds()}`; let prefix = `(${date})`; diff --git a/src/views/Home.vue b/src/views/Home.vue index fb95610f..69ed9e9b 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -101,7 +101,7 @@ export default { setTimeout(() => { const el1 = document.querySelector(".card-translate-up"); const el2 = document.querySelector(".card-translate-up h1"); - if (el1.style.opacity === "0" || el2.style.opacity === "0") { + if ((el1 && el1.style.opacity === "0") || (el2 && el2.style.opacity === "0")) { Console.warn("HomeAnimation", "potential blank screen on home detected"); // try to fix this diff --git a/src/views/Planner.vue b/src/views/Planner.vue index 0345474f..194d6baa 100644 --- a/src/views/Planner.vue +++ b/src/views/Planner.vue @@ -952,7 +952,7 @@ }) }, redirectItem(itemId) { - console.log(itemId) + Console.debug(itemId) this.$router.push({ name: "StatsByItem_SelectedItem", params: { From d23b1a14752daf8d315d5f1d85da731d7d1cd3cd Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sat, 4 Apr 2020 19:00:38 -0400 Subject: [PATCH 05/20] ci(now): fix `now` deployment failure --- now.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/now.json b/now.json index 6674faf0..66fa1f28 100644 --- a/now.json +++ b/now.json @@ -20,8 +20,5 @@ } ] } - ], - "rewrites": [ - { "source": "**", "destination": "/index.html" } ] } \ No newline at end of file From 0cd95b9ce59e1ea983c6cb2fb69f28294113dfcf Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sat, 4 Apr 2020 19:02:11 -0400 Subject: [PATCH 06/20] ci(now): fix `now` deployment failure --- now.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/now.json b/now.json index 66fa1f28..6bec3d0e 100644 --- a/now.json +++ b/now.json @@ -12,7 +12,7 @@ ] }, { - "source": "**", + "source": "(.*)", "headers": [ { "key": "Content-Security-Policy", From 341e5b5f9c28f9a11a77b2efc57e81f2a8d84292 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sun, 5 Apr 2020 13:12:25 -0400 Subject: [PATCH 07/20] feat(console): make our console messages prettier --- src/components/global/RandomBackground.vue | 2 +- src/components/stats/StageSelector.vue | 2 +- src/components/toolbar/AccountManager.vue | 2 +- src/mixins/I18n.js | 4 +-- src/mixins/SpecialUI.js | 1 + src/mixins/hooks/Localization.js | 2 +- src/utils/Console.js | 29 +++++++++++++--------- src/utils/getters.js | 2 -- src/utils/objectManager.js | 2 +- src/views/Planner.vue | 11 ++++---- src/views/Stats/Item.vue | 8 +++--- 11 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/components/global/RandomBackground.vue b/src/components/global/RandomBackground.vue index decfc6ba..dec3bb2b 100644 --- a/src/components/global/RandomBackground.vue +++ b/src/components/global/RandomBackground.vue @@ -65,7 +65,7 @@ return `https://penguin.upyun.galvincdn.com/backgrounds/${id}.${this.webpSupport ? 'webp' : 'optimized.png'}` }, setBlur (flag) { - Console.info("setting blur to", flag) + Console.info("RandomBackground", "setting blur to", flag) this.blurred = flag }, async testWebp() { diff --git a/src/components/stats/StageSelector.vue b/src/components/stats/StageSelector.vue index 0f857400..0918233c 100644 --- a/src/components/stats/StageSelector.vue +++ b/src/components/stats/StageSelector.vue @@ -363,7 +363,7 @@ return get.stages.byParentZoneId(zoneId); }, selectStage (zone, stage) { - Console.log("chose", zone, stage); + Console.log("StageSelector", "chose", zone, stage); this.selected.zone = zone; this.selected.stage = stage; this.$emit("select", {zone, stage}); diff --git a/src/components/toolbar/AccountManager.vue b/src/components/toolbar/AccountManager.vue index c85408cc..71c1b05d 100644 --- a/src/components/toolbar/AccountManager.vue +++ b/src/components/toolbar/AccountManager.vue @@ -231,7 +231,7 @@ this.$store.dispatch("data/refreshPersonalMatrix"); }) .catch((err) => { - Console.info("[AccountManager] auth failed", err) + Console.info("AccountManager", "auth failed", err) if (err.response && err.response.status && err.response.status === 404) { this.error = this.$t('failed.message', {message: this.$t('failed.notfound')}) } else { diff --git a/src/mixins/I18n.js b/src/mixins/I18n.js index 8343b771..edf6b3e6 100644 --- a/src/mixins/I18n.js +++ b/src/mixins/I18n.js @@ -6,7 +6,7 @@ export default { changeLocale(localeId, save = true) { dayjs.locale(localeId); if (localeId !== this.$i18n.locale) { - Console.info("[i18n] locale changed to:", localeId, "| saving to vuex:", save); + Console.info("i18n", "locale changed to:", localeId, "| saving to vuex:", save); this.$i18n.locale = localeId; this.$vuetify.lang.current = localeId; document.title = `${this.$t(this.$route.meta.i18n) + ' | ' || ''}${this.$t('app.name')}`; @@ -14,7 +14,7 @@ export default { // this.$vuetify.lang.current = localeId; if (save) this.$store.commit("settings/changeLocale", localeId); } else { - Console.info("[i18n] Same locale"); + Console.info("i18n", "Same locale"); } } }, diff --git a/src/mixins/SpecialUI.js b/src/mixins/SpecialUI.js index c51858e2..c1f0cf4a 100644 --- a/src/mixins/SpecialUI.js +++ b/src/mixins/SpecialUI.js @@ -5,6 +5,7 @@ export default { isInSpecialUI () { const time = new Date().getTime() >= 1585929600000 && new Date().getTime() <= 1586031000000 Console.debug( + "SpecialUI", "Special UI conditions matching:", "In special ui time duration", time, diff --git a/src/mixins/hooks/Localization.js b/src/mixins/hooks/Localization.js index 5f3a255f..bf01f099 100644 --- a/src/mixins/hooks/Localization.js +++ b/src/mixins/hooks/Localization.js @@ -9,7 +9,7 @@ export default { this.changeLocale(this.language, false) } else { const language = strings.getFirstBrowserLanguage(); - Console.info("[i18n] detected language", language); + 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. diff --git a/src/utils/Console.js b/src/utils/Console.js index 8d57b5a9..f5b03528 100644 --- a/src/utils/Console.js +++ b/src/utils/Console.js @@ -9,41 +9,46 @@ function reportSentry(severity, component, contents) { class Console { static debug (component, ...content) { - this._render("debug", ...content) + this._render("debug", component, ...content) } static info (component, ...content) { - this._render("info", ...content) + this._render("info", component, ...content) } static warn (component, ...content) { - this._render("warn", ...content); + this._render("warn", component, ...content); reportSentry("warning", component, content) } static error (component, ...content) { - this._render("error", ...content); + this._render("error", component, ...content); reportSentry("error", component, content) } static fatal (component, ...content) { - this._render("error", ...content); + this._render("error", component, ...content); reportSentry("fatal", component, content) } static log (component, ...content) { - this._render("log", ...content) + this._render("log", component, ...content) } /** * @static * @private */ - static _render (level, ...content) { + static _render (level, component, ...content) { const PROD_IGNORE = ["debug"]; if (process.env.NODE_ENV === "production" && (PROD_IGNORE.includes(level))) return; - const now = new Date(); - const date = `${now.getDate()} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}.${now.getMilliseconds()}`; - let prefix = `(${date})`; + // const now = new Date(); + // const date = `${now.getDate()} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}.${now.getMilliseconds()}`; + + const prefix = [ + `%c${level}%c${component}`, + "background: #FF9800; color: #000; 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;" + ]; if (console[level]) { - console[level](prefix, ...content) + console[level](...prefix, ...content) } else { - console.log(prefix, ...content) + console.log(...prefix, ...content) } } } diff --git a/src/utils/getters.js b/src/utils/getters.js index 867d2954..103b2cb8 100644 --- a/src/utils/getters.js +++ b/src/utils/getters.js @@ -36,7 +36,6 @@ Getters.limitations = { Getters.statistics = { byItemId(itemId) { const stats = store.state.data[`${store.getters['dataSource/source']}Matrix`]; - Console.debug(stats) if (!stats) return []; return stats.filter(el => { return el.itemId === itemId @@ -44,7 +43,6 @@ Getters.statistics = { }, byStageId(stageId) { const stats = store.state.data[`${store.getters['dataSource/source']}Matrix`]; - Console.debug(stats) if (!stats) return []; return stats.filter(el => { return el.stageId === stageId diff --git a/src/utils/objectManager.js b/src/utils/objectManager.js index b5f43c0c..fcf9713e 100644 --- a/src/utils/objectManager.js +++ b/src/utils/objectManager.js @@ -87,7 +87,7 @@ class ObjectManager { cacheUpdateAtTemp[context.name] = now; store.commit("cacheUpdateAt/store", cacheUpdateAtTemp); - Console.info(`fetched data "${context.name}" at ${now}`); + Console.info("ObjectManager", `fetched data "${context.name}" at ${now}`); return context.cache }); diff --git a/src/views/Planner.vue b/src/views/Planner.vue index 194d6baa..11065e14 100644 --- a/src/views/Planner.vue +++ b/src/views/Planner.vue @@ -868,7 +868,7 @@ } return el }); - Console.debug(data) + Console.debug("Planner", data) this.$set(this.calculation, "data", data); this.calculation.done = true }) @@ -885,7 +885,7 @@ try { imported = JSON.parse(this.importJson); } catch (e) { - Console.info("json error", e) + Console.info("PlannerImport", "json error", e) snackbar.launch("error", 5000, "planner.import.jsonError", { error: e.toString() }); @@ -898,7 +898,7 @@ for (const itemData of imported) { if (!(itemData.hasOwnProperty("need") && Number.isInteger(itemData.need) && itemData.need >= 0 && itemData.hasOwnProperty("have") && Number.isInteger(itemData.have) && itemData.have >= 0)) { - Console.info("one of the item data is invalid. not importing this and continue to the next one (reason: need or have invalid): ", itemData) + Console.info("PlannerImport", "one of the item data is invalid. not importing this and continue to the next one (reason: need or have invalid): ", itemData) continue } const haveId = itemData.hasOwnProperty("id"); @@ -910,7 +910,7 @@ convertedImported.push(itemData) } else if (!haveId) { if (!haveName) { - Console.info("one of the item data is invalid. not importing this and continue to the next one (reason: no id and name): ", itemData) + Console.info("PlannerImport", "one of the item data is invalid. not importing this and continue to the next one (reason: no id and name): ", itemData) continue } const item = get.items.byName(itemData.name); @@ -928,7 +928,7 @@ for (const item of convertedImported) { const object = this.itemsData.find(el => el.id === item.id); if (!object) { - Console.info("no item found with", item); + Console.info("PlannerImport","no item found with", item); continue } object.have = item.have; @@ -952,7 +952,6 @@ }) }, redirectItem(itemId) { - Console.debug(itemId) this.$router.push({ name: "StatsByItem_SelectedItem", params: { diff --git a/src/views/Stats/Item.vue b/src/views/Stats/Item.vue index 31172489..690c9979 100644 --- a/src/views/Stats/Item.vue +++ b/src/views/Stats/Item.vue @@ -272,7 +272,7 @@ export default { }, watch: { $route: function(to, from) { - Console.log("step route changed from", from.path, "to", to.path); + Console.log("StatsByItem", "step route changed from", from.path, "to", to.path); if (to.name === "StatsByItem") { this.step = 1; } @@ -281,14 +281,14 @@ export default { } }, step: function(newValue, oldValue) { - Console.log("step changed from", oldValue, "to", newValue); + Console.log("StatsByItem", "step changed from", oldValue, "to", newValue); switch (newValue) { case 1: - Console.log("- [router go] index"); + Console.log("StatsByItem", "- [router go] index"); this.$router.push({ name: "StatsByItem" }); break; case 2: - Console.log("- [router go] item", this.selected.item.itemId); + Console.log("StatsByItem", "- [router go] item", this.selected.item.itemId); this.$router.push({ name: "StatsByItem_SelectedItem", params: { itemId: this.selected.item.itemId } From 0005e79435965e159a594d3b9cf1bf6bb1f2306b Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sun, 5 Apr 2020 13:32:50 -0400 Subject: [PATCH 08/20] build(npm): bump version --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8ca185ac..5a6eb0b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "penguin-stats-frontend", - "version": "1.1.5", + "version": "1.1.6", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -11,7 +11,9 @@ "serveDist": "serve -c build/serve.json", "preview": "yarn build && yarn serveDist", - "preview:single": "yarn build:single && yarn serveDist" + "preview:single": "yarn build:single && yarn serveDist", + + "release": "standard-version" }, "dependencies": { "@babel/plugin-transform-modules-commonjs": "^7.8.3", From a1b01f021873ede1c3b04a4a34594864f51ac2d7 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sun, 5 Apr 2020 13:36:09 -0400 Subject: [PATCH 09/20] style(eslint): fix eslint --- src/utils/getters.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/getters.js b/src/utils/getters.js index 103b2cb8..ca67d285 100644 --- a/src/utils/getters.js +++ b/src/utils/getters.js @@ -1,5 +1,4 @@ import store from '@/store' -import Console from "@/utils/Console"; let Getters = {}; From a818026f458957112b5d66a5bad59bcecb5047df Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sun, 5 Apr 2020 15:10:37 -0400 Subject: [PATCH 10/20] fix(i18n): fix i18n rehydration from vuex; remove special ui conditions --- CHANGELOG.md | 265 ++++++++++++++++++++- package.json | 2 - src/components/global/RandomBackground.vue | 2 +- src/main.js | 5 +- src/mixins/I18n.js | 4 + src/mixins/SpecialUI.js | 27 ++- src/views/About/Changelog.vue | 121 +++++++--- 7 files changed, 370 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e34d07a3..5f8e83b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,267 @@ -## [1.0.2](https://github.com/penguin-statistics/frontend-v2/compare/v1.0.1...v1.0.2) (2019-08-27) +# [All changes before](https://github.com/penguin-statistics/frontend-v2/compare/v1.0.0...v1.1.6) (v1.0.0...v1.1.6) ### Bug Fixes -* **changelog:** fix key index ([3e237b0](https://github.com/penguin-statistics/frontend-v2/commit/3e237b0)) -* **report:** fixed limitation error in Report ([7628267](https://github.com/penguin-statistics/frontend-v2/commit/7628267)) -* **report:** refactored Report view ([078f7f6](https://github.com/penguin-statistics/frontend-v2/commit/078f7f6)), closes [#125](https://github.com/penguin-statistics/frontend-v2/issues/125) [#123](https://github.com/penguin-statistics/frontend-v2/issues/123) [#26](https://github.com/penguin-statistics/frontend-v2/issues/26) +* **accountmanager:** added debug message to accountmanager ([ada5d19](https://github.com/penguin-statistics/frontend-v2/commit/ada5d19e6a9b205ee711572f30bdda9b486a025f)) +* **accountmanager:** auto login after report ([635d55e](https://github.com/penguin-statistics/frontend-v2/commit/635d55eec6e3c9dd85df86eebb2ab974b2e5cf08)) +* **accountmanager:** fix that the account login status won't be displayed after migration ([ca8d62f](https://github.com/penguin-statistics/frontend-v2/commit/ca8d62fc5befaf1f8fba7f52e60a740e3f7fae12)) +* **accountmanager:** fix that the account login status won't be displayed after migration ([67c201c](https://github.com/penguin-statistics/frontend-v2/commit/67c201ce362d06483895957c3b786ea28f902846)) +* **accountmanager.vue:** fix 'should perform login on keyboard enter' issue ([ca12ef8](https://github.com/penguin-statistics/frontend-v2/commit/ca12ef8f35869dd645971cb4d4c9c37a7da0fd16)), closes [#47](https://github.com/penguin-statistics/frontend-v2/issues/47) +* **accountmanager.vue:** fix [#55](https://github.com/penguin-statistics/frontend-v2/issues/55) about logout dialog not disappar ([de484e7](https://github.com/penguin-statistics/frontend-v2/commit/de484e7d0a0774ff09bb5972f5d9f500b0bfca13)) +* **app:** fixed [#71](https://github.com/penguin-statistics/frontend-v2/issues/71) ([dd94a7e](https://github.com/penguin-statistics/frontend-v2/commit/dd94a7e090548d096e46c3ee0f434cd98782c14d)) +* **app:** fixed eslint errors ([4d51372](https://github.com/penguin-statistics/frontend-v2/commit/4d513727a62d3eb6a6655332b3934cf8a30fa6d2)) +* **app:** fixed several issues ([8b3778e](https://github.com/penguin-statistics/frontend-v2/commit/8b3778e8100257be70d3ed5c852fe9899b1acd39)), closes [#28](https://github.com/penguin-statistics/frontend-v2/issues/28) [#33](https://github.com/penguin-statistics/frontend-v2/issues/33) [#34](https://github.com/penguin-statistics/frontend-v2/issues/34) +* **app:** isolate svg into separated file ([2997adf](https://github.com/penguin-statistics/frontend-v2/commit/2997adf46f76d70d7e0f44a72aecbef80789de86)), closes [#79](https://github.com/penguin-statistics/frontend-v2/issues/79) +* **cdn:** change cdn back to s3 ([9403743](https://github.com/penguin-statistics/frontend-v2/commit/94037438f7de1234b5c5b9d464d2c887cbf0efcc)), closes [#159](https://github.com/penguin-statistics/frontend-v2/issues/159) +* **changelog:** fix key index ([3e237b0](https://github.com/penguin-statistics/frontend-v2/commit/3e237b0ab647570c4e40df467f4b4a93a2021018)) +* **changelog:** use `更新记录` instead of `更新日志` for `change log`, fix redundancy changelog i18n entry ([7614398](https://github.com/penguin-statistics/frontend-v2/commit/761439805c1724bb16106a4f31ea9bbe325c9952)) +* **charts.vue:** fix 0 value skip issue ([10045cd](https://github.com/penguin-statistics/frontend-v2/commit/10045cdbffca463198620f092b7ebe27fdc4ed41)), closes [#16](https://github.com/penguin-statistics/frontend-v2/issues/16) +* **console-and-getter:** isolated Console into a customized function; optimized getter ([933e73f](https://github.com/penguin-statistics/frontend-v2/commit/933e73fc326e9200106ab48ea90922b432a78842)), closes [#179](https://github.com/penguin-statistics/frontend-v2/issues/179) +* **contribute:** change some text in Contribute ([9475532](https://github.com/penguin-statistics/frontend-v2/commit/9475532a963db64d1b01c6fd7c6f0385e4949bcc)) +* **crisp:** fix crisp location ([23803bf](https://github.com/penguin-statistics/frontend-v2/commit/23803bfe9921b854c681be9c8f9954eff501e4df)) +* **crisp:** fixed crisp opacity not changing on first visit ([32d4b48](https://github.com/penguin-statistics/frontend-v2/commit/32d4b48f9d7006d477b7fd1fd1a69ef801ccee3d)) +* **crisp:** resolved safe-area and darken the shadow for crisp; removed FAB in planner ([4613670](https://github.com/penguin-statistics/frontend-v2/commit/4613670d80c6f0060f1f14b9d4c394d1bc2c93a6)) +* **datasourcetoggle:** lol ([5994fd6](https://github.com/penguin-statistics/frontend-v2/commit/5994fd6052678fa34291aabc37ffaa9a0a773120)) +* **datasourcetoggle.vue:** fix cancel login not back to global data source issue ([2699ac6](https://github.com/penguin-statistics/frontend-v2/commit/2699ac6b1591ca796267e3ea3adb0e8cfa5e97d9)) +* **fetchalert:** fix the loading indicator ([adb52f0](https://github.com/penguin-statistics/frontend-v2/commit/adb52f0ba82874c3103c662bd81bcef4197a240f)) +* **fetchalert:** make the dialog not persistent ([d488710](https://github.com/penguin-statistics/frontend-v2/commit/d488710ef619465983bf9428c6e4632ed08bdbfd)) +* **footer:** fix footer position ([ca2ffe3](https://github.com/penguin-statistics/frontend-v2/commit/ca2ffe3b74f3b628cff668fbe62b37e6d4a18437)) +* **ga:** disable event logging for ArkPlanner temporarily ([8295bb5](https://github.com/penguin-statistics/frontend-v2/commit/8295bb53b810fff0ce474bf421dddea1c5413da6)) +* **ga:** fixed google analytics not reporting version number ([0d1eb1c](https://github.com/penguin-statistics/frontend-v2/commit/0d1eb1c59a7fbc757a84e8a8cbe7d9d9de146487)) +* **getters:** fixed the page not presenting data on first visit ([0b3e524](https://github.com/penguin-statistics/frontend-v2/commit/0b3e5242d1ae8499166fec33bf6ef4a124cfae48)) +* **getters:** revert changes ([f6bc0e2](https://github.com/penguin-statistics/frontend-v2/commit/f6bc0e2e2103a3dda6ad062b97d179895978d058)) +* **getters:** revert changes ([2d299e8](https://github.com/penguin-statistics/frontend-v2/commit/2d299e81213a91c053a2adba7a322dbf690d28cd)) +* **home:** fix home not animating ([b218c31](https://github.com/penguin-statistics/frontend-v2/commit/b218c3192af909ece3bfe93ea19c479810a17584)) +* **home:** fix the layout of homepage and fix some i18n issues ([9e99ffa](https://github.com/penguin-statistics/frontend-v2/commit/9e99ffab5f073aeb6e2d1a2bf8900e648613988c)) +* **home:** make the aos offset of second card smaller ([dc6e5bf](https://github.com/penguin-statistics/frontend-v2/commit/dc6e5bf1323c72c94e504482a531dfde0707d5e4)) +* **i18n:** add i18n for DataSourceToggle ([fc99aed](https://github.com/penguin-statistics/frontend-v2/commit/fc99aedd88717f84574501adcb39aee3e2c29ab9)), closes [#23](https://github.com/penguin-statistics/frontend-v2/issues/23) +* **i18n:** add translation to "Do not add Chapter 6 into calculation" ([d0bcf01](https://github.com/penguin-statistics/frontend-v2/commit/d0bcf01cf040b3b5d9e97d6d146a561aa7713601)) +* **i18n:** fix a Korean translation ([d402eb7](https://github.com/penguin-statistics/frontend-v2/commit/d402eb7a021b996e00b43d8e0207410f3ee68a59)) +* **i18n:** fix a translation in korean ([2c42cc1](https://github.com/penguin-statistics/frontend-v2/commit/2c42cc18baffda548f749905b9786bb8202ef763)) +* **i18n:** fix i18n used for the notice ([d52b2ad](https://github.com/penguin-statistics/frontend-v2/commit/d52b2ad509cd8276f85e47191cfa8cd763cae7ed)) +* **i18n:** fix ja translation for two new tooltips ([79dbc2a](https://github.com/penguin-statistics/frontend-v2/commit/79dbc2aeacc65383700436425a9350c6b1b11a98)) +* **i18n:** fix some translations ([a4a5447](https://github.com/penguin-statistics/frontend-v2/commit/a4a5447237706dbdb74df70b113c987cf11d218f)) +* **i18n:** fix the word of sanity in Japanese ([b87497d](https://github.com/penguin-statistics/frontend-v2/commit/b87497dc987ecf4ecc53abf8d8378175302cefcc)) +* **i18n:** refine Contribute.vue i18n ([b7d210d](https://github.com/penguin-statistics/frontend-v2/commit/b7d210dd3c65438ce3bdf899ccc8bb039fef86b6)) +* **index.html:** [#120](https://github.com/penguin-statistics/frontend-v2/issues/120) use async loading css temporarily ([6e2736c](https://github.com/penguin-statistics/frontend-v2/commit/6e2736cfb805951fd7218ff51d9f5e4fcb16ffc0)) +* **index.html:** gives a way more friendly notice for the geek guys who disabled JavaScript ([39c6651](https://github.com/penguin-statistics/frontend-v2/commit/39c665154de17cec69bf6bccba52d90d3358ade3)) +* **index.html:** use cdn for logo ([1cce025](https://github.com/penguin-statistics/frontend-v2/commit/1cce02507f6032798eabf48ae079ebf701a59d54)) +* **item:** remove +10 button ([4717205](https://github.com/penguin-statistics/frontend-v2/commit/4717205969d9b0c0822f57045f5e8f1c961ff5d8)) +* **itemcomponent:** fixed `Cannot read property 'meta' of undefined` ([cebdbb4](https://github.com/penguin-statistics/frontend-v2/commit/cebdbb48d712cc5f2ceb7367944a2c641e776244)) +* **itemcomponent:** fixed icon distortion ([201a5fd](https://github.com/penguin-statistics/frontend-v2/commit/201a5fd5d45fa694da4aa4b7bf70aefbcf9b0a34)) +* **itemicon.vue:** fix item icon furniture not display issue ([700b16a](https://github.com/penguin-statistics/frontend-v2/commit/700b16a5759a6d1025c9d69f33cff0f7b13fe516)) +* **itemicon.vue:** remove icon change transition ([e6f1b6f](https://github.com/penguin-statistics/frontend-v2/commit/e6f1b6f79e6bd0e5368b85e7b17e66236f5b033a)), closes [#52](https://github.com/penguin-statistics/frontend-v2/issues/52) +* **itemstepper:** fix itemstepper style ([cfed62d](https://github.com/penguin-statistics/frontend-v2/commit/cfed62ddf50ad7ccf4c2c524c141e0e56fdbe682)), closes [#32](https://github.com/penguin-statistics/frontend-v2/issues/32) +* **itemstepper:** fix the bug that limitation may be undefined ([bbd94ef](https://github.com/penguin-statistics/frontend-v2/commit/bbd94efb574371c60a22f60cb68eed36f687789e)) +* **links:** change the name of Links to Link Exchange ([a3d7ee0](https://github.com/penguin-statistics/frontend-v2/commit/a3d7ee04827b2641338633b1c4cf0bddc0460da6)) +* **links:** forgot japanese translation for one tag ([e202a53](https://github.com/penguin-statistics/frontend-v2/commit/e202a536624f93a739b12ae7ce958a54ff82db21)) +* **localeswitcher:** fix not saving to vuex when changing locale ([5f1e37a](https://github.com/penguin-statistics/frontend-v2/commit/5f1e37af6c0d12c968292706b206d112bd291407)) +* **logger:** re-enable warn & error logs in prod, removed warning event reports ([345ca23](https://github.com/penguin-statistics/frontend-v2/commit/345ca230b283df142e4ee0dcd2fc0cade721949c)) +* **login/logout icon:** fix the display bugs of login and logout ([37686da](https://github.com/penguin-statistics/frontend-v2/commit/37686da8dc4c6b8a43ccc944e816158a018d47a5)) +* **logo:** fix placeholder misalignment ([addd3b6](https://github.com/penguin-statistics/frontend-v2/commit/addd3b6ac7a9268b6af9235a70c96f9564d3d698)) +* **logo:** fixed logo placeholder misposition ([d3f8e01](https://github.com/penguin-statistics/frontend-v2/commit/d3f8e01f9a6c53fe61a34d3a6e7803076bd0f3d9)) +* **logo-text:** modified credits text on the south-east side of the page ([b0fcaa2](https://github.com/penguin-statistics/frontend-v2/commit/b0fcaa2ce2b46589f192659599f180e12d9895c0)), closes [#6](https://github.com/penguin-statistics/frontend-v2/issues/6) +* **mainmenu:** enables the ability to display child routes ([2280119](https://github.com/penguin-statistics/frontend-v2/commit/22801197629e3fa0e7ec6cb7a185534c0a350733)) +* **members:** fix v-on not defined ([89b3c87](https://github.com/penguin-statistics/frontend-v2/commit/89b3c87c2cb291683f8e7095c319e96a9d3428fc)) +* **members:** show social icons in multiple lines ([8f8619f](https://github.com/penguin-statistics/frontend-v2/commit/8f8619fd407c651790c0157c2e508a36d5aa4a64)), closes [#35](https://github.com/penguin-statistics/frontend-v2/issues/35) +* **menu:** hide contribute and donate ([839daa8](https://github.com/penguin-statistics/frontend-v2/commit/839daa820220f5883ba5f76d902877a000be4fe0)) +* **misc:** fix much stuff ([f13ed72](https://github.com/penguin-statistics/frontend-v2/commit/f13ed723d6ad1c63ad2827a7e4389d4fe73b4348)), closes [#224](https://github.com/penguin-statistics/frontend-v2/issues/224) +* **model-globalmatrix:** added `show_closed_zones=true` query string to globalMatrix ObjectManager ([2ed6824](https://github.com/penguin-statistics/frontend-v2/commit/2ed6824dd340f87d6a6a56d95d6090b35605291d)), closes [#82](https://github.com/penguin-statistics/frontend-v2/issues/82) +* **model-personalmatrix:** added show_closed_zones query string to personalMatrix ([5dda694](https://github.com/penguin-statistics/frontend-v2/commit/5dda694ebc955af02668b5785cd37ab67ecbf805)), closes [#82](https://github.com/penguin-statistics/frontend-v2/issues/82) +* **network:** using prod endpoint for prod builds, and using dev endpoint for dev server ([3b89df9](https://github.com/penguin-statistics/frontend-v2/commit/3b89df9f640d8affe0e4cfca05a2bf6ee5298e5a)) +* **networkstateindicator:** fix window not closing after resolving ajax error ([a93f663](https://github.com/penguin-statistics/frontend-v2/commit/a93f663b8301adf54454d602e09dff1646c13af3)) +* **networkstateindicator:** fixed preloader and failed resources panel ([fbaca27](https://github.com/penguin-statistics/frontend-v2/commit/fbaca2715931e7abc32f4bc82fe74e4e208d2e50)) +* **notice:** remove Korean translator hiring ([3b96b3b](https://github.com/penguin-statistics/frontend-v2/commit/3b96b3bf02ea9b4d0f7e13cc654303f135ecb4a7)) +* **objectmanager:** fix redundent dev messages ([6de47d8](https://github.com/penguin-statistics/frontend-v2/commit/6de47d8993c894f3281a2aacedb998a8325ae7e2)) +* **performance:** optimized getter and separated transform functions ([8422d10](https://github.com/penguin-statistics/frontend-v2/commit/8422d107b1fe5740496ac1f4d157d6d70eba12ac)), closes [#182](https://github.com/penguin-statistics/frontend-v2/issues/182) +* **performance:** reduced the item display in StageSelector ([bc581ca](https://github.com/penguin-statistics/frontend-v2/commit/bc581caa94ba15256fca346087748cf9594db301)) +* **personalmatrix:** fix personalmatrix not working ([6e28cba](https://github.com/penguin-statistics/frontend-v2/commit/6e28cbafbca6029debd27a50efdf632289e38296)) +* **preloader:** add preloader ([c454c5c](https://github.com/penguin-statistics/frontend-v2/commit/c454c5c71ed8e7d25c8e7376b6d6f089ed43c7f4)) +* **randombackground:** fix weird white bg ([7034f51](https://github.com/penguin-statistics/frontend-v2/commit/7034f51094b491b6521c22ad9c40c5159277fe61)) +* **randombackground:** use webp + jpg fallback for the background ([e5ff9b8](https://github.com/penguin-statistics/frontend-v2/commit/e5ff9b80456a852259af0f9361808ebbf2e556bd)) +* **randombg:** fixed cannot read property when first enter the page ([c04ac1c](https://github.com/penguin-statistics/frontend-v2/commit/c04ac1c5e8b4797920fc6bc1bd686fffc35ad619)) +* **randomimage:** add frostnova pics ([67e0b79](https://github.com/penguin-statistics/frontend-v2/commit/67e0b796ae9edb27c67198e89863b61e5aa029d5)) +* **randomimage:** fix blank image ([fc1e7c3](https://github.com/penguin-statistics/frontend-v2/commit/fc1e7c3b2c0580cddbf927440d6f009a08e51201)) +* **randomizedlogo:** fix function not found ([ddbe2af](https://github.com/penguin-statistics/frontend-v2/commit/ddbe2af4ef8e20ff4d197fd52d78108f6e1a2ca7)) +* **report:** check type amount ([dcac5f3](https://github.com/penguin-statistics/frontend-v2/commit/dcac5f301007af3957d4a0c213cab7274cb4355a)) +* **report:** fix not clearing drop selection ([bfcfff3](https://github.com/penguin-statistics/frontend-v2/commit/bfcfff332447d12fad1f6b2b317fe11f6e4ccd6c)) +* **report:** fix the data preprocess in report ([b618857](https://github.com/penguin-statistics/frontend-v2/commit/b618857608a766a5a63ce789e7452600b7716c29)) +* **report:** fixed limitation error in Report ([7628267](https://github.com/penguin-statistics/frontend-v2/commit/7628267d0ea82cd28278aa971cee74741c15ee73)) +* **report:** implemented submission recall ([275b6bc](https://github.com/penguin-statistics/frontend-v2/commit/275b6bcc64e456f1d7baa6400e5d0ae4c39b22fb)), closes [#22](https://github.com/penguin-statistics/frontend-v2/issues/22) +* **report:** refactored Report view ([078f7f6](https://github.com/penguin-statistics/frontend-v2/commit/078f7f6f9169f79fc834b46c41f285f50db80cd4)), closes [#125](https://github.com/penguin-statistics/frontend-v2/issues/125) [#123](https://github.com/penguin-statistics/frontend-v2/issues/123) [#26](https://github.com/penguin-statistics/frontend-v2/issues/26) +* **report.vue:** auto login after report ([63b3381](https://github.com/penguin-statistics/frontend-v2/commit/63b338159ee69c9349cf6bb9f0aa4fd3ec64b675)), closes [#56](https://github.com/penguin-statistics/frontend-v2/issues/56) +* **report.vue:** fix limitation bug ([994bc67](https://github.com/penguin-statistics/frontend-v2/commit/994bc675101e9b4a08533ebd5ed5dda0c6a255a3)), closes [#29](https://github.com/penguin-statistics/frontend-v2/issues/29) +* **report.vue:** fix report type limitation check ([da113df](https://github.com/penguin-statistics/frontend-v2/commit/da113df72344de09380711116d77380afdf72b0d)) +* **report.vue:** fix type limitation issue ([254d028](https://github.com/penguin-statistics/frontend-v2/commit/254d02809f2666ed990769a0fc2d1e9d7c749348)) +* **report.vue:** hide undo action when user logout or report ([5283a9b](https://github.com/penguin-statistics/frontend-v2/commit/5283a9bff7fbe1f802ae03dcbff9a37ce801dc12)) +* **report.vue:** hot fix limitation check issue (workaround) ([0de0f3f](https://github.com/penguin-statistics/frontend-v2/commit/0de0f3f2bf6759641cf120f1ebc91e7699996029)) +* **report.vue:** refine report component route and logicfix step maybe go to 4 issue, but double click issue maybe need a debounce function[#57](https://github.com/penguin-statistics/frontend-v2/issues/57) ([a6dbf0e](https://github.com/penguin-statistics/frontend-v2/commit/a6dbf0efffb6868dc10f8129cf1be92a222cbbaa)) +* **report.vue:** refine undo report action ([bae730f](https://github.com/penguin-statistics/frontend-v2/commit/bae730f641e752bf3e838fb9fe8c1df015fc65f1)), closes [#22](https://github.com/penguin-statistics/frontend-v2/issues/22) +* **report.vue:** reset report results if step changed ([ae52d76](https://github.com/penguin-statistics/frontend-v2/commit/ae52d7640dbc5d554b618ed802f1ac3720a57a2c)) +* **route:** fix [#60](https://github.com/penguin-statistics/frontend-v2/issues/60) about auto scroll to top after routing ([d8b3369](https://github.com/penguin-statistics/frontend-v2/commit/d8b3369475bd87a2c165cd12c6af38c0e9439981)) +* **route.js:** fix log planner issue ([512ebb5](https://github.com/penguin-statistics/frontend-v2/commit/512ebb58476cc109c3835df87e9b87e1ef51983d)), closes [#128](https://github.com/penguin-statistics/frontend-v2/issues/128) +* **router:** change the page title according its actual page title, while also complies with i18n ([6c9e1fe](https://github.com/penguin-statistics/frontend-v2/commit/6c9e1fee687c172eb512bf34dd1c34088d59983c)), closes [#76](https://github.com/penguin-statistics/frontend-v2/issues/76) +* **router:** refactor code to merge with app.vue ([5e6369f](https://github.com/penguin-statistics/frontend-v2/commit/5e6369f1b4fd2f639542cb9ecede45eb14205c07)), closes [#76](https://github.com/penguin-statistics/frontend-v2/issues/76) +* **router:** the Statistics page's path is now `/results` instead of `/result` ([f92eb72](https://github.com/penguin-statistics/frontend-v2/commit/f92eb72e1a5f1361f202cb6b22c46cd106bd043f)) +* **safe-area:** improved safe area styles ([e2a888e](https://github.com/penguin-statistics/frontend-v2/commit/e2a888e77d0114364bee733fa0eea240c4a679a8)) +* **safearea:** used safe area css to optimize UE ([688353c](https://github.com/penguin-statistics/frontend-v2/commit/688353c1af0599b52e4d1054b8a1ac626c244b03)) +* **sentry:** change sentry to self-hosted version ([78dd82f](https://github.com/penguin-statistics/frontend-v2/commit/78dd82f10d6ac4b84e5a042c1616607bdbdc6a80)) +* **sentry:** fixed sentry, added version indicator ([e08e1d4](https://github.com/penguin-statistics/frontend-v2/commit/e08e1d494c503d3630d35e28ca9e505e2c1b98a2)) +* **sentry:** let sentry report module of the current error ([9371713](https://github.com/penguin-statistics/frontend-v2/commit/9371713d6641af5842c9fbc177af98b1a1cdcf56)) +* **sentry:** removed log limit, fixed custom report error ([774d43e](https://github.com/penguin-statistics/frontend-v2/commit/774d43e6eaf4c1198ac68456c980eb9debf68791)) +* **sentry:** use hosted sentry ([2dcbd91](https://github.com/penguin-statistics/frontend-v2/commit/2dcbd91fb1d0dfd49f13e7ba1dd61153f7bb8529)) +* **sentry-spike:** add more ignore errors ([8751cc1](https://github.com/penguin-statistics/frontend-v2/commit/8751cc1387092f1ae2ef92e0bdc863e329492078)) +* **sentry-spike:** add rate limit to every client sending error report ([7e9267d](https://github.com/penguin-statistics/frontend-v2/commit/7e9267da19cc3f1427104ce6130f77b038238ab4)) +* **serviceworker:** finally! fixed serviceworker caching problem! ([b2c4fab](https://github.com/penguin-statistics/frontend-v2/commit/b2c4fab007f6fc6ae03c2c88fcd82d75a9855fb0)) +* **serviceworker:** fixed always showing snackbar ([f4dbe29](https://github.com/penguin-statistics/frontend-v2/commit/f4dbe2975741603f158c2962e8063facd5804d61)) +* **serviceworker:** removes the serviceWorker ([ae15643](https://github.com/penguin-statistics/frontend-v2/commit/ae156435803909de8b011b50c848339aa7fd8ef5)) +* **serviceworker:** use original workbox webpack plugin, removed @vue/cli-plugin-pwa ([f4efa53](https://github.com/penguin-statistics/frontend-v2/commit/f4efa53ac7e5c6cfbade2f27bed1abc01c64fc8f)) +* **snackbar:** fixed snackbar layout in report ([5f6964c](https://github.com/penguin-statistics/frontend-v2/commit/5f6964c5b2733e1d9d698bdd35fe90abef24ce88)) +* **snackbar:** show submit success snackbar even if the user is not logged in ([a276b59](https://github.com/penguin-statistics/frontend-v2/commit/a276b5930407da95a9f198fdf7c9790d4eb37f65)) +* **specialui:** fix date condition ([0afb89c](https://github.com/penguin-statistics/frontend-v2/commit/0afb89c680fe7193a422362e357ea75ce1ea84e9)) +* **sprite:** add sprite image height ([98b3297](https://github.com/penguin-statistics/frontend-v2/commit/98b3297e74673e06d10b3bf41f9f1a7f4cfb593e)) +* **sprite:** enlarge the height of sprite image ([d09967e](https://github.com/penguin-statistics/frontend-v2/commit/d09967ec5b0ee2f0ceeda155def4d9de442fa390)) +* **sprite-image:** change the height of sprite image from 480 to 540 ([74901ac](https://github.com/penguin-statistics/frontend-v2/commit/74901ac749abf869dea42e2279f2f390c2bf9355)) +* **stage:** fix [#57](https://github.com/penguin-statistics/frontend-v2/issues/57) item/stage page double click issue ([431c737](https://github.com/penguin-statistics/frontend-v2/commit/431c7372d6f106eb87af7312312f3750251dc545)) +* **stage:** fix route back and forward not work issue ([5cad7f9](https://github.com/penguin-statistics/frontend-v2/commit/5cad7f9dc823d0f42b292ee06ba33f0f213b6962)), closes [#8](https://github.com/penguin-statistics/frontend-v2/issues/8) +* **stage.vue:** show tooltip for event stage date range ([a13d2de](https://github.com/penguin-statistics/frontend-v2/commit/a13d2de963bba25f56c270886b30c02f8ba6f1e9)), closes [#54](https://github.com/penguin-statistics/frontend-v2/issues/54) +* **stageselector:** fixed stage indicator overlapping inner content ([6dd7757](https://github.com/penguin-statistics/frontend-v2/commit/6dd7757a69d960d91b914eb6f62e09b27d173d44)), closes [#238](https://github.com/penguin-statistics/frontend-v2/issues/238) +* **stat-tables:** vertically center the drop rate and graph in two stat tables ([d7caea2](https://github.com/penguin-statistics/frontend-v2/commit/d7caea221b4eb4beda1d817cfbbaa3cb0889f981)), closes [#42](https://github.com/penguin-statistics/frontend-v2/issues/42) +* **stats-table:** refine stats tables in the two result pages ([0231589](https://github.com/penguin-statistics/frontend-v2/commit/02315894f1e03078f63d5beaeb258c9c5486a1e5)), closes [#11](https://github.com/penguin-statistics/frontend-v2/issues/11) +* **stats-table:** unify the style of cursor between item and stage stats table ([bc88a83](https://github.com/penguin-statistics/frontend-v2/commit/bc88a83be38389a19c19274c2ee06c49850d1bf4)), closes [#45](https://github.com/penguin-statistics/frontend-v2/issues/45) +* **statsbystage:** removed redundent code ([70f730e](https://github.com/penguin-statistics/frontend-v2/commit/70f730ed7ffd0ddb2285155dfb3a1fc93b0d86e5)) +* **stepper:** center stepper labels ([72bb375](https://github.com/penguin-statistics/frontend-v2/commit/72bb37552b4824a62290eced169dbd1a7b0f6166)), closes [#85](https://github.com/penguin-statistics/frontend-v2/issues/85) +* **stepper:** fix stepper clickable area too large issue in report page ([3ce93d3](https://github.com/penguin-statistics/frontend-v2/commit/3ce93d32c96d1000d90b868cc4b2e28e81f3415c)) +* **stepper:** only show alt-labels under xs ([ab7df8a](https://github.com/penguin-statistics/frontend-v2/commit/ab7df8af92dc3e15352383358f9449176d0482d8)), closes [#41](https://github.com/penguin-statistics/frontend-v2/issues/41) +* **stepper:** remove "this" from template ([e82dc8f](https://github.com/penguin-statistics/frontend-v2/commit/e82dc8f3509be0c0742981330cfa3eb61a03fbfd)) +* **store:** remove compression ([d518f3a](https://github.com/penguin-statistics/frontend-v2/commit/d518f3a4c6bf74b68af72d8fce486edc3d8effbb)) +* **store:** use compression ([cb5c1d5](https://github.com/penguin-statistics/frontend-v2/commit/cb5c1d5eaa19272861785a36adcc434060381d48)), closes [#202](https://github.com/penguin-statistics/frontend-v2/issues/202) +* **store:** use namespacing for vuex store ([00eefbd](https://github.com/penguin-statistics/frontend-v2/commit/00eefbdd280aef5d5cc9d431e1bb258943944d02)), closes [#111](https://github.com/penguin-statistics/frontend-v2/issues/111) +* **store.js:** fix wrong params issue ([44e08b4](https://github.com/penguin-statistics/frontend-v2/commit/44e08b4f6b983cbba4f7bd9a341a26f3f6306432)) +* **sw:** add cdn to service worker cache ([5776a46](https://github.com/penguin-statistics/frontend-v2/commit/5776a46f4c5015466c48b428f9e6dbc5d7630bca)) +* **sw:** fix serviceworker not found ([8fdcf7e](https://github.com/penguin-statistics/frontend-v2/commit/8fdcf7ec41baf0acac4b99df198053122a7069d2)) +* **sw:** remove include cdn url: need more investigation ([293d03c](https://github.com/penguin-statistics/frontend-v2/commit/293d03ca9c8377499d64317f9507086a00a92d25)) +* **title:** update title when switching language ([fbda961](https://github.com/penguin-statistics/frontend-v2/commit/fbda961ce6ed29b51b330f89df10f1fb2ab3918a)), closes [#105](https://github.com/penguin-statistics/frontend-v2/issues/105) +* **transpile:** add transpile for vuetify ([aa53b26](https://github.com/penguin-statistics/frontend-v2/commit/aa53b26cbc5651c35d06c5ffed13d747cee507ac)) +* **ttl:** change object manager ttl from 24h to 1h ([3824d6b](https://github.com/penguin-statistics/frontend-v2/commit/3824d6ba4146e38cf7a047f39663400f7d795ff5)) +* **version:** change version number ([463333b](https://github.com/penguin-statistics/frontend-v2/commit/463333b263ffb12572c58343d8aaa069eaac9b90)) +* **version:** change version number and add changelog ([c8ea0ae](https://github.com/penguin-statistics/frontend-v2/commit/c8ea0ae7c000059d9cabb6ed6f4e1ee98559d266)) +* **version:** update version number ([f776971](https://github.com/penguin-statistics/frontend-v2/commit/f7769710b42aab519c184b7a7a06c5760aacd867)) +* **version:** update version to 1.0.1 ([046e9ad](https://github.com/penguin-statistics/frontend-v2/commit/046e9adc48682c213243ece030de77045d178534)) +* **version:** update version to v1.0.5 ([2401399](https://github.com/penguin-statistics/frontend-v2/commit/24013998485faa211980f174eb7e91ba0508a127)) +* **version:** update version to v1.1.2 ([b8f485c](https://github.com/penguin-statistics/frontend-v2/commit/b8f485c20823b787db6066813966a73c0a749e99)) + + +### Code Refactoring + +* **favicon:** moves the location of favicon from `src/assets/` to `public/` ([2d53eee](https://github.com/penguin-statistics/frontend-v2/commit/2d53eee6f243c69826bf681de575a5ba0dd11c8a)) ### Features -* **cdn:** change cdn from s3 to upyun ([fc8f718](https://github.com/penguin-statistics/frontend-v2/commit/fc8f718)) -* **changelog:** clear old version logs and add new ([7aa20c6](https://github.com/penguin-statistics/frontend-v2/commit/7aa20c6)) -* **menu:** add old version link to the menu ([26de303](https://github.com/penguin-statistics/frontend-v2/commit/26de303)) -* **pwa:** optimized pwa experience ([#133](https://github.com/penguin-statistics/frontend-v2/issues/133)) ([2a2564b](https://github.com/penguin-statistics/frontend-v2/commit/2a2564b)) -* **version:** change version number to v1.0.2 ([c6fa14a](https://github.com/penguin-statistics/frontend-v2/commit/c6fa14a)) +* **about-pages:** added about pages to the site ([4355f2b](https://github.com/penguin-statistics/frontend-v2/commit/4355f2b2a748dd103fbabe353021dfb41a0bacd9)) +* **accountmanager:** isolated accountmanager from app.vue ([ab4ac94](https://github.com/penguin-statistics/frontend-v2/commit/ab4ac940e1ec5c4050739c20cea4e321044adb96)) +* **accountmanager.vue:** show logout prompt on PC ([be10c9c](https://github.com/penguin-statistics/frontend-v2/commit/be10c9c359005b0044c0d89534203beffaf14bf0)), closes [#135](https://github.com/penguin-statistics/frontend-v2/issues/135) +* **app:** displays notice when accessing Now builds ([dc0e49f](https://github.com/penguin-statistics/frontend-v2/commit/dc0e49f3db4b4ad2cb6ec44884326457369bf56d)) +* **app:** implemented user authorization ([477c660](https://github.com/penguin-statistics/frontend-v2/commit/477c660d27afc3dfe80e2bd968399b08e77e802e)) +* **app.vue:** add refresh data button ([bcbd0ca](https://github.com/penguin-statistics/frontend-v2/commit/bcbd0ca2689c46fe3e964a55a02cc50c841fd533)), closes [#94](https://github.com/penguin-statistics/frontend-v2/issues/94) +* **app.vue:** do not open the menu by default on mobile view[#61](https://github.com/penguin-statistics/frontend-v2/issues/61) ([f3704ae](https://github.com/penguin-statistics/frontend-v2/commit/f3704ae551836189ba6fc9a9529d068b4b8462de)) +* **cdn:** change cdn from s3 to upyun ([fc8f718](https://github.com/penguin-statistics/frontend-v2/commit/fc8f7188a147da1a582f89d2ffaf6a0e621f3966)) +* **cdn:** changed cdn to upyun ([0e685c9](https://github.com/penguin-statistics/frontend-v2/commit/0e685c94e28647ac6c15908edd8ee3e1e6548bd7)) +* **changelog:** clear old version logs and add new ([7aa20c6](https://github.com/penguin-statistics/frontend-v2/commit/7aa20c63823dcb45cc5881c00da226eddead3ba7)) +* **charts:** add charts component with mock dataadd charts component and use it on Stage.vue as a simple demo ([24c763b](https://github.com/penguin-statistics/frontend-v2/commit/24c763bc9523915b17138cdacf6bfef2cb1cd495)) +* **charts:** refine charts component and add fetch trends api[#16](https://github.com/penguin-statistics/frontend-v2/issues/16) ([43b17d8](https://github.com/penguin-statistics/frontend-v2/commit/43b17d8331c809eb4adcfcbf1b7c09cf7acb06e1)) +* **console:** make our console messages prettier ([341e5b5](https://github.com/penguin-statistics/frontend-v2/commit/341e5b5f9c28f9a11a77b2efc57e81f2a8d84292)) +* **crisp:** added crisp chat ([f9c0859](https://github.com/penguin-statistics/frontend-v2/commit/f9c085908255572d0f8d8872b3f61c949e52859e)) +* **csp:** add csp support for zeit now previews ([7eb7b19](https://github.com/penguin-statistics/frontend-v2/commit/7eb7b19162c12b1589519c415108e85bf8d1e3dd)) +* **datasourcetoggle.vue:** add data source toggle to switch data sourcefix [#21](https://github.com/penguin-statistics/frontend-v2/issues/21) ([c1082dc](https://github.com/penguin-statistics/frontend-v2/commit/c1082dce045b8ed0856e390d96ebbc1c0eb96dc0)) +* **drawer:** improved drawer styles ([cfb9de1](https://github.com/penguin-statistics/frontend-v2/commit/cfb9de1a2be3910aba378e5053b94060fa1505de)) +* **event:** handle event items ([766cd05](https://github.com/penguin-statistics/frontend-v2/commit/766cd056468d45ef701c9901b5ca8aa178e6e97c)) +* **fetchalert:** implement fetch status ([938e20c](https://github.com/penguin-statistics/frontend-v2/commit/938e20cfa78ae806dfc00737d9e61f52361998bb)), closes [#106](https://github.com/penguin-statistics/frontend-v2/issues/106) [#30](https://github.com/penguin-statistics/frontend-v2/issues/30) +* **ga:** integrate with ga ([a6dac9c](https://github.com/penguin-statistics/frontend-v2/commit/a6dac9caeabf9b569541469d5753d80b1849d1da)), closes [#92](https://github.com/penguin-statistics/frontend-v2/issues/92) +* **getters:** sorts item and calculates extra statistics ([2df4cfa](https://github.com/penguin-statistics/frontend-v2/commit/2df4cfa2230ad3f4b2f0d3d551bf4ed1aea07a22)) +* **home:** add bulletin for chapter 6 ([59db668](https://github.com/penguin-statistics/frontend-v2/commit/59db668545269380f29fcedafa80b54fe0eb8632)) +* **home:** layout adjustment ([fbfbb00](https://github.com/penguin-statistics/frontend-v2/commit/fbfbb00beec09d7c8b7cc9e5cf765d60608fbc08)) +* **home:** migrate old static pages to the new site ([68ee054](https://github.com/penguin-statistics/frontend-v2/commit/68ee0549652661d3a7f3c7daf62bbc51cbd260db)), closes [#15](https://github.com/penguin-statistics/frontend-v2/issues/15) +* **home:** optimized `Donate` and `AccountManager` ([77e69e2](https://github.com/penguin-statistics/frontend-v2/commit/77e69e241dae7d5c4249bd937e7924f84b302afa)) +* **homepage:** refine homepage ([069f31b](https://github.com/penguin-statistics/frontend-v2/commit/069f31bf66856032f02c40faecce3cc83680c399)), closes [#25](https://github.com/penguin-statistics/frontend-v2/issues/25) +* **i18n:** add ja i18n for fetch alert ([97753ec](https://github.com/penguin-statistics/frontend-v2/commit/97753eca1e16a7a815c24b9e6446a39344ec1541)) +* **i18n:** add Japanese translation and fix some Chinese and English translation for all pages ([a051cb7](https://github.com/penguin-statistics/frontend-v2/commit/a051cb7e19b3e7956285e0b0f906d56fdaeaefaf)), closes [#23](https://github.com/penguin-statistics/frontend-v2/issues/23) +* **i18n:** add korean support ([438a8c3](https://github.com/penguin-statistics/frontend-v2/commit/438a8c38b39d79edd1749755c25d811f0abc3539)) +* **i18n:** finish ja translation ([5fba0a1](https://github.com/penguin-statistics/frontend-v2/commit/5fba0a16c5925f922d54659f6db1931c87646602)) +* **ignore-gacha:** ignore gacha limitations ([334f398](https://github.com/penguin-statistics/frontend-v2/commit/334f39880c4a84482d2723101b5afeca18460d2d)) +* **item-icon.vue:** refactor item icon component and add item name tooltip ([077fbb6](https://github.com/penguin-statistics/frontend-v2/commit/077fbb61946f9576a03279367b9aafcb646f528d)) +* **item.vue:** add item page drop rate graph ([2233eb7](https://github.com/penguin-statistics/frontend-v2/commit/2233eb7195b80a0c75d69a1a2c7c788e2b2a6fe4)), closes [#16](https://github.com/penguin-statistics/frontend-v2/issues/16) +* **item.vue:** refine item page layout ([c94f2b7](https://github.com/penguin-statistics/frontend-v2/commit/c94f2b7c88b3e89454bc2c9f72ff67b75af1a34d)), closes [#39](https://github.com/penguin-statistics/frontend-v2/issues/39) +* **item.vue:** refine item page layout ([819f685](https://github.com/penguin-statistics/frontend-v2/commit/819f685261b8e08f0b708eae71d0893e67096736)), closes [#31](https://github.com/penguin-statistics/frontend-v2/issues/31) +* **member-page:** added member page ([f8ad4af](https://github.com/penguin-statistics/frontend-v2/commit/f8ad4af13a01e73fae6d9c5cc03a40b1a999e3e9)) +* **members:** add and fix contents in members page ([7e211a2](https://github.com/penguin-statistics/frontend-v2/commit/7e211a29e4ad8c3485522b91f089b092f09e990a)), closes [#24](https://github.com/penguin-statistics/frontend-v2/issues/24) +* **menu:** add old version link to the menu ([26de303](https://github.com/penguin-statistics/frontend-v2/commit/26de30377cff02edd90779de678afd77d4721874)) +* **notfound:** added notfound page ([ed441cb](https://github.com/penguin-statistics/frontend-v2/commit/ed441cbf77a3d034e0e571087c9b725a837bdd16)) +* **objectmanager:** added object manager ([5e64c0a](https://github.com/penguin-statistics/frontend-v2/commit/5e64c0af115e48df372f3b5486d498fcbd2d632e)) +* **objectmanager:** implemented a small demo of the objectmanager ([3ce1361](https://github.com/penguin-statistics/frontend-v2/commit/3ce13610dd9377ade28ba2c7a5c4408f125351d9)) +* **objectmanager:** implemented the objectmanager ([35234e3](https://github.com/penguin-statistics/frontend-v2/commit/35234e38c38c5ac631fac84fa6705846ae9d7bf0)) +* **pwa:** implemented serviceWorker for PWA support ([5b8b691](https://github.com/penguin-statistics/frontend-v2/commit/5b8b691707540c424ec54667ad0b64f9c03c85da)), closes [#20](https://github.com/penguin-statistics/frontend-v2/issues/20) +* **pwa:** implemented serviceWorker for PWA support ([c1011d8](https://github.com/penguin-statistics/frontend-v2/commit/c1011d800f034fb0208ae2b11c5d0d931398604c)), closes [#20](https://github.com/penguin-statistics/frontend-v2/issues/20) +* **pwa:** improved pwa experience on iOS devices, specifically iPhone X series ([67e5f26](https://github.com/penguin-statistics/frontend-v2/commit/67e5f26264b1147575e5fd45e9141f7bf480c19d)) +* **pwa:** optimized pwa experience ([#133](https://github.com/penguin-statistics/frontend-v2/issues/133)) ([2a2564b](https://github.com/penguin-statistics/frontend-v2/commit/2a2564b03e8ebf66e4a248a41c77c91d0ddac925)) +* **randomimage:** easter egg! ([d00c29d](https://github.com/penguin-statistics/frontend-v2/commit/d00c29df6e71565193ab06ea01fe0715ffcea353)) +* **report:** implemented report page ([646e197](https://github.com/penguin-statistics/frontend-v2/commit/646e1977862df5012d7d16cca8416f01eca35da3)) +* **report:** refine report page ([97b4014](https://github.com/penguin-statistics/frontend-v2/commit/97b40142d109f2fd01da2e6bb47496b55db09890)), closes [#27](https://github.com/penguin-statistics/frontend-v2/issues/27) +* **report-version:** report version after loading the app ([1f62b6f](https://github.com/penguin-statistics/frontend-v2/commit/1f62b6fedc3b72f0a289d4c6857fb030ff2e2fc4)) +* **router,app:** allows access with REST-like URLs to statistics page ([84bc9d9](https://github.com/penguin-statistics/frontend-v2/commit/84bc9d987a1313cd10b7ef12f3634e81039146d7)) +* **specialui:** add console debug info for time duration detection ([1adc58b](https://github.com/penguin-statistics/frontend-v2/commit/1adc58bf6b1451b3b96ca02dfa9a3d1cfbd267f5)) +* **specialui:** add more info ([5b2a6fc](https://github.com/penguin-statistics/frontend-v2/commit/5b2a6fc868571a5d9fee20b03ae37d018098de7d)) +* **specialui:** add special ui ([ca2e3c9](https://github.com/penguin-statistics/frontend-v2/commit/ca2e3c96af9b278130af1b7e65eb89bc25f33d6e)) +* **stageselector:** rewritten stageselector ([6321160](https://github.com/penguin-statistics/frontend-v2/commit/632116047197a82c240e0da27d8b95621bfba4f9)) +* **stat-tables:** expanded the clicking area of the statistics table ([10040c7](https://github.com/penguin-statistics/frontend-v2/commit/10040c7274d62abfbad631730a299ac1dfd04fa2)), closes [#4](https://github.com/penguin-statistics/frontend-v2/issues/4) +* **stat-tables:** show the name of the selected object on result page ([c1c4ae3](https://github.com/penguin-statistics/frontend-v2/commit/c1c4ae36dfdaca64360e44c3c9e6d3c43e23d860)), closes [#5](https://github.com/penguin-statistics/frontend-v2/issues/5) +* **stats:** separated Item and Stage; Implemented data tables, etc, ([2355ae6](https://github.com/penguin-statistics/frontend-v2/commit/2355ae634770ad2784143412579aac5f94f2bdec)) +* **statsbyitem:** implemented `StatsByItem` page ([2f3cb96](https://github.com/penguin-statistics/frontend-v2/commit/2f3cb96d757f1e768a41e6b429e1469c1fc52766)) +* **store:** adds ajax state storage ([52b7b49](https://github.com/penguin-statistics/frontend-v2/commit/52b7b49d5d4ff688c20068ad1d5fe188060c198a)) +* **tracing:** add tracing ([b8d5ca5](https://github.com/penguin-statistics/frontend-v2/commit/b8d5ca53d0b5a500596f33ca75b2e2ec2deb00e6)) +* **version:** change version number to v1.0.2 ([c6fa14a](https://github.com/penguin-statistics/frontend-v2/commit/c6fa14a73e7909d5c1bc23c2e6643dec8b3b1a34)) +* **zones:** change zones sequence ([88688b1](https://github.com/penguin-statistics/frontend-v2/commit/88688b13b44fd0a35b54afdf25a1e161fe28d5ee)), closes [#96](https://github.com/penguin-statistics/frontend-v2/issues/96) + + +### improvement + +* **vuetify:** migrated to vuetify v2.2.4 ([3313298](https://github.com/penguin-statistics/frontend-v2/commit/3313298753d09d81c76a3c79940ef7778bc286ec)), closes [#73](https://github.com/penguin-statistics/frontend-v2/issues/73) + + +### Performance Improvements + +* **store:** reformat store file ([1d2b691](https://github.com/penguin-statistics/frontend-v2/commit/1d2b691f9157907bcbca773bd0c9af224bebdbb3)), closes [#111](https://github.com/penguin-statistics/frontend-v2/issues/111) [#111](https://github.com/penguin-statistics/frontend-v2/issues/111) +* **timeformatter:** changed from `moment` to `dayjs` ([5f1d6a9](https://github.com/penguin-statistics/frontend-v2/commit/5f1d6a9b1e181409da26ad45b9a427e3619db641)) +* **timeformatter:** using `dayjs` ([1bd37cb](https://github.com/penguin-statistics/frontend-v2/commit/1bd37cbeb50ef92b192dbd83c81d7eaabbd569c9)) + + +### Reverts + +* **components/toolbar/accountmanager.vue:** reverts the icon ([8be4050](https://github.com/penguin-statistics/frontend-v2/commit/8be40509941cca2b9e42bb9dd4d4a76c93dca611)) +* **conflict:** resolved conflict ([d9f82e1](https://github.com/penguin-statistics/frontend-v2/commit/d9f82e17d6140585e1b9dc1760863126faaa8aae)) +* **getters:** revert changes ([1075da7](https://github.com/penguin-statistics/frontend-v2/commit/1075da76edda0916c154eb8587b7d3eee2575dfa)) +* **getters:** revert changes ([8b71e79](https://github.com/penguin-statistics/frontend-v2/commit/8b71e7989c0d00f56f6a9c11485c64a0bc137df3)) + + +### BREAKING CHANGES + +* **store:** Reformat the Store +* **vuetify:** In this commit, StageSelector has been deprecated and switched to the new +NewStageSelector component, but the new component is still under construction. This commit is to act +as a milestone of migrating vuetify to the new version in order to improve clearity. Also, the page +layout at `Home`, `Members` and `Donate` are modified due to the vuetify migration. This commit +should NOT be merged until the StageSelector has been completely refactored. +* **router:** The Statistics page's path is now `/results` instead of `/result` +* **favicon:** moved from `src/assets/favicons/` to `public/favicons/` +* **router,app:** The name of components were now depends on how many information the user provides +in the URL. If there's any navigation or redirection towards such resource it must be edited to suit +the new router structure. Although the old component name stays as-is and the code before such +change should still redirect the user to the index page, it is still good to check that if any +unexpected behavior occurs. +* **stats:** Routes changed from `/stats` which describes the result page, to `/results/[item, +stage]` in order to provide clearity and semantic URLs diff --git a/package.json b/package.json index 5a6eb0b7..fe914ded 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,9 @@ "build:single": "npx --max_old_space_size=4096 vue-cli-service build", "lint": "vue-cli-service lint", "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'", - "serveDist": "serve -c build/serve.json", "preview": "yarn build && yarn serveDist", "preview:single": "yarn build:single && yarn serveDist", - "release": "standard-version" }, "dependencies": { diff --git a/src/components/global/RandomBackground.vue b/src/components/global/RandomBackground.vue index dec3bb2b..82fea0ce 100644 --- a/src/components/global/RandomBackground.vue +++ b/src/components/global/RandomBackground.vue @@ -22,7 +22,7 @@ return 15 * 60 } else { // is not mobile device; use ttl of 5 minutes to show off ;) - return 5 * 60 + return 10 * 60 } } } diff --git a/src/main.js b/src/main.js index db0a4449..27bf7548 100644 --- a/src/main.js +++ b/src/main.js @@ -26,7 +26,10 @@ if (production) { Sentry.init({ dsn: 'https://9636aaa824a744f98a619df0aaabba00@sentry.io/1536764', integrations: [ - new Integrations.Vue({Vue, attachProps: true}), + new Integrations.Vue({ + Vue, + attachProps: true + }), new ApmIntegrations.Tracing(), ], tracesSampleRate: 0.005, diff --git a/src/mixins/I18n.js b/src/mixins/I18n.js index edf6b3e6..86de9f42 100644 --- a/src/mixins/I18n.js +++ b/src/mixins/I18n.js @@ -1,5 +1,6 @@ import dayjs from "dayjs"; import Console from "@/utils/Console"; +import {mapGetters} from "vuex"; export default { methods: { @@ -18,4 +19,7 @@ export default { } } }, + computed: { + ...mapGetters('settings', ['language']) + }, } \ No newline at end of file diff --git a/src/mixins/SpecialUI.js b/src/mixins/SpecialUI.js index c1f0cf4a..faff7608 100644 --- a/src/mixins/SpecialUI.js +++ b/src/mixins/SpecialUI.js @@ -1,20 +1,21 @@ -import Console from "@/utils/Console"; +// import Console from "@/utils/Console"; export default { computed: { isInSpecialUI () { - const time = new Date().getTime() >= 1585929600000 && new Date().getTime() <= 1586031000000 - Console.debug( - "SpecialUI", - "Special UI conditions matching:", - "In special ui time duration", - time, - "| current time parsed as", - new Date().toString(), - "| locale is", - this.$i18n.locale - ); - return time && this.$i18n.locale === "zh" + // const time = new Date().getTime() >= 1585929600000 && new Date().getTime() <= 1586031000000 + // Console.debug( + // "SpecialUI", + // "Special UI conditions matching:", + // "In special ui time duration", + // time, + // "| current time parsed as", + // new Date().toString(), + // "| locale is", + // this.$i18n.locale + // ); + // return time && this.$i18n.locale === "zh" + return false } }, } \ No newline at end of file diff --git a/src/views/About/Changelog.vue b/src/views/About/Changelog.vue index cbbe544c..623d1f50 100644 --- a/src/views/About/Changelog.vue +++ b/src/views/About/Changelog.vue @@ -6,52 +6,72 @@ + > + + 正在开发 + - - - - - - + {{ item.version }} + - + + + + + - + +
+ - -
    -
  1. - {{ text }} -
  2. -
-
+ +
    +
  1. + {{ text }} +
  2. +
+
+
+
@@ -67,6 +87,34 @@ export default { return { index: null, logs: [ + { + future: true, + version: "v3", + date: "2020-05-01T08:00:00Z", + changes: [ + "添加:多服务器数据源切换支持", + "添加:物品掉落分时查询", + "内部重构:所有数据将引入版本概念,从底层保证数据一致性", + ] + }, + { + future: true, + version: "v1.1.8", + date: "2020-04-25T08:00:00Z", + changes: [ + "添加:国内加速镜像站点" + ] + }, + { + active: true, + version: "v1.1.7", + date: "2020-04-06T18:00:00Z", + changes: [ + "优化:Sentry 报告进行本地频率限制", + "优化:控制台信息", + "添加:更新日志添加未来规划的版本更新信息", + ] + }, { version: "v1.1.6", date: "2020-04-02T18:00:00Z", @@ -180,8 +228,21 @@ export default { "新版本上线" ] } - ].map((el, i) => { - if (i === 0) el.active = true; + ].map((el) => { + if (el.active) { + el.color = 'green'; + el.icon = 'mdi-check'; + el.value = true + } else if (el.future) { + el.color = 'secondary'; + el.icon = 'mdi-history'; + el.value = false + } else { + el.color = 'orange darken-2'; + el.icon = 'mdi-history'; + el.value = false + } + return el }) } From 5bcf193f99464c42c6ae60723d455fa6eb955a7b Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Sun, 5 Apr 2020 15:14:14 -0400 Subject: [PATCH 11/20] improvement(changelog): change icons --- src/views/About/Changelog.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/About/Changelog.vue b/src/views/About/Changelog.vue index 623d1f50..e23de2c7 100644 --- a/src/views/About/Changelog.vue +++ b/src/views/About/Changelog.vue @@ -89,7 +89,7 @@ export default { logs: [ { future: true, - version: "v3", + version: "v3.0.0", date: "2020-05-01T08:00:00Z", changes: [ "添加:多服务器数据源切换支持", @@ -110,9 +110,10 @@ export default { version: "v1.1.7", date: "2020-04-06T18:00:00Z", changes: [ + "修复:语言设置未进行 Rehydration", "优化:Sentry 报告进行本地频率限制", "优化:控制台信息", - "添加:更新日志添加未来规划的版本更新信息", + "添加:于更新记录的未来规划版本信息", ] }, { @@ -235,7 +236,7 @@ export default { el.value = true } else if (el.future) { el.color = 'secondary'; - el.icon = 'mdi-history'; + el.icon = 'mdi-dots-horizontal'; el.value = false } else { el.color = 'orange darken-2'; From d0e87d94e3d6dcae1cf5813be7b9410ebb871d77 Mon Sep 17 00:00:00 2001 From: k22pr Date: Tue, 7 Apr 2020 01:00:01 +0900 Subject: [PATCH 12/20] add some Korean translations --- src/components/global/GlobalSnackbar.vue | 21 +++++++++++++++++++++ src/components/global/PWAPopups.vue | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/src/components/global/GlobalSnackbar.vue b/src/components/global/GlobalSnackbar.vue index 87ab468c..a4ae5ca3 100644 --- a/src/components/global/GlobalSnackbar.vue +++ b/src/components/global/GlobalSnackbar.vue @@ -41,6 +41,27 @@ "skipWaitingTimeout": "Failed to apply changes: ServiceWorker timed out. Please refresh page and try again" } } + }, + "ko": { + "network": { + "error": "네트워크 오류. 인터넷 연결을 확인한 후 다시 시도하세요." + }, + "clipboard": { + "success": "클립보드에 복사되었습니다.", + "error": "클립보드에 복사하지 못했습니다. 텍스트를 수동으로 선택하고 복사해주세요." + }, + "planner": { + "import": { + "jsonError": "가져오지 못했습니다. 데이터 구문 분석 오류입니다. 입력값을 확인해 주세요. ({error})", + "success": "{amount}개 항목에 대한 데이터를 성공적으로 가져왔습니다." + }, + "calculationError": "계산오류: {error}" + }, + "pwaPopup": { + "update": { + "skipWaitingTimeout": "변경 내용을 적용하지 못했습니다. 서비스가 시간 초과되었습니다. 페이지를 새로 고친 후 다시 시도하세요." + } + } } } diff --git a/src/components/global/PWAPopups.vue b/src/components/global/PWAPopups.vue index 4dc168bd..7702bcbf 100644 --- a/src/components/global/PWAPopups.vue +++ b/src/components/global/PWAPopups.vue @@ -11,6 +11,12 @@ "refresh": "Refresh", "success": "Website Updated!" } + }, + "en": { + "update": { + "refresh": "새로고침", + "success": "업데이트 완료!" + } } } From 68b3dfe3408252f875462e8ff169e66ea902d311 Mon Sep 17 00:00:00 2001 From: k22pr Date: Tue, 7 Apr 2020 01:00:32 +0900 Subject: [PATCH 13/20] fix some Korean translations --- src/components/stats/DataSourceToggle.vue | 4 ++-- src/components/stats/StageSelector.vue | 4 ++-- src/locales/ko.json | 6 +++--- src/views/Planner.vue | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/stats/DataSourceToggle.vue b/src/components/stats/DataSourceToggle.vue index 144b81d0..3b7827dd 100644 --- a/src/components/stats/DataSourceToggle.vue +++ b/src/components/stats/DataSourceToggle.vue @@ -24,10 +24,10 @@ "personal": "個人" } }, - "ko": { + "ko": { "dataSourceToggle": { "title": "로그인 필요", - "loginNotice": "개인 보고서를 보려면 로그인하여 주십시오.", + "loginNotice": "개인 보고서를 보시려면 로그인해 주세요.", "all": "전체", "personal": "개인" } diff --git a/src/components/stats/StageSelector.vue b/src/components/stats/StageSelector.vue index 3f13aaa0..e9af6876 100644 --- a/src/components/stats/StageSelector.vue +++ b/src/components/stats/StageSelector.vue @@ -86,8 +86,8 @@ "ACTIVITY_CLOSED": "이벤트 (종료)" }, "status": { - "closed": "Closed", - "open": "Open" + "closed": "닫힘", + "open": "개방중" } }, "stage": { diff --git a/src/locales/ko.json b/src/locales/ko.json index b27f261e..b8881fa4 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -54,8 +54,8 @@ }, "builds": { "development": { - "title": "Preview Build", - "description": "You are currently browsing the development build", + "title": "프리뷰 버젼", + "description": "현재 개발 빌드를 탐색하고 있습니다.", "ok": "OH YEAH!" } }, @@ -132,4 +132,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/views/Planner.vue b/src/views/Planner.vue index 26305a90..f1361941 100644 --- a/src/views/Planner.vue +++ b/src/views/Planner.vue @@ -105,7 +105,7 @@ "byProduct": "부산물 획득 고려", "requireExp": "경험치 획득 고려", "requireLmb": "용문폐 획득 고려", - "foreignServer": "에피소드 6을 계산에 넣지 마십시오" + "foreignServer": "에피소드 6 제외" }, "actions": { "import": "가져오기", @@ -113,7 +113,7 @@ "importExport": "@:(actions.import)/@:(actions.export)", "calculate": "계산하기" }, - "have": "소유량", + "have": "보유량", "need": "필요량", "copy": "클립보드에 복사", "calculation": { From 04a15ac36e59c2e3746847fc453cea08f31dc04c Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Mon, 6 Apr 2020 17:16:46 -0400 Subject: [PATCH 14/20] feat(getting-started): add a getting started guidance at home page --- src/components/drawer/LocaleSwitcher.vue | 5 +- src/locales/en.json | 6 +- src/locales/ja.json | 6 +- src/locales/ko.json | 6 +- src/locales/zh.json | 6 +- src/main.js | 2 - src/styles/global.css | 4 +- src/views/About/Bulletin.vue | 57 ++++--- src/views/About/GettingStarted.vue | 197 +++++++++++++++++++++++ src/views/About/Intro.vue | 12 +- src/views/Home.vue | 28 +++- vue.config.js | 6 - 12 files changed, 287 insertions(+), 48 deletions(-) create mode 100644 src/views/About/GettingStarted.vue diff --git a/src/components/drawer/LocaleSwitcher.vue b/src/components/drawer/LocaleSwitcher.vue index 81c1d026..1cfb33aa 100644 --- a/src/components/drawer/LocaleSwitcher.vue +++ b/src/components/drawer/LocaleSwitcher.vue @@ -25,7 +25,10 @@ mdi-translate {{ $t('menu.languages') }} - + { "zh": { - "bulletin": { - "bulletin_0": "1月16日海外版正式上线,为了避免数据混淆,请只上传国服的掉落。", - "bulletin_1": "专用于海外版的素材统计站是否开放正在计划中。", - "bulletin_2": "全站翻译已经完成,感谢Syaro和方舟航海図的帮助!" - } + "bulletin": [ + "1月16日海外版正式上线,为了避免数据混淆,请只上传国服的掉落。", + "专用于海外版的素材统计站是否开放正在计划中。", + "全站翻译已经完成,感谢Syaro和方舟航海図的帮助!" + ] }, "en": { - "bulletin": { - "bulletin_0": "Arknights EN server was officially released on 1/16. In order to not mess up the current data, please only submit drop data from the CN server.", - "bulletin_1": "We are considering whether to open another website for overseas servers.", - "bulletin_2": "The translation of the entire website has been finished. Thanks to Syaro and 方舟航海図 for their efforts!" - } + "bulletin": [ + "Arknights EN server was officially released on 1/16. In order to not mess up the current data, please only submit drop data from the CN server.", + "We are considering whether to open another website for overseas servers.", + "The translation of the entire website has been finished. Thanks to Syaro and 方舟航海図 for their efforts!" + ] }, "ja": { - "bulletin": { - "bulletin_0": "1月16日に海外版が正式にリリースされます。データの混雑を避けるために、当サイトでは大陸版のドロップデータのみをアップロードして下さい。", - "bulletin_1": "海外版のドロップまとめサイトを開設するかは現時点では思案中のみとなっています。", - "bulletin_2": "Webサイトの翻訳は全て完了しました。Syaroと方舟航海図のご協力に感謝します!" - } + "bulletin": [ + "1月16日に海外版が正式にリリースされます。データの混雑を避けるために、当サイトでは大陸版のドロップデータのみをアップロードして下さい。", + "海外版のドロップまとめサイトを開設するかは現時点では思案中のみとなっています。", + "Webサイトの翻訳は全て完了しました。Syaroと方舟航海図のご協力に感謝します!" + ] }, "ko": { - "bulletin": { - "bulletin_0": "명일방주 해외서버가 1/16일에 오픈하였습니다. 데이터의 혼란을 방지하기 위해, 중국 서버의 보고서만 작성하여 주십시오.", - "bulletin_1": "저희는 해외서버를 위한 웹 사이트 개설을 검토하고 있습니다.", - "bulletin_2": "웹 사이트 전체의 번역이 끝났습니다. Syaro님과 方舟航海図님의 노력에 감사드립니다!" - } + "bulletin": [ + "명일방주 해외서버가 1/16일에 오픈하였습니다. 데이터의 혼란을 방지하기 위해, 중국 서버의 보고서만 작성하여 주십시오.", + "저희는 해외서버를 위한 웹 사이트 개설을 검토하고 있습니다.", + "웹 사이트 전체의 번역이 끝났습니다. Syaro님과 方舟航海図님의 노력에 감사드립니다!" + ] } } @@ -36,7 +36,11 @@ elevation="5" class="bkop-light pa-6" > -

+

+ + mdi-alert-decagram + + {{ $t('menu.about.bulletin') }}

@@ -45,11 +49,12 @@ class="subtitle-1 line-height-wide font-weight-bold" style="word-break: normal" > - {{ $t('bulletin.bulletin_0') }} -
- {{ $t('bulletin.bulletin_1') }} -
- {{ $t('bulletin.bulletin_2') }} +

diff --git a/src/views/About/GettingStarted.vue b/src/views/About/GettingStarted.vue new file mode 100644 index 00000000..8498f4bd --- /dev/null +++ b/src/views/About/GettingStarted.vue @@ -0,0 +1,197 @@ + + + + + \ No newline at end of file diff --git a/src/views/About/Intro.vue b/src/views/About/Intro.vue index 74255893..d1b61462 100644 --- a/src/views/About/Intro.vue +++ b/src/views/About/Intro.vue @@ -34,19 +34,23 @@