mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
b24641c62d
commit
b1e7624357
1 changed files with 13 additions and 4 deletions
|
|
@ -44,8 +44,10 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
<div class="card__header">
|
||||
<span class="fn__flex-1 fn__flex-center">${window.siyuan.languages.riffCard}</span>
|
||||
${html}
|
||||
${isMobile() ? "" : `<div class="fn__space"></div>
|
||||
<div data-type="fullscreen" class="b3-tooltips b3-tooltips__sw block__icon block__icon--show" aria-label="${window.siyuan.languages.fullscreen}">
|
||||
<div class="fn__space"></div>
|
||||
${isMobile() ? `<div data-type="close" class="block__icon block__icon--show">
|
||||
<svg><use xlink:href="#iconCloseRound"></use></svg>
|
||||
</div>` : `<div data-type="fullscreen" class="b3-tooltips b3-tooltips__sw block__icon block__icon--show" aria-label="${window.siyuan.languages.fullscreen}">
|
||||
<svg><use xlink:href="#iconFullscreen"></use></svg>
|
||||
</div>`}
|
||||
</div>
|
||||
|
|
@ -100,8 +102,8 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
width: isMobile() ? "98vw" : "80vw",
|
||||
height: isMobile() ? "80vh" : "70vh",
|
||||
width: isMobile() ? "100vw" : "80vw",
|
||||
height: isMobile() ? "100vh" : "70vh",
|
||||
});
|
||||
(dialog.element.querySelector(".b3-dialog__scrim") as HTMLElement).style.backgroundColor = "var(--b3-theme-background)";
|
||||
(dialog.element.querySelector(".b3-dialog__container") as HTMLElement).style.maxWidth = "1024px";
|
||||
|
|
@ -142,6 +144,13 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
const closeElement = hasClosestByAttribute(event.target as HTMLElement, "data-type", "close");
|
||||
if (closeElement) {
|
||||
dialog.destroy();
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
let type = "";
|
||||
if (typeof event.detail === "string") {
|
||||
if (event.detail === "1" || event.detail === "j") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue