saving "first style palette" stuff
This commit is contained in:
parent
3f331b53db
commit
b348d22a2b
3 changed files with 11 additions and 5 deletions
|
|
@ -482,7 +482,7 @@ const interfaceMod = {
|
|||
return { name: x.variant, ...cleanDirectives }
|
||||
})
|
||||
.forEach(palette => {
|
||||
const key = 'style.' + palette.name.toLowerCase().replace(/ /, '_')
|
||||
const key = 'style.' + palette.name.toLowerCase().replace(/ /g, '_')
|
||||
if (!firstStylePaletteName) firstStylePaletteName = key
|
||||
palettesIndex[key] = () => Promise.resolve(palette)
|
||||
})
|
||||
|
|
@ -494,6 +494,10 @@ const interfaceMod = {
|
|||
state.useStylePalette ? firstStylePaletteName : (userPaletteName || instancePaletteName)
|
||||
)
|
||||
|
||||
if (state.useStylePalette) {
|
||||
commit('setOption', { name: 'palette', value: firstStylePaletteName })
|
||||
}
|
||||
|
||||
state.paletteNameUsed = palette.nameUsed
|
||||
state.paletteDataUsed = palette.dataUsed
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue