@@ -44,8 +44,10 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
44
44
<div class="card__header">
45
45
<span class="fn__flex-1 fn__flex-center">${ window . siyuan . languages . riffCard } </span>
46
46
${ html }
47
- ${ isMobile ( ) ? "" : `<div class="fn__space"></div>
48
- <div data-type="fullscreen" class="b3-tooltips b3-tooltips__sw block__icon block__icon--show" aria-label="${ window . siyuan . languages . fullscreen } ">
47
+ <div class="fn__space"></div>
48
+ ${ isMobile ( ) ? `<div data-type="close" class="block__icon block__icon--show">
49
+ <svg><use xlink:href="#iconCloseRound"></use></svg>
50
+ </div>` : `<div data-type="fullscreen" class="b3-tooltips b3-tooltips__sw block__icon block__icon--show" aria-label="${ window . siyuan . languages . fullscreen } ">
49
51
<svg><use xlink:href="#iconFullscreen"></use></svg>
50
52
</div>` }
51
53
</div>
@@ -100,8 +102,8 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
100
102
</div>
101
103
</div>
102
104
</div>` ,
103
- width : isMobile ( ) ? "98vw " : "80vw" ,
104
- height : isMobile ( ) ? "80vh " : "70vh" ,
105
+ width : isMobile ( ) ? "100vw " : "80vw" ,
106
+ height : isMobile ( ) ? "100vh " : "70vh" ,
105
107
} ) ;
106
108
( dialog . element . querySelector ( ".b3-dialog__scrim" ) as HTMLElement ) . style . backgroundColor = "var(--b3-theme-background)" ;
107
109
( dialog . element . querySelector ( ".b3-dialog__container" ) as HTMLElement ) . style . maxWidth = "1024px" ;
@@ -142,6 +144,13 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
142
144
event . preventDefault ( ) ;
143
145
return ;
144
146
}
147
+ const closeElement = hasClosestByAttribute ( event . target as HTMLElement , "data-type" , "close" ) ;
148
+ if ( closeElement ) {
149
+ dialog . destroy ( ) ;
150
+ event . stopPropagation ( ) ;
151
+ event . preventDefault ( ) ;
152
+ return ;
153
+ }
145
154
let type = "" ;
146
155
if ( typeof event . detail === "string" ) {
147
156
if ( event . detail === "1" || event . detail === "j" ) {
0 commit comments