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..767578aeb 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -185,7 +185,7 @@
- 👀 {{ $t("Status Page Nothing") }} + 👀 {{ $t("statusPageNothing") }}
@@ -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 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: [ {