Fix __static paths for production. Paths aren't correctly resolved on development
This commit is contained in:
parent
b07e16c913
commit
df01c361df
3 changed files with 4 additions and 4 deletions
|
@ -203,7 +203,7 @@ lbry.publishDeprecated = function(
|
||||||
};
|
};
|
||||||
|
|
||||||
lbry.imagePath = function(file) {
|
lbry.imagePath = function(file) {
|
||||||
return "img/" + file;
|
return __static +"/img/" + file;
|
||||||
};
|
};
|
||||||
|
|
||||||
lbry.getMediaType = function(contentType, fileName) {
|
lbry.getMediaType = function(contentType, fileName) {
|
||||||
|
|
|
@ -6,7 +6,6 @@ import * as settings from "constants/settings";
|
||||||
import lbry from "lbry.js";
|
import lbry from "lbry.js";
|
||||||
import Link from "component/link";
|
import Link from "component/link";
|
||||||
import FormFieldPrice from "component/formFieldPrice";
|
import FormFieldPrice from "component/formFieldPrice";
|
||||||
import { remote } from "electron";
|
|
||||||
|
|
||||||
class SettingsPage extends React.PureComponent {
|
class SettingsPage extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -23,7 +22,7 @@ class SettingsPage extends React.PureComponent {
|
||||||
});
|
});
|
||||||
const success = () => {
|
const success = () => {
|
||||||
this.setState({ clearingCache: false });
|
this.setState({ clearingCache: false });
|
||||||
window.location.href = `${__static}/index.html`;
|
window.location.href = `${__static}/index.html`; //TODO: Update this, since index.html isn't anymore
|
||||||
};
|
};
|
||||||
const clear = () => this.props.clearCache().then(success.bind(this));
|
const clear = () => this.props.clearCache().then(success.bind(this));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import * as settings from "constants/settings";
|
import * as settings from "constants/settings";
|
||||||
import { createSelector } from "reselect";
|
import { createSelector } from "reselect";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
const _selectState = state => state.settings || {};
|
const _selectState = state => state.settings || {};
|
||||||
|
|
||||||
|
@ -35,5 +36,5 @@ export const selectLanguages = createSelector(
|
||||||
|
|
||||||
export const selectThemePath = createSelector(
|
export const selectThemePath = createSelector(
|
||||||
makeSelectClientSetting(settings.THEME),
|
makeSelectClientSetting(settings.THEME),
|
||||||
theme => "themes/" + (theme || "light") + ".css"
|
theme => __static + "/themes/" + (theme || "light") + ".css"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue