File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,29 @@ export const bindCardEvent = async (options: {
491
491
const sticktabElement = hasClosestByAttribute ( target , "data-type" , "sticktab" ) ;
492
492
if ( sticktabElement ) {
493
493
const stickMenu = new Menu ( ) ;
494
+ stickMenu . addItem ( {
495
+ id : "openInNewTab" ,
496
+ icon : "iconOpen" ,
497
+ label : window . siyuan . languages . openInNewTab ,
498
+ click ( ) {
499
+ openFile ( {
500
+ app : options . app ,
501
+ custom : {
502
+ icon : "iconRiffCard" ,
503
+ title : window . siyuan . languages . spaceRepetition ,
504
+ data : {
505
+ cardsData : options . cardsData ,
506
+ index,
507
+ cardType : filterElement . getAttribute ( "data-cardtype" ) as TCardType ,
508
+ id : docId ,
509
+ title : options . title
510
+ } ,
511
+ id : "siyuan-card"
512
+ } ,
513
+ } ) ;
514
+ options . dialog . destroy ( ) ;
515
+ }
516
+ } ) ;
494
517
stickMenu . addItem ( {
495
518
id : "insertRight" ,
496
519
icon : "iconLayoutRight" ,
@@ -529,6 +552,8 @@ export const bindCardEvent = async (options: {
529
552
"instance" : "Custom" ,
530
553
"customModelType" : "siyuan-card" ,
531
554
"customModelData" : {
555
+ "cardsData" : options . cardsData ,
556
+ "index" : index ,
532
557
"cardType" : filterElement . getAttribute ( "data-cardtype" ) ,
533
558
"id" : docId ,
534
559
"title" : options . title
You can’t perform that action at this time.
0 commit comments