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 Preview from "@/views/files/Preview";
|
||||
import Listing from "@/views/files/Listing";
|
||||
import {
|
||||
name,
|
||||
} from "@/utils/constants";
|
||||
|
||||
|
||||
|
||||
function clean(path) {
|
||||
return path.endsWith("/") ? path.slice(0, -1) : path;
|
||||
@ -51,6 +56,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState(["req", "reload", "loading", "show"]),
|
||||
name: () => name,
|
||||
currentView() {
|
||||
if (this.req.type == undefined) {
|
||||
return null;
|
||||
@ -116,7 +122,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$store.commit("updateRequest", res);
|
||||
document.title = `${res.name} - ${this.$route.name}`;
|
||||
document.title = `${res.name} - ${this.$route.name} - ${this.name}`;
|
||||
} catch (e) {
|
||||
this.error = e;
|
||||
} finally {
|
||||
|
||||
@ -50,9 +50,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import {mapMutations, mapState} from "vuex";
|
||||
|
||||
import HeaderBar from "@/components/header/HeaderBar";
|
||||
import {
|
||||
name,
|
||||
} from "@/utils/constants";
|
||||
|
||||
export default {
|
||||
name: "settings",
|
||||
@ -61,6 +64,25 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user