forked from mystiq/hydrogen-web
Rename themeName --> themeId
This commit is contained in:
parent
46d2792dac
commit
e3235ea3eb
1 changed files with 5 additions and 5 deletions
|
@ -73,14 +73,14 @@ export class ThemeLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTheme(themeName: string, log?: ILogItem) {
|
setTheme(themeId: string, log?: ILogItem) {
|
||||||
this._platform.logger.wrapOrRun(log, {l: "change theme", id: themeName}, () => {
|
this._platform.logger.wrapOrRun(log, {l: "change theme", id: themeId}, () => {
|
||||||
const themeLocation = this._findThemeLocationFromId(themeName);
|
const themeLocation = this._findThemeLocationFromId(themeId);
|
||||||
if (!themeLocation) {
|
if (!themeLocation) {
|
||||||
throw new Error( `Cannot find theme location for theme "${themeName}"!`);
|
throw new Error( `Cannot find theme location for theme "${themeId}"!`);
|
||||||
}
|
}
|
||||||
this._platform.replaceStylesheet(themeLocation);
|
this._platform.replaceStylesheet(themeLocation);
|
||||||
this._platform.settingsStorage.setString("theme", themeName);
|
this._platform.settingsStorage.setString("theme", themeId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue