✨ misc(setting-utils)
This commit is contained in:
parent
8daa01aedb
commit
56be185458
2 changed files with 74 additions and 54 deletions
14
src/index.ts
14
src/index.ts
|
@ -164,13 +164,6 @@ export default class PluginSample extends Plugin {
|
|||
});
|
||||
|
||||
this.settingUtils = new SettingUtils(this, STORAGE_NAME);
|
||||
|
||||
try {
|
||||
this.settingUtils.load();
|
||||
} catch (error) {
|
||||
console.error("Error loading settings storage, probably empty config json:", error);
|
||||
}
|
||||
|
||||
this.settingUtils.addItem({
|
||||
key: "Input",
|
||||
value: "",
|
||||
|
@ -274,6 +267,13 @@ export default class PluginSample extends Plugin {
|
|||
description: this.i18n.hintDesc,
|
||||
});
|
||||
|
||||
try {
|
||||
this.settingUtils.load();
|
||||
} catch (error) {
|
||||
console.error("Error loading settings storage, probably empty config json:", error);
|
||||
}
|
||||
|
||||
|
||||
this.protyleSlash = [{
|
||||
filter: ["insert emoji 😊", "插入表情 😊", "crbqwx"],
|
||||
html: `<div class="b3-list-item__first"><span class="b3-list-item__text">${this.i18n.insertEmoji}</span><span class="b3-list-item__meta">😊</span></div>`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue