diff options
author | 135e2 <[email protected]> | 2022-08-13 23:07:34 +0800 |
---|---|---|
committer | 135e2 <[email protected]> | 2022-08-13 23:07:34 +0800 |
commit | 71877b6a159550c4a4f89288cd025b76de05bf81 (patch) | |
tree | 66fda2ddac04c09a77e257869085ebd12442ffc1 /src/App.vue | |
parent | ac6e9eca34d130f065ae47a0df8d722164fa9748 (diff) | |
download | otonashi-71877b6a159550c4a4f89288cd025b76de05bf81.tar.gz otonashi-71877b6a159550c4a4f89288cd025b76de05bf81.tar.bz2 otonashi-71877b6a159550c4a4f89288cd025b76de05bf81.zip |
chore(snackbar): support snackbar theme
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue index a1960eb..434845a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,7 @@ @click="toggleTheme" ></v-list-item> </v-list ></v-navigation-drawer> - <v-snackbar color="grey" v-model="snackbar"> + <v-snackbar timeout="3000" :color="snackbarColor" v-model="snackbar"> {{ snackbarText }} <template v-slot:actions> @@ -99,6 +99,7 @@ export default { atSettings: false, snackbar: false, snackbarText: "Default snackbar text (End-user shouldn't see this)", + snackbarColor: "black", bg: { // backgroundColor: "grey", backgroundImage: "", @@ -111,7 +112,7 @@ export default { return { theme, - toggleTheme: () => + toggleVuetifyTheme: () => (theme.global.name.value = theme.global.current.value.dark ? "light" : "dark"), @@ -132,6 +133,10 @@ export default { this.snackbarText = text; this.snackbar = true; }, + toggleTheme() { + this.toggleVuetifyTheme(); + this.snackbarColor = this.snackbarColor == "black" ? "grey" : "black"; + }, updateTitleSize(s) { this.titleSize = `${s}px`; }, |