diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts index 22866c84b..c8d978cf6 100644 --- a/app/src/card/openCard.ts +++ b/app/src/card/openCard.ts @@ -10,8 +10,10 @@ import {needSubscribe} from "../util/needSubscribe"; import {fullscreen} from "../protyle/breadcrumb/action"; import {MenuItem} from "../menus/Menu"; import {escapeHtml} from "../util/escape"; -import {getDisplayName, movePathTo} from "../util/pathName"; +/// #if !MOBILE import {newCardTab} from "./newCardTab"; +/// #endif +import {getDisplayName, movePathTo} from "../util/pathName"; export const genCardHTML = (options: { id: string, @@ -19,9 +21,22 @@ export const genCardHTML = (options: { blocks: ICard[], isTab: boolean }) => { - return `
-
- ${options.isTab ? '
' : `${window.siyuan.languages.riffCard}`} + let iconsHTML:string + /// #if MOBILE + iconsHTML=`
+ + ${window.siyuan.languages.riffCard} +
1/${options.blocks.length}
+ + +
`; + /// #else + iconsHTML=`
+ ${options.isTab ? '
' : `
+ +
+ + ${window.siyuan.languages.riffCard}`}
1/${options.blocks.length}
@@ -29,15 +44,17 @@ export const genCardHTML = (options: {
- ${isMobile() ? `
- -
` : `
- -
-
- -
`} -
+
+ +
+
+
+ +
+
`; + /// #endif + return `
+ ${iconsHTML}
🔮
@@ -183,6 +200,7 @@ export const bindCardEvent = (options: { event.preventDefault(); return; } + /// #if !MOBILE const sticktabElement = hasClosestByAttribute(target, "data-type", "sticktab"); if (sticktabElement) { newCardTab({ @@ -197,6 +215,7 @@ export const bindCardEvent = (options: { event.preventDefault(); return; } + /// #endif const closeElement = hasClosestByAttribute(target, "data-type", "close"); if (closeElement) { if (options.dialog) {