aboutsummaryrefslogtreecommitdiff
path: root/src/components/style_switcher/style_switcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/style_switcher/style_switcher.js')
-rw-r--r--src/components/style_switcher/style_switcher.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js
index 8c3d4861..ebde4475 100644
--- a/src/components/style_switcher/style_switcher.js
+++ b/src/components/style_switcher/style_switcher.js
@@ -10,6 +10,7 @@ import ContrastRatio from '../contrast_ratio/contrast_ratio.vue'
import TabSwitcher from '../tab_switcher/tab_switcher.js'
import Preview from './preview.vue'
import ExportImport from '../export_import/export_import.vue'
+import Checkbox from '../checkbox/checkbox.vue'
// List of color values used in v1
const v1OnlyNames = [
@@ -27,7 +28,7 @@ export default {
data () {
return {
availableStyles: [],
- selected: this.$store.state.config.theme,
+ selected: this.$store.getters.mergedConfig.theme,
previewShadows: {},
previewColors: {},
@@ -73,6 +74,7 @@ export default {
topBarLinkColorLocal: undefined,
alertErrorColorLocal: undefined,
+ alertWarningColorLocal: undefined,
badgeOpacityLocal: undefined,
badgeNotificationColorLocal: undefined,
@@ -111,7 +113,7 @@ export default {
})
},
mounted () {
- this.normalizeLocalState(this.$store.state.config.customTheme)
+ this.normalizeLocalState(this.$store.getters.mergedConfig.customTheme)
if (typeof this.shadowSelected === 'undefined') {
this.shadowSelected = this.shadowsAvailable[0]
}
@@ -146,6 +148,7 @@ export default {
btnText: this.btnTextColorLocal,
alertError: this.alertErrorColorLocal,
+ alertWarning: this.alertWarningColorLocal,
badgeNotification: this.badgeNotificationColorLocal,
faint: this.faintColorLocal,
@@ -229,6 +232,7 @@ export default {
topBar: hex2rgb(colors.topBar),
input: hex2rgb(colors.input),
alertError: hex2rgb(colors.alertError),
+ alertWarning: hex2rgb(colors.alertWarning),
badgeNotification: hex2rgb(colors.badgeNotification)
}
@@ -338,7 +342,8 @@ export default {
FontControl,
TabSwitcher,
Preview,
- ExportImport
+ ExportImport,
+ Checkbox
},
methods: {
setCustomTheme () {
@@ -365,9 +370,9 @@ export default {
return version >= 1 || version <= 2
},
clearAll () {
- const state = this.$store.state.config.customTheme
+ const state = this.$store.getters.mergedConfig.customTheme
const version = state.colors ? 2 : 'l1'
- this.normalizeLocalState(this.$store.state.config.customTheme, version)
+ this.normalizeLocalState(this.$store.getters.mergedConfig.customTheme, version)
},
// Clears all the extra stuff when loading V1 theme