theme/style/palette seem to be working
This commit is contained in:
parent
a5b3840d06
commit
1f57fab6ae
10 changed files with 122 additions and 63 deletions
|
|
@ -281,7 +281,7 @@ const AppearanceTab = {
|
|||
},
|
||||
instanceWallpaperUsed() {
|
||||
return (
|
||||
useInstanceStore().background &&
|
||||
this.instanceWallpaper &&
|
||||
!this.$store.state.users.currentUser.background_image
|
||||
)
|
||||
},
|
||||
|
|
@ -312,9 +312,9 @@ const AppearanceTab = {
|
|||
},
|
||||
onImport(parsed, filename) {
|
||||
if (filename.endsWith('.json')) {
|
||||
useInterfaceStore().setThemeCustom(parsed.source || parsed.theme)
|
||||
this.setThemeCustom(parsed.source || parsed.theme)
|
||||
} else if (filename.endsWith('.iss')) {
|
||||
useInterfaceStore().setStyleCustom(parsed)
|
||||
this.setStyleCustom(parsed)
|
||||
}
|
||||
},
|
||||
onImportFailure(result) {
|
||||
|
|
@ -336,25 +336,42 @@ const AppearanceTab = {
|
|||
}
|
||||
},
|
||||
isThemeActive(key) {
|
||||
return key === (this.mergedConfig.theme || useInstanceStore().theme)
|
||||
return (
|
||||
key ===
|
||||
(useSyncConfigStore().mergedConfig.theme)
|
||||
)
|
||||
},
|
||||
isStyleActive(key) {
|
||||
return key === (this.mergedConfig.style || useInstanceStore().style)
|
||||
return (
|
||||
key ===
|
||||
(useSyncConfigStore().mergedConfig.style)
|
||||
)
|
||||
},
|
||||
isPaletteActive(key) {
|
||||
return key === (this.mergedConfig.palette || useInstanceStore().palette)
|
||||
return (
|
||||
key ===
|
||||
(useSyncConfigStore().mergedConfig.palette ||
|
||||
useInstanceStore().palette)
|
||||
)
|
||||
},
|
||||
...mapActions(useInterfaceStore, ['setStyle', 'setTheme']),
|
||||
setPalette(name, data) {
|
||||
useInterfaceStore().setPalette(name)
|
||||
...mapActions(useInterfaceStore, [
|
||||
'setStyle',
|
||||
'setStyleCustom',
|
||||
'setPalette',
|
||||
'setPaletteCustom',
|
||||
'setTheme',
|
||||
'setThemeCustom',
|
||||
]),
|
||||
setLocalPalette(name, data) {
|
||||
this.setPalette(name)
|
||||
this.userPalette = data
|
||||
},
|
||||
setPaletteCustom(data) {
|
||||
useInterfaceStore().setPaletteCustom(data)
|
||||
setLocalPaletteCustom(data) {
|
||||
this.setPaletteCustom(data)
|
||||
this.userPalette = data
|
||||
},
|
||||
resetTheming() {
|
||||
useInterfaceStore().setStyle('stock')
|
||||
this.setStyle('stock')
|
||||
},
|
||||
previewTheme(key, version, input) {
|
||||
let theme3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue