mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
fix path Linux
This commit is contained in:
@@ -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', {
|
||||
|
||||
@@ -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}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user