@@ -18,7 +18,7 @@ import {
1818 lockScreen ,
1919 ICard ,
2020 ICardData ,
21- Custom , exitSiYuan , getModelByDockType , getAllEditor , Files , platformUtils
21+ Custom , exitSiYuan , getModelByDockType , getAllEditor , Files , platformUtils , openSetting
2222} from "siyuan" ;
2323import "./index.scss" ;
2424import { IMenuItem } from "siyuan/types" ;
@@ -34,7 +34,7 @@ export default class PluginSample extends Plugin {
3434 private blockIconEventBindThis = this . blockIconEvent . bind ( this ) ;
3535
3636 updateProtyleToolbar ( toolbar : Array < string | IMenuItem > ) {
37- toolbar . push ( "|" )
37+ toolbar . push ( "|" ) ;
3838 toolbar . push ( {
3939 name : "insert-smail-emoji" ,
4040 icon : "iconEmoji" ,
@@ -44,7 +44,7 @@ export default class PluginSample extends Plugin {
4444 click ( protyle : Protyle ) {
4545 protyle . insert ( "😊" ) ;
4646 }
47- } )
47+ } ) ;
4848 return toolbar ;
4949 }
5050
@@ -363,6 +363,14 @@ export default class PluginSample extends Plugin {
363363 const menu = new Menu ( "topBarSample" , ( ) => {
364364 console . log ( this . i18n . byeMenu ) ;
365365 } ) ;
366+ menu . addItem ( {
367+ icon : "iconSettings" ,
368+ label : "Open Setting" ,
369+ accelerator : this . commands [ 0 ] . customHotkey ,
370+ click : ( ) => {
371+ openSetting ( this . app ) ;
372+ }
373+ } ) ;
366374 menu . addItem ( {
367375 icon : "iconInfo" ,
368376 label : "Dialog(open doc first)" ,
@@ -372,7 +380,7 @@ export default class PluginSample extends Plugin {
372380 }
373381 } ) ;
374382 menu . addItem ( {
375- icon : "iconInfo " ,
383+ icon : "iconFocus " ,
376384 label : "Select Opened Doc(open doc first)" ,
377385 accelerator : this . commands [ 0 ] . customHotkey ,
378386 click : ( ) => {
0 commit comments