From 266b03fbf7fb9d35fde50ac3199ea23611ccc2bc Mon Sep 17 00:00:00 2001 From: LouisLam Date: Fri, 24 Sep 2021 14:42:54 +0800 Subject: [PATCH 1/3] language key from "Status Page Nothing" to "statusPageNothing" --- package-lock.json | 28 ++++++++++++++++++++++++++++ src/languages/da-DK.js | 2 +- src/languages/de-DE.js | 2 +- src/languages/en.js | 2 +- src/languages/es-ES.js | 2 +- src/languages/et-EE.js | 2 +- src/languages/fr-FR.js | 2 +- src/languages/it-IT.js | 2 +- src/languages/ja.js | 2 +- src/languages/ko-KR.js | 2 +- src/languages/nl-NL.js | 2 +- src/languages/pl.js | 2 +- src/languages/pt-BR.js | 2 +- src/languages/ru-RU.js | 2 +- src/languages/sr-latn.js | 2 +- src/languages/sr.js | 2 +- src/languages/sv-SE.js | 2 +- src/languages/tr-TR.js | 2 +- src/languages/zh-CN.js | 2 +- src/languages/zh-HK.js | 2 +- src/pages/StatusPage.vue | 2 +- 21 files changed, 48 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6af18358..2c30d0773 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,6 +61,7 @@ "@vitejs/plugin-vue": "^1.6.2", "@vue/compiler-sfc": "^3.2.11", "core-js": "^3.17.3", + "cross-env": "^7.0.3", "dns2": "^2.0.1", "eslint": "^7.32.0", "eslint-plugin-vue": "^7.17.0", @@ -2230,6 +2231,24 @@ "node": ">=10" } }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -9780,6 +9799,15 @@ "yaml": "^1.10.0" } }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", diff --git a/src/languages/da-DK.js b/src/languages/da-DK.js index 97f77fa3b..b778c8189 100644 --- a/src/languages/da-DK.js +++ b/src/languages/da-DK.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 1e182f845..4014d0533 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/en.js b/src/languages/en.js index 61092f37c..75d8f30c3 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/es-ES.js b/src/languages/es-ES.js index 0084e3a2b..7571b1308 100644 --- a/src/languages/es-ES.js +++ b/src/languages/es-ES.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/et-EE.js b/src/languages/et-EE.js index 451d8daeb..b7d9722c3 100644 --- a/src/languages/et-EE.js +++ b/src/languages/et-EE.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/fr-FR.js b/src/languages/fr-FR.js index 9d0c946e6..370de5947 100644 --- a/src/languages/fr-FR.js +++ b/src/languages/fr-FR.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 5c24ae4b9..599761a23 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/ja.js b/src/languages/ja.js index 0dd77dd27..bf8e3129a 100644 --- a/src/languages/ja.js +++ b/src/languages/ja.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/ko-KR.js b/src/languages/ko-KR.js index a2d685dc2..fb3d65ea3 100644 --- a/src/languages/ko-KR.js +++ b/src/languages/ko-KR.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/nl-NL.js b/src/languages/nl-NL.js index 72bde9ddb..354429155 100644 --- a/src/languages/nl-NL.js +++ b/src/languages/nl-NL.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/pl.js b/src/languages/pl.js index 264c3a127..65f43aac1 100644 --- a/src/languages/pl.js +++ b/src/languages/pl.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Średni ping", "Avg. Response": "Średnia odpowiedź", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/pt-BR.js b/src/languages/pt-BR.js index b9e86e76a..4fc22fefd 100644 --- a/src/languages/pt-BR.js +++ b/src/languages/pt-BR.js @@ -170,7 +170,7 @@ export default { "Avg. Response": "Resposta Média. ", "Status Page": "Página de Status", "Entry Page": "Página de entrada", - "Status Page Nothing": "Nada aqui, por favor, adicione um grupo ou monitor.", + "statusPageNothing": "Nada aqui, por favor, adicione um grupo ou monitor.", "No Services": "Nenhum Serviço", "All Systems Operational": "Todos os Serviços Operacionais", "Partially Degraded Service": "Serviço parcialmente degradado", diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index 20c26b4bd..b27baad13 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/sr-latn.js b/src/languages/sr-latn.js index 751370f7a..51cb7f8f0 100644 --- a/src/languages/sr-latn.js +++ b/src/languages/sr-latn.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/sr.js b/src/languages/sr.js index c4e7f77fc..0c8b6ef44 100644 --- a/src/languages/sr.js +++ b/src/languages/sr.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/sv-SE.js b/src/languages/sv-SE.js index b7636464f..de4fbcc7d 100644 --- a/src/languages/sv-SE.js +++ b/src/languages/sv-SE.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/tr-TR.js b/src/languages/tr-TR.js index 01b60da5b..c73775bb1 100644 --- a/src/languages/tr-TR.js +++ b/src/languages/tr-TR.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js index c5aa9ca69..cf393cc79 100644 --- a/src/languages/zh-CN.js +++ b/src/languages/zh-CN.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/languages/zh-HK.js b/src/languages/zh-HK.js index fda2ed16d..92714d713 100644 --- a/src/languages/zh-HK.js +++ b/src/languages/zh-HK.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "Status Page Nothing": "Nothing here, please add a group or a monitor.", + "statusPageNothing": "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 15420d8e8..e8623ca56 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -185,7 +185,7 @@
- 👀 {{ $t("Status Page Nothing") }} + 👀 {{ $t("statusPageNothing") }}
From a856780066bc2ff6f279098655e7bb81cde1bfa9 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Fri, 24 Sep 2021 15:00:52 +0800 Subject: [PATCH 2/3] fix the active link problem --- src/router.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/router.js b/src/router.js index 8fc533955..078c446b4 100644 --- a/src/router.js +++ b/src/router.js @@ -17,7 +17,10 @@ const routes = [ component: Entry, }, { - path: "/dashboard", + // If it is "/dashboard", the active link is not working + // If it is "", it overrides the "/" unexpectedly + // Give a random name to solve the problem. + path: "/empty", component: Layout, children: [ { @@ -26,7 +29,7 @@ const routes = [ children: [ { name: "DashboardHome", - path: "", + path: "/dashboard", component: DashboardHome, children: [ { From 50b868e7513f84d68464f9b4e52f4469d9cc150c Mon Sep 17 00:00:00 2001 From: LouisLam Date: Fri, 24 Sep 2021 15:26:48 +0800 Subject: [PATCH 3/3] fix #465 --- src/pages/StatusPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index e8623ca56..767578aeb 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -377,7 +377,7 @@ export default { }, async created() { - this.hasToken = ("token" in localStorage); + this.hasToken = ("token" in this.$root.storage()); // Browser change page // https://stackoverflow.com/questions/7317273/warn-user-before-leaving-web-page-with-unsaved-changes