From 9f0d3936c1999fd338a22b31a660347e74a2938a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 11 Aug 2023 00:00:09 +0800 Subject: [PATCH] :lipstick: fix https://github.com/siyuan-note/siyuan/issues/8949 --- app/src/assets/scss/mobile.scss | 8 ++++---- app/src/mobile/dock/MobileFiles.ts | 2 +- app/src/mobile/util/setEmpty.ts | 15 +++++++-------- app/src/util/Tree.ts | 4 ++-- app/src/util/pathName.ts | 6 +++--- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss index db7ce7f5d..55b060f69 100644 --- a/app/src/assets/scss/mobile.scss +++ b/app/src/assets/scss/mobile.scss @@ -42,7 +42,7 @@ &__icon { font-size: 18px; - line-height: 40px; + line-height: 32px; height: auto; } @@ -54,8 +54,8 @@ } &__toggle { - height: auto; - padding: 14px; + height: 24px; + padding: 4px; } &__arrow { @@ -64,7 +64,7 @@ } &__action { - padding: 12px; + padding: 8px; height: 16px; svg { diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts index 6291cd44b..f54dd85d3 100644 --- a/app/src/mobile/dock/MobileFiles.ts +++ b/app/src/mobile/dock/MobileFiles.ts @@ -610,7 +610,7 @@ export class MobileFiles extends Model { } return `
  • - + ${unicode2Emoji(item.icon || (item.subFileCount === 0 ? Constants.SIYUAN_IMAGE_FILE : Constants.SIYUAN_IMAGE_FOLDER))} diff --git a/app/src/mobile/util/setEmpty.ts b/app/src/mobile/util/setEmpty.ts index 80fd7b7bd..e49108fc8 100644 --- a/app/src/mobile/util/setEmpty.ts +++ b/app/src/mobile/util/setEmpty.ts @@ -15,24 +15,23 @@ export const setEmpty = (app: App) => { if (emptyElement.innerHTML !== "") { return; } - emptyElement.innerHTML = ` -
    - ${window.siyuan.languages.search} + emptyElement.innerHTML = `
    + ${window.siyuan.languages.search}
    - ${window.siyuan.languages.recentDocs} + ${window.siyuan.languages.recentDocs}
    - ${window.siyuan.languages.dataHistory} + ${window.siyuan.languages.dataHistory}
    - ${window.siyuan.languages.newFile} + ${window.siyuan.languages.newFile}
    - ${window.siyuan.languages.newNotebook} + ${window.siyuan.languages.newNotebook}
    - ${window.siyuan.languages.help} + ${window.siyuan.languages.help}
    `; emptyElement.addEventListener("click", (event) => { let target = event.target as HTMLElement; diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts index 8e631c989..94de65d9a 100644 --- a/app/src/util/Tree.ts +++ b/app/src/util/Tree.ts @@ -77,7 +77,7 @@ export class Tree { let style = ""; if (isMobile()) { if (item.depth > 0) { - style = `padding-left: ${(item.depth - 1) * 30 + 44}px`; + style = `padding-left: ${(item.depth - 1) * 20 + 24}px`; } } else { style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`; @@ -130,7 +130,7 @@ ${item.label ? "data-label='" + item.label + "'" : ""}> let style = ""; if (isMobile()) { if (item.depth > 0) { - style = `padding-left: ${(item.depth - 1) * 30 + 44}px`; + style = `padding-left: ${(item.depth - 1) * 20 + 24}px`; } } else { style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`; diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts index 8f125c4c0..10d79a09d 100644 --- a/app/src/util/pathName.ts +++ b/app/src/util/pathName.ts @@ -232,9 +232,9 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void, ${item.dueFlashcardCount} ${item.flashcardCount}`; } - fileHTML += `
  • + fileHTML += `
  • ${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE, "b3-list-item__graphic", true)} - ${escapeHtml(item.hPath)} + ${escapeHtml(item.hPath)} ${countHTML}
  • `; }); @@ -503,7 +503,7 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => { } fileHTML += `
  • - + ${unicode2Emoji(item.icon || (item.subFileCount === 0 ? Constants.SIYUAN_IMAGE_FILE : Constants.SIYUAN_IMAGE_FOLDER), "b3-list-item__graphic", true)}