1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

fix path Linux

This commit is contained in:
AWolf81
2019-05-30 09:10:04 -07:00
committed by Junyoung Choi
parent 38fcee35c2
commit ba6eb4f26f
4 changed files with 13 additions and 6 deletions

View File

@@ -142,7 +142,7 @@ function get () {
const theme = consts.THEMES.find(theme => theme.name === config.editor.theme)
if (theme) {
editorTheme.setAttribute('href', theme.path)
editorTheme.setAttribute('href', win ? theme.path : `../${theme.path}`)
} else {
config.editor.theme = 'default'
}
@@ -190,7 +190,7 @@ function set (updates) {
const newTheme = consts.THEMES.find(theme => theme.name === newConfig.editor.theme)
if (newTheme) {
editorTheme.setAttribute('href', newTheme.path)
editorTheme.setAttribute('href', win ? newTheme.path : `../${newTheme.path}`)
}
ipcRenderer.send('config-renew', {

View File

@@ -14,6 +14,7 @@ import { getLanguages } from 'browser/lib/Languages'
import normalizeEditorFontFamily from 'browser/lib/normalizeEditorFontFamily'
const OSX = global.process.platform === 'darwin'
const win = global.process.platform === 'win32'
const electron = require('electron')
const ipc = electron.ipcRenderer
@@ -135,7 +136,7 @@ class UiTab extends React.Component {
const theme = consts.THEMES.find(theme => theme.name === newCodemirrorTheme)
if (theme) {
checkHighLight.setAttribute('href', theme.path)
checkHighLight.setAttribute('href', win ? theme.path : `../${theme.path}`)
}
}