mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
fix broken nord and vulcan themes
This commit is contained in:
committed by
Junyoung Choi
parent
071ce12a7e
commit
e504f8e63e
@@ -1,4 +1,5 @@
|
|||||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||||
|
import uiThemes from 'browser/lib/ui-themes'
|
||||||
|
|
||||||
const saveChanges = newConfig => {
|
const saveChanges = newConfig => {
|
||||||
ConfigManager.set(newConfig)
|
ConfigManager.set(newConfig)
|
||||||
@@ -40,14 +41,7 @@ const chooseTheme = config => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const applyTheme = theme => {
|
const applyTheme = theme => {
|
||||||
const supportedThemes = [
|
if (uiThemes.some(item => item.name === theme)) {
|
||||||
'dark',
|
|
||||||
'white',
|
|
||||||
'solarized-dark',
|
|
||||||
'monokai',
|
|
||||||
'dracula'
|
|
||||||
]
|
|
||||||
if (supportedThemes.indexOf(theme) !== -1) {
|
|
||||||
document.body.setAttribute('data-theme', theme)
|
document.body.setAttribute('data-theme', theme)
|
||||||
if (document.body.querySelector('.MarkdownPreview')) {
|
if (document.body.querySelector('.MarkdownPreview')) {
|
||||||
document.body
|
document.body
|
||||||
|
|||||||
Reference in New Issue
Block a user