diff --git a/src/index.scss b/src/index.scss index cb1be95..c8efd4f 100644 --- a/src/index.scss +++ b/src/index.scss @@ -1,3 +1,26 @@ #helloPanel { border: 1px rgb(189, 119, 119) dashed; +} + +.plugin-sample { + &__custom-tab { + background-color: var(--b3-theme-background); + height: 100%; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + } + + &__custom-dock { + display: flex; + justify-content: center; + align-items: center; + } + + &__time { + background: var(--b3-card-info-background); + border-radius: 4px; + padding: 2px 8px; + } } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 51c40af..a5ccd12 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,9 @@ import { getFrontend, getBackend, IModel, - Setting + Setting, + fetchPost, + Protyle } from "siyuan"; import "@/index.scss"; @@ -167,6 +169,15 @@ export default class PluginSample extends Plugin { actionElement: btnaElement, }); + this.protyleSlash = [{ + filter: ["insert emoji ๐Ÿ˜Š", "ๆ’ๅ…ฅ่กจๆƒ… ๐Ÿ˜Š", "crbqwx"], + html: `
${this.i18n.insertEmoji}๐Ÿ˜Š
`, + id: "insertEmoji", + callback(protyle: Protyle) { + protyle.insert("๐Ÿ˜Š"); + } + }]; + console.log(this.i18n.helloPlugin); } @@ -240,10 +251,10 @@ export default class PluginSample extends Plugin { }); menu.addItem({ icon: "iconInfo", - label: "Dialog", + label: "Dialog(open help first)", accelerator: this.commands[0].customHotkey, click: () => { - this.showDialog() + this.showDialog(); } }); if (!this.isMobile) {