Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:lipstick: fix https://github.com/siyuan-note/siyuan/issues/8949

Vanessa9f0d3936c199
diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss
index db7ce7f5d8..55b060f696 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 6291cd44b5..f54dd85d3f 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 `<li data-node-id="${item.id}" data-name="${Lute.EscapeHTMLStr(item.name)}" data-type="navigation-file"
class="b3-list-item" data-path="${item.path}">
- <span style="padding-left: ${(item.path.split("/").length - 2) * 30 + 44}px" class="b3-list-item__toggle${item.subFileCount === 0 ? " fn__hidden" : ""}">
+ <span style="padding-left: ${(item.path.split("/").length - 2) * 20 + 24}px" class="b3-list-item__toggle${item.subFileCount === 0 ? " fn__hidden" : ""}">
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
</span>
<span class="b3-list-item__icon">${unicode2Emoji(item.icon || (item.subFileCount === 0 ? Constants.SIYUAN_IMAGE_FILE : Constants.SIYUAN_IMAGE_FOLDER))}</span>
diff --git a/app/src/mobile/util/setEmpty.ts b/app/src/mobile/util/setEmpty.ts
index 80fd7b7bd5..e49108fc8f 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 = `
-<div id="emptySearch" class="b3-list-item">
- <svg class="b3-list-item__graphic"><use xlink:href="#iconSearch"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.search}</span>
+ emptyElement.innerHTML = `<div id="emptySearch" class="b3-list-item">
+ <svg class="b3-list-item__graphic"><use xlink:href="#iconSearch"></use></svg><span class="fn__space"></span><span class="b3-list-item__text">${window.siyuan.languages.search}</span>
</div>
<div id="emptyRecent" class="b3-list-item">
- <svg class="b3-list-item__graphic"><use xlink:href="#iconList"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.recentDocs}</span>
+ <svg class="b3-list-item__graphic"><use xlink:href="#iconList"></use></svg><span class="fn__space"></span><span class="b3-list-item__text">${window.siyuan.languages.recentDocs}</span>
</div>
<div id="emptyHistory" class="b3-list-item${window.siyuan.config.readonly ? " fn__none" : ""}">
- <svg class="b3-list-item__graphic"><use xlink:href="#iconHistory"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.dataHistory}</span>
+ <svg class="b3-list-item__graphic"><use xlink:href="#iconHistory"></use></svg><span class="fn__space"></span><span class="b3-list-item__text">${window.siyuan.languages.dataHistory}</span>
</div>
<div id="emptyNewFile" class="b3-list-item${(getOpenNotebookCount() > 0 || !window.siyuan.config.readonly) ? "" : " fn__none"}">
- <svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.newFile}</span>
+ <svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg><span class="fn__space"></span><span class="b3-list-item__text">${window.siyuan.languages.newFile}</span>
</div>
<div class="b3-list-item" id="emptyNewNotebook${window.siyuan.config.readonly ? " fn__none" : ""}">
- <svg class="b3-list-item__graphic"><use xlink:href="#iconFilesRoot"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.newNotebook}</span>
+ <svg class="b3-list-item__graphic"><use xlink:href="#iconFilesRoot"></use></svg><span class="fn__space"></span><span class="b3-list-item__text">${window.siyuan.languages.newNotebook}</span>
</div>
<div class="b3-list-item" id="emptyHelp">
- <svg class="b3-list-item__graphic"><use xlink:href="#iconHelp"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.help}</span>
+ <svg class="b3-list-item__graphic"><use xlink:href="#iconHelp"></use></svg><span class="fn__space"></span><span class="b3-list-item__text">${window.siyuan.languages.help}</span>
</div>`;
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 8e631c9892..94de65d9a3 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 8f125c4c03..10d79a09da 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,
<span class="counter counter--right b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardReviewCard}">${item.dueFlashcardCount}</span>
<span class="counter counter--right b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardCard}">${item.flashcardCount}</span>`;
}
- fileHTML += `<li style="padding: 4px" class="b3-list-item${fileHTML === "" ? " b3-list-item--focus" : ""}" data-path="${item.path}" data-box="${item.box}">
+ fileHTML += `<li class="b3-list-item${fileHTML === "" ? " b3-list-item--focus" : ""}" data-path="${item.path}" data-box="${item.box}">
${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE, "b3-list-item__graphic", true)}
- <span class="b3-list-item__showall">${escapeHtml(item.hPath)}</span>
+ <span class="b3-list-item__showall" style="padding:4px 0">${escapeHtml(item.hPath)}</span>
${countHTML}
</li>`;
});
@@ -503,7 +503,7 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {
}
fileHTML += `<li title="${getDisplayName(item.name, true, true)} ${item.hSize}${item.bookmark ? "\n" + window.siyuan.languages.bookmark + " " + item.bookmark : ""}${item.name1 ? "\n" + window.siyuan.languages.name + " " + item.name1 : ""}${item.alias ? "\n" + window.siyuan.languages.alias + " " + item.alias : ""}${item.memo ? "\n" + window.siyuan.languages.memo + " " + item.memo : ""}${item.subFileCount !== 0 ? window.siyuan.languages.includeSubFile.replace("x", item.subFileCount) : ""}\n${window.siyuan.languages.modifiedAt} ${item.hMtime}\n${window.siyuan.languages.createdAt} ${item.hCtime}"
data-box="${notebookId}" class="b3-list-item" data-path="${item.path}">
- <span style="padding-left: ${(item.path.split("/").length - 2) * 18 + 22}px" class="b3-list-item__toggle b3-list-item__toggle--hl${item.subFileCount === 0 ? " fn__hidden" : ""}">
+ <span style="padding-left: ${item.path.split("/").length * 8}px" class="b3-list-item__toggle b3-list-item__toggle--hl${item.subFileCount === 0 ? " fn__hidden" : ""}">
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
</span>
${unicode2Emoji(item.icon || (item.subFileCount === 0 ? Constants.SIYUAN_IMAGE_FILE : Constants.SIYUAN_IMAGE_FOLDER), "b3-list-item__graphic", true)}