diff --git a/app/src/assets/scss/base.scss b/app/src/assets/scss/base.scss index 79df8d1bc..e41e9638b 100644 --- a/app/src/assets/scss/base.scss +++ b/app/src/assets/scss/base.scss @@ -29,6 +29,8 @@ @import "business/search"; @import "pickr/pcr"; @import "viewerjs/viewer"; +@import "business/export"; +@import "business/card"; /* .status: 3 @@ -417,5 +419,27 @@ html { } } +.switch-doc { + max-height: 70vh; + width: 520px; + + .b3-list:last-child { + border-left: 1px solid var(--b3-theme-surface-lighter); + max-height: calc(70vh - 35px) + } + + &__path { + padding: 4px 8px; + border-top: 1px solid var(--b3-theme-surface-lighter); + color: var(--b3-theme-on-surface); + font-size: 12px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + line-height: 18px; + min-height: 18px; + } +} + // 需放置最后,否则 https://github.com/siyuan-note/siyuan/issues/7056 @import "util/responsive"; diff --git a/app/src/assets/scss/business/_card.scss b/app/src/assets/scss/business/_card.scss new file mode 100644 index 000000000..51cdfc3eb --- /dev/null +++ b/app/src/assets/scss/business/_card.scss @@ -0,0 +1,53 @@ +.card { + &__empty { + display: flex; + justify-content: center; + flex-direction: column; + flex: 1; + text-align: center; + background-color: var(--b3-theme-background); + font-size: 16px; + + & > div { + font-size: 64px; + margin-bottom: 16px; + } + } + + &__action { + padding: 16px 24px; + + & > div > span { + display: block; + color: var(--b3-theme-on-surface); + text-align: center; + line-height: 15px; + font-size: 10px; + } + } + + &__block { + .protyle-wysiwyg [data-node-id][custom-riff-decks] { + box-shadow: none; + } + + &--hide { + .protyle-wysiwyg > .sb > div:nth-of-type(n+2):not(.protyle-attr) { + display: none; + } + + .li > .list { + display: none; + } + + span[data-type~=mark] { + transition: var(--b3-transition); + color: transparent !important; + } + } + } + + +} + + diff --git a/app/src/assets/scss/business/_export.scss b/app/src/assets/scss/business/_export.scss new file mode 100644 index 000000000..c8e54e245 --- /dev/null +++ b/app/src/assets/scss/business/_export.scss @@ -0,0 +1,5 @@ +.export-img.protyle-wysiwyg [data-node-id].li[fold="1"] > .protyle-action:after { + background-color: transparent; + border: 1px solid var(--b3-list-hover); + box-sizing: border-box; +} diff --git a/app/src/assets/scss/business/_history.scss b/app/src/assets/scss/business/_history.scss index b16809a2f..a840f6539 100644 --- a/app/src/assets/scss/business/_history.scss +++ b/app/src/assets/scss/business/_history.scss @@ -42,4 +42,11 @@ color: var(--b3-theme-on-surface); background: var(--b3-theme-background); } + + &__diff { + width: 200px; + border-right: 1px solid var(--b3-border-color); + padding: 8px 0; + overflow: auto; + } } diff --git a/app/src/assets/scss/component/_dialog.scss b/app/src/assets/scss/component/_dialog.scss index 01260d3a5..73a4167ef 100644 --- a/app/src/assets/scss/component/_dialog.scss +++ b/app/src/assets/scss/component/_dialog.scss @@ -82,86 +82,4 @@ height: 16px; width: 16px; } - - &--switch { - max-height: 70vh; - width: 520px; - - .b3-list:last-child { - border-left: 1px solid var(--b3-theme-surface-lighter); - max-height: calc(70vh - 35px) - } - - .dialog__path { - padding: 4px 8px; - border-top: 1px solid var(--b3-theme-surface-lighter); - color: var(--b3-theme-on-surface); - font-size: 12px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - line-height: 18px; - min-height: 18px; - } - } - - &__diff { - width: 200px; - border-right: 1px solid var(--b3-border-color); - padding: 8px 0; - overflow: auto; - } - - &__cardempty { - display: flex; - justify-content: center; - flex-direction: column; - flex: 1; - text-align: center; - background-color: var(--b3-theme-background); - font-size: 16px; - - & > div { - font-size: 64px; - margin-bottom: 16px; - } - } - - &__cardaction { - padding: 16px 24px; - - & > div > span { - display: block; - color: var(--b3-theme-on-surface); - text-align: center; - line-height: 15px; - font-size: 10px; - } - } - - &__cardblock { - .protyle-wysiwyg [data-node-id][custom-riff-decks] { - box-shadow: none; - } - - &--hide { - .protyle-wysiwyg > .sb > div:nth-of-type(n+2):not(.protyle-attr) { - display: none; - } - - .li > .list { - display: none; - } - - span[data-type~=mark] { - transition: var(--b3-transition); - color: transparent !important; - } - } - } - - &__exportimg.protyle-wysiwyg [data-node-id].li[fold="1"] > .protyle-action:after { - background-color: transparent; - border: 1px solid var(--b3-list-hover); - } } diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss index 7e540102f..d36ecd9ee 100644 --- a/app/src/assets/scss/mobile.scss +++ b/app/src/assets/scss/mobile.scss @@ -21,6 +21,8 @@ @import "protyle/protyle"; @import "component/typography"; @import "viewerjs/viewer"; +@import "business/export"; +@import "business/card"; .block__popover { width: 80vw; diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts index 11be56753..db55824db 100644 --- a/app/src/card/openCard.ts +++ b/app/src/card/openCard.ts @@ -48,17 +48,17 @@ export const openCardByData = (cardsData: ICard[], html = "") => { ${window.siyuan.languages.riffCard} ${html} -
-
+
+
🔮
${window.siyuan.languages.noDueCard}
-
+
-
+
`, width: isMobile() ? "98vw" : "80vw", diff --git a/app/src/history/diff.ts b/app/src/history/diff.ts index d283f6008..3f5e7dc2a 100644 --- a/app/src/history/diff.ts +++ b/app/src/history/diff.ts @@ -27,7 +27,7 @@ const genItem = (data: [], data2?: { title: string, fileID: string }[]) => { let leftEditor: Protyle; let rightEditor: Protyle; const renderCompare = (element: HTMLElement) => { - const listElement = hasClosestByClassName(element, "b3-dialog__diff"); + const listElement = hasClosestByClassName(element, "history__diff"); if (!listElement) { return; } @@ -112,7 +112,7 @@ export const showDiff = (data: { id: string, time: string }[]) => { const dialog = new Dialog({ title: window.siyuan.languages.compare, content: `
-
+
  • @@ -172,7 +172,7 @@ export const showDiff = (data: { id: string, time: string }[]) => { if (target.classList.contains("b3-list-item--focus")) { return; } - dialog.element.querySelector(".b3-dialog__diff .b3-list-item--focus")?.classList.remove("b3-list-item--focus"); + dialog.element.querySelector(".history__diff .b3-list-item--focus")?.classList.remove("b3-list-item--focus"); target.classList.add("b3-list-item--focus"); renderCompare(target); } diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 1d009220e..544f89f87 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -409,7 +409,7 @@ export class Breadcrumb { } this.id = id; const excludeTypes: string[] = []; - if (this.element.parentElement?.parentElement && this.element.parentElement.parentElement.classList.contains("b3-dialog__cardblock")) { + if (this.element.parentElement?.parentElement && this.element.parentElement.parentElement.classList.contains("card__block")) { // 闪卡面包屑不能显示答案 excludeTypes.push("NodeTextMark-mark"); } diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts index 0cf225023..2f989bf39 100644 --- a/app/src/protyle/export/util.ts +++ b/app/src/protyle/export/util.ts @@ -38,7 +38,7 @@ export const exportImage = (id: string) => {
`, content: `
-
+
${window.siyuan.languages.exportBySiYuan}
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index 0a6cad2f5..5dafc88bd 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -474,12 +474,12 @@ export const globalShortcut = () => { hideElements(["dialog"]); switchDialog = new Dialog({ title: window.siyuan.languages.switchTab, - content: `
+ content: `
${dockHtml} ${tabHtml}
-
+
`, destroyCallback: () => { if (range && range.getBoundingClientRect().height !== 0) { @@ -967,12 +967,12 @@ ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__ } const dialog = new Dialog({ title: window.siyuan.languages.recentDocs, - content: `
+ content: `
${dockHtml} ${tabHtml}
-
+
`, destroyCallback: () => { if (range && range.getBoundingClientRect().height !== 0) { @@ -984,10 +984,10 @@ ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__ fetchPost("/api/filetree/getFullHPathByID", { id: response.data[0].rootID }, (response) => { - dialog.element.querySelector(".dialog__path").innerHTML = escapeHtml(response.data); + dialog.element.querySelector(".switch-doc__path").innerHTML = escapeHtml(response.data); }); } else { - dialog.element.querySelector(".dialog__path").innerHTML = dialog.element.querySelector(".b3-list-item--focus").textContent; + dialog.element.querySelector(".switch-doc__path").innerHTML = dialog.element.querySelector(".b3-list-item--focus").textContent; } dialog.element.querySelector("input").focus(); dialog.element.setAttribute("data-key", window.siyuan.config.keymap.general.recentDocs.custom);