feat: add branding to the window title (#1850)
This commit is contained in:
parent
fca5fc5b87
commit
f8dfbf7eee
|
@ -12,7 +12,7 @@ import ProfileSettings from "@/views/settings/Profile";
|
||||||
import Shares from "@/views/settings/Shares";
|
import Shares from "@/views/settings/Shares";
|
||||||
import Errors from "@/views/Errors";
|
import Errors from "@/views/Errors";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { baseURL } from "@/utils/constants";
|
import { baseURL, name } from "@/utils/constants";
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ const router = new Router({
|
||||||
return next({ path: "/files" });
|
return next({ path: "/files" });
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = "Login";
|
document.title = "Login - " + name;
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -140,7 +140,7 @@ const router = new Router({
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
document.title = to.name;
|
document.title = to.name + " - " + name;
|
||||||
|
|
||||||
if (to.matched.some((record) => record.meta.requiresAuth)) {
|
if (to.matched.some((record) => record.meta.requiresAuth)) {
|
||||||
if (!store.getters.isLogged) {
|
if (!store.getters.isLogged) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ import Breadcrumbs from "@/components/Breadcrumbs";
|
||||||
import Errors from "@/views/Errors";
|
import Errors from "@/views/Errors";
|
||||||
import Preview from "@/views/files/Preview";
|
import Preview from "@/views/files/Preview";
|
||||||
import Listing from "@/views/files/Listing";
|
import Listing from "@/views/files/Listing";
|
||||||
|
import { name } from "@/utils/constants";
|
||||||
|
|
||||||
function clean(path) {
|
function clean(path) {
|
||||||
return path.endsWith("/") ? path.slice(0, -1) : path;
|
return path.endsWith("/") ? path.slice(0, -1) : path;
|
||||||
|
@ -51,6 +52,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["req", "reload", "loading", "show"]),
|
...mapState(["req", "reload", "loading", "show"]),
|
||||||
|
name: () => name,
|
||||||
currentView() {
|
currentView() {
|
||||||
if (this.req.type == undefined) {
|
if (this.req.type == undefined) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -116,7 +118,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.commit("updateRequest", res);
|
this.$store.commit("updateRequest", res);
|
||||||
document.title = `${res.name} - ${this.$route.name}`;
|
document.title = `${res.name} - ${this.$route.name} - ${this.name}`;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = e;
|
this.error = e;
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue