misc(setting-utils)

This commit is contained in:
frostime 2024-04-28 17:48:49 +08:00
parent 8daa01aedb
commit 56be185458
2 changed files with 74 additions and 54 deletions

View file

@ -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>`,