add branding to windowtitle for files and settings
This commit is contained in:
parent
eaf22b10a1
commit
f4df5d782a
@ -28,6 +28,11 @@ 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 +56,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 +122,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 {
|
||||||
|
|||||||
@ -50,9 +50,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex";
|
import {mapMutations, mapState} from "vuex";
|
||||||
|
|
||||||
import HeaderBar from "@/components/header/HeaderBar";
|
import HeaderBar from "@/components/header/HeaderBar";
|
||||||
|
import {
|
||||||
|
name,
|
||||||
|
} from "@/utils/constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "settings",
|
name: "settings",
|
||||||
@ -61,6 +64,25 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user", "loading"]),
|
...mapState(["user", "loading"]),
|
||||||
|
name: () => name,
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: "fetchData",
|
||||||
|
reload: function (value) {
|
||||||
|
if (value === true) {
|
||||||
|
this.fetchData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapMutations(["setLoading"]),
|
||||||
|
async fetchData() {
|
||||||
|
document.title = document.title + ` - ${this.name}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user