mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-12 17:26:17 +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 uiThemes from 'browser/lib/ui-themes'
|
||||
|
||||
const saveChanges = newConfig => {
|
||||
ConfigManager.set(newConfig)
|
||||
@@ -40,14 +41,7 @@ const chooseTheme = config => {
|
||||
}
|
||||
|
||||
const applyTheme = theme => {
|
||||
const supportedThemes = [
|
||||
'dark',
|
||||
'white',
|
||||
'solarized-dark',
|
||||
'monokai',
|
||||
'dracula'
|
||||
]
|
||||
if (supportedThemes.indexOf(theme) !== -1) {
|
||||
if (uiThemes.some(item => item.name === theme)) {
|
||||
document.body.setAttribute('data-theme', theme)
|
||||
if (document.body.querySelector('.MarkdownPreview')) {
|
||||
document.body
|
||||
|
||||
Reference in New Issue
Block a user