1
0
mirror of https://github.com/BoostIo/Boostnote synced 2026-02-18 18:28:49 +00:00

Merge branch 'master' into date-iso8601

This commit is contained in:
Junyoung Choi
2020-07-20 19:42:08 +09:00
13 changed files with 420 additions and 47 deletions

View File

@@ -139,7 +139,10 @@ export const DEFAULT_CONFIG = {
username: '',
password: ''
},
coloredTags: {}
coloredTags: {},
wakatime: {
key: null
}
}
function validate(config) {
@@ -255,6 +258,12 @@ function assignConfigValues(originalConfig, rcConfig) {
originalConfig.hotkey,
rcConfig.hotkey
)
config.wakatime = Object.assign(
{},
DEFAULT_CONFIG.wakatime,
originalConfig.wakatime,
rcConfig.wakatime
)
config.blog = Object.assign(
{},
DEFAULT_CONFIG.blog,

View File

@@ -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