From 994c441a09c050f15dbf607c78e7f73a7f5596d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20N=C3=BCsse?= Date: Wed, 16 Mar 2022 15:19:09 +0100 Subject: [PATCH] switch to routerbased names for login&settings --- frontend/src/router/index.js | 6 +++--- frontend/src/views/Login.vue | 1 - frontend/src/views/Settings.vue | 20 +------------------- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 0b77cdf2..f902dec0 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -12,7 +12,7 @@ import ProfileSettings from "@/views/settings/Profile"; import Shares from "@/views/settings/Shares"; import Errors from "@/views/Errors"; import store from "@/store"; -import { baseURL } from "@/utils/constants"; +import { baseURL, name as instancename } from "@/utils/constants"; Vue.use(Router); @@ -29,7 +29,7 @@ const router = new Router({ return next({ path: "/files" }); } - document.title = "Login"; + document.title = "Login - " + instancename; next(); }, }, @@ -140,7 +140,7 @@ const router = new Router({ }); router.beforeEach((to, from, next) => { - document.title = to.name; + document.title = to.name + " - " + instancename; if (to.matched.some((record) => record.meta.requiresAuth)) { if (!store.getters.isLogged) { diff --git a/frontend/src/views/Login.vue b/frontend/src/views/Login.vue index d3ebc8ac..50d4392d 100644 --- a/frontend/src/views/Login.vue +++ b/frontend/src/views/Login.vue @@ -69,7 +69,6 @@ export default { }; }, mounted() { - window.document.title = window.document.title + " - " + name; if (!recaptcha) return; window.grecaptcha.ready(function () { diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue index 7f6435de..b0d4cffc 100644 --- a/frontend/src/views/Settings.vue +++ b/frontend/src/views/Settings.vue @@ -50,10 +50,9 @@