change
This commit is contained in:
parent
837f5ae1f5
commit
22c27c0542
2 changed files with 37 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
17
src/index.ts
17
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: `<div class="b3-list-item__first"><span class="b3-list-item__text">${this.i18n.insertEmoji}</span><span class="b3-list-item__meta">😊</span></div>`,
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue