1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-26 23:21:41 +01:00

Adds new setting option for smaller scrollbars

This commit is contained in:
Amir Raminfar
2020-02-02 14:37:09 -08:00
parent f069c65496
commit 3e7ef846ad
4 changed files with 59 additions and 6 deletions

View File

@@ -64,8 +64,25 @@ export default {
await this.fetchContainerList();
this.title = `${this.containers.length} containers`;
},
mounted() {
if (this.hasSmallerScrollbars) {
document.documentElement.classList.add("has-custom-scrollbars");
}
},
watch: {
hasSmallerScrollbars(newValue, oldValue) {
if (newValue) {
document.documentElement.classList.add("has-custom-scrollbars");
} else {
document.documentElement.classList.remove("has-custom-scrollbars");
}
}
},
computed: {
...mapState(["containers", "activeContainers", "isMobile", "settings"])
...mapState(["containers", "activeContainers", "isMobile", "settings"]),
hasSmallerScrollbars() {
return this.settings.smallerScrollbars;
}
},
methods: {
...mapActions({