@@ -73,26 +73,28 @@ export default {
73
73
74
74
computed: {
75
75
appStyle(): { [property: string]: string } {
76
- // Acquire all accent colors (workspace-wide or default)
77
- const accentBackground =
78
- this.account.workspace.accent.background ||
79
- this.$styles.colors.defaultAccentBackground,
80
- accentText =
81
- this.account.workspace.accent.text ||
82
- this.$styles.colors.defaultAccentText;
76
+ const accents = this.account.workspace.accent,
77
+ defaults = this.$styles.colors;
83
78
84
79
// Generate actual style
85
80
return {
86
- // Accent color (background)
87
- "--color-accent-background-normal":
88
- this.$filters.color.hexVar(accentBackground),
89
- "--color-accent-background-dark": this.$filters.color.darkenVar(
90
- accentBackground,
91
- COLOR_ACCENT_BACKGROUND_DARKEN_RATIO
81
+ // Accent color (background, normal)
82
+ "--color-accent-background-normal": this.$filters.color.hexVar(
83
+ accents.background || defaults.defaultAccentBackgroundNormal
92
84
),
93
85
86
+ // Accent color (background, dark)
87
+ "--color-accent-background-dark": accents.background
88
+ ? this.$filters.color.darkenVar(
89
+ accents.background,
90
+ COLOR_ACCENT_BACKGROUND_DARKEN_RATIO
91
+ )
92
+ : this.$filters.color.hexVar(defaults.defaultAccentBackgroundDark),
93
+
94
94
// Accent color (text)
95
- "--color-accent-text": this.$filters.color.hexVar(accentText)
95
+ "--color-accent-text": this.$filters.color.hexVar(
96
+ accents.text || defaults.defaultAccentText
97
+ )
96
98
};
97
99
},
98
100
0 commit comments