Fixes
This commit is contained in:
parent
ff3ef34784
commit
df0f823f1d
|
@ -122,7 +122,7 @@ export default class {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.errors.push(new ErrorEvent({
|
this.errors.push(new ErrorEvent({
|
||||||
module: this.moduleName,
|
module: this.moduleName,
|
||||||
message: `Failed to unload ${dir}`,
|
message: `Failed to unload ${content.dirName}`,
|
||||||
err
|
err
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -295,10 +295,10 @@ export default class {
|
||||||
static findContent(wild, nonunique) {
|
static findContent(wild, nonunique) {
|
||||||
if (this.isThisContent(wild)) return wild;
|
if (this.isThisContent(wild)) return wild;
|
||||||
let content;
|
let content;
|
||||||
if (content = this.getContentById(wild)) return content;
|
content = this.getContentById(wild); if (content) return content;
|
||||||
if (content = this.getContentByDirName(wild)) return content;
|
content = this.getContentByDirName(wild); if (content) return content;
|
||||||
if (content = this.getContentByPath(wild)) return content;
|
content = this.getContentByPath(wild); if (content) return content;
|
||||||
if (content = nonunique && this.getContentByName(wild)) return content;
|
content = this.getContentByName(wild); if (content && nonunique) return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
static getContentIndex(content) { return this.localContent.findIndex(c => c === content) }
|
static getContentIndex(content) { return this.localContent.findIndex(c => c === content) }
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
import { Utils, FileUtils } from 'common';
|
import { Utils, FileUtils } from 'common';
|
||||||
import { Modals } from 'ui';
|
import { Modals } from 'ui';
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
import PluginManager from './pluginmanager';
|
||||||
import ContentConfig from './contentconfig';
|
import ContentConfig from './contentconfig';
|
||||||
import { SettingUpdatedEvent, SettingsUpdatedEvent } from 'structs';
|
import { SettingUpdatedEvent, SettingsUpdatedEvent } from 'structs';
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,10 @@ export default class ThemeManager extends ContentManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
static get unloadTheme() { return this.unloadContent }
|
static get unloadTheme() { return this.unloadContent }
|
||||||
static get reloadTheme() { return this.reloadContent }
|
static async reloadTheme(theme) {
|
||||||
|
theme = await this.reloadContent(theme);
|
||||||
|
theme.recompile();
|
||||||
|
}
|
||||||
|
|
||||||
static enableTheme(theme) {
|
static enableTheme(theme) {
|
||||||
theme.enable();
|
theme.enable();
|
||||||
|
@ -63,12 +66,6 @@ export default class ThemeManager extends ContentManager {
|
||||||
theme.disable();
|
theme.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
static get unloadTheme() { return this.unloadContent }
|
|
||||||
static async reloadTheme(theme) {
|
|
||||||
theme = await this.reloadContent(theme);
|
|
||||||
theme.recompile();
|
|
||||||
}
|
|
||||||
|
|
||||||
static get isTheme() { return this.isThisContent }
|
static get isTheme() { return this.isThisContent }
|
||||||
static isThisContent(theme) {
|
static isThisContent(theme) {
|
||||||
return theme instanceof Theme;
|
return theme instanceof Theme;
|
||||||
|
|
Loading…
Reference in New Issue