Skip to content

Commit

Permalink
fix: dashboard cards theme should match the app theme (#5766)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronherman authored Feb 5, 2025
1 parent c54604a commit dc0898e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/dispatch/static/dispatch/src/dashboard/DashboardCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,25 @@ export default {
},
data() {
return {
localOptions: JSON.parse(JSON.stringify(this.options)),
localOptions: JSON.parse(
JSON.stringify({
...this.options,
// on initial load, pull from localStorage which will always be string values
...{ theme: { mode: localStorage.dark_theme == "true" ? "dark" : "light" } },
})
),
}
},
watch: {
options: function (newVal) {
this.localOptions = { ...this.localOptions, ...newVal }
},
"$vuetify.theme.dark": function (newValue) {
"$vuetify.theme.name": function (newValue) {
this.localOptions = {
...this.localOptions,
...{
theme: {
mode: newValue ? "dark" : "light",
mode: newValue,
},
},
}
Expand Down

0 comments on commit dc0898e

Please sign in to comment.