-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix theme path issue #3048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix theme path issue #3048
Changes from 5 commits
46ac4e7
8888a2f
0ac9124
1e3d660
e63dbca
57f7299
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| /* eslint-disable no-undef */ | ||
| if (process.env.NODE_ENV === 'production') { | ||
| if (process.env.NODE_ENV === 'development') { | ||
| // eslint-disable-next-line global-require | ||
| module.exports = require('./index.prod').default | ||
| module.exports = require('./index.dev').default | ||
| } else { | ||
| // eslint-disable-next-line global-require | ||
| module.exports = require('./index.dev').default | ||
| module.exports = require('./index.prod').default | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,7 +108,6 @@ function validate (config) { | |
| } | ||
|
|
||
| function _save (config) { | ||
| console.log(config) | ||
| window.localStorage.setItem('config', JSON.stringify(config)) | ||
| } | ||
|
|
||
|
|
@@ -141,7 +140,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}`) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @incredibleweirdo Is this working on Mac? Just wondering because if the other change in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, changing themes appears to work fine. |
||
| } else { | ||
| config.editor.theme = 'default' | ||
| } | ||
|
|
@@ -183,7 +182,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', { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is what it needs to be for macOS:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, changed this & tested it with Ubuntu binary. Theming (Editor, in preview code block & app theme) is working.