Revert "fix: __static path not resolving on development environment (#1165)"
This reverts commit 4b41c6335d
.
This commit is contained in:
parent
797d3b5f32
commit
0c6d4b59c0
5 changed files with 13 additions and 3 deletions
|
@ -20,6 +20,7 @@
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"__static": true,
|
"__static": true,
|
||||||
|
"staticResourcesPath": true,
|
||||||
"__": true,
|
"__": true,
|
||||||
"__n": true,
|
"__n": true,
|
||||||
"app": true
|
"app": true
|
||||||
|
|
|
@ -44,7 +44,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||||
* LBRY URLs not working on Linux ([#1120](https://github.com/lbryio/lbry-app/issues/1120))
|
* LBRY URLs not working on Linux ([#1120](https://github.com/lbryio/lbry-app/issues/1120))
|
||||||
* Fix Windows notifications not showing ([#1145](https://github.com/lbryio/lbry-app/pull/1145))
|
* Fix Windows notifications not showing ([#1145](https://github.com/lbryio/lbry-app/pull/1145))
|
||||||
* Fix export issues ([#1163](https://github.com/lbryio/lbry-app/pull/1163))
|
* Fix export issues ([#1163](https://github.com/lbryio/lbry-app/pull/1163))
|
||||||
* Fix __static path not resolving on development environment
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,16 @@ const app = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Workaround for https://github.com/electron-userland/electron-webpack/issues/52
|
||||||
|
if (!isDev) {
|
||||||
|
window.staticResourcesPath = Path.join(remote.app.getAppPath(), '../static').replace(
|
||||||
|
/\\/g,
|
||||||
|
'\\\\'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
window.staticResourcesPath = '';
|
||||||
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line no-underscore-dangle
|
// eslint-disable-next-line no-underscore-dangle
|
||||||
global.__ = i18n.__;
|
global.__ = i18n.__;
|
||||||
// eslint-disable-next-line no-underscore-dangle
|
// eslint-disable-next-line no-underscore-dangle
|
||||||
|
|
|
@ -172,7 +172,7 @@ Lbry.publishDeprecated = (params, fileListedCallback, publishedCallback, errorCa
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbry.imagePath = file => `file://${__static}/img/${file}`;
|
Lbry.imagePath = file => `${staticResourcesPath}/img/${file}`;
|
||||||
|
|
||||||
Lbry.getMediaType = (contentType, fileName) => {
|
Lbry.getMediaType = (contentType, fileName) => {
|
||||||
if (contentType) {
|
if (contentType) {
|
||||||
|
|
|
@ -30,6 +30,6 @@ export const selectThemePath = createSelector(
|
||||||
selectIsNight,
|
selectIsNight,
|
||||||
(theme, automaticDarkModeEnabled, isNight) => {
|
(theme, automaticDarkModeEnabled, isNight) => {
|
||||||
const dynamicTheme = automaticDarkModeEnabled && isNight ? 'dark' : theme;
|
const dynamicTheme = automaticDarkModeEnabled && isNight ? 'dark' : theme;
|
||||||
return `file://${__static}/themes/${dynamicTheme || 'light'}.css`;
|
return `${staticResourcesPath}/themes/${dynamicTheme || 'light'}.css`;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue