mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-02 19:00:15 +01:00
This commit is contained in:
parent
d697660c41
commit
d1835146ca
25 changed files with 59 additions and 60 deletions
|
|
@ -11,7 +11,7 @@ export const confirmDialog = (title: string, text: string, confirm?: () => void,
|
|||
<button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>
|
||||
<button class="b3-button b3-button--text" id="confirmDialogConfirmBtn">${window.siyuan.languages.confirm}</button>
|
||||
</div>`,
|
||||
width: isMobile() ? "80vw" : "520px",
|
||||
width: isMobile() ? "92vw" : "520px",
|
||||
});
|
||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {genUUID} from "../util/genID";
|
||||
import {isMobile} from "../util/functions";
|
||||
|
||||
export class Dialog {
|
||||
private destroyCallback: () => void;
|
||||
|
|
@ -25,7 +26,7 @@ export class Dialog {
|
|||
this.element.innerHTML = `<div class="b3-dialog">
|
||||
<div class="b3-dialog__scrim"${options.transparent ? 'style="background-color:transparent"' : ""}></div>
|
||||
<div class="b3-dialog__container" style="width:${options.width || "auto"}">
|
||||
<svg class="b3-dialog__close${this.disableClose ? " fn__none" : ""}"><use xlink:href="#iconCloseRound"></use></svg>
|
||||
<svg ${(isMobile() && options.title) ? 'style="top:0;right:0;"' : ""} class="b3-dialog__close${this.disableClose ? " fn__none" : ""}"><use xlink:href="#iconCloseRound"></use></svg>
|
||||
<div class="b3-dialog__header${options.title ? "" : " fn__none"}" onselectstart="return false;">${options.title || ""}</div>
|
||||
<div style="height:${options.height || "auto"}">${options.content}</div>
|
||||
</div></div>`;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ export const transactionError = () => {
|
|||
<div class="fn__space"></div>
|
||||
<button class="b3-button">${window.siyuan.languages.rebuildIndex}</button>
|
||||
</div>`,
|
||||
width: isMobile() ? "80vw" : "520px",
|
||||
width: isMobile() ? "92vw" : "520px",
|
||||
});
|
||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
|
|
@ -224,7 +224,7 @@ export const bootSync = () => {
|
|||
fetchPost("/api/sync/getBootSync", {}, response => {
|
||||
if (response.code === 1) {
|
||||
const dialog = new Dialog({
|
||||
width: isMobile() ? "80vw" : "50vw",
|
||||
width: isMobile() ? "92vw" : "50vw",
|
||||
title: "🌩️ " + window.siyuan.languages.bootSyncFailed,
|
||||
content: `<div class="b3-dialog__content">${response.msg}</div>
|
||||
<div class="b3-dialog__action">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue