Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/7976

Vanessa668230b86f1a
diff --git a/app/src/assets/scss/component/_menu.scss b/app/src/assets/scss/component/_menu.scss
index 9b787fe43a..1b0b7c93af 100644
--- a/app/src/assets/scss/component/_menu.scss
+++ b/app/src/assets/scss/component/_menu.scss
@@ -129,7 +129,7 @@
}
&__label {
- font-size: 17px;
+ font-size: 18px;
white-space: break-spaces;
line-height: 26px;
margin: 8px 0;
@@ -138,8 +138,8 @@
}
&__icon {
- height: 17px;
- width: 17px;
+ height: 22px;
+ width: 22px;
margin: 0 16px 0 8px;
&--arrow {
diff --git a/app/src/assets/scss/main/_mobile.scss b/app/src/assets/scss/main/_mobile.scss
index 2870fff458..72e99afbca 100644
--- a/app/src/assets/scss/main/_mobile.scss
+++ b/app/src/assets/scss/main/_mobile.scss
@@ -43,29 +43,29 @@
}
&__graphic {
- width: 18px;
- height: 18px;
- line-height: 18px;
- font-size: 18px;
+ width: 20apx;
+ height: 20px;
+ line-height: 20px;
+ font-size: 20px;
}
&__toggle {
height: 32px;
- padding: 4px;
+ padding: 4px 4px 4px 0;
}
&__arrow {
- height: 12px;
- width: 12px;
+ height: 16px;
+ width: 16px;
}
&__action {
- padding: 8px;
- height: 16px;
+ padding: 6px;
+ height: 20px;
svg {
- width: 16px;
- height: 16px;
+ width: 20px;
+ height: 20px;
}
}
}
@@ -104,11 +104,11 @@
}
&__icon {
- height: 16px;
- width: 16px;
+ height: 20px;
+ width: 20px;
padding: 10px;
flex-shrink: 0;
- margin: 6px 4px;
+ margin: 4px;
color: var(--b3-theme-on-surface);
border-radius: var(--b3-border-radius);
@@ -339,10 +339,10 @@
}
svg {
- height: 16px;
- width: 16px;
+ height: 20px;
+ width: 20px;
float: left;
- padding: 13px 9px;
+ padding: 11px 7px;
margin: 3px;
border-radius: var(--b3-border-radius);
diff --git a/app/src/layout/dock/Inbox.ts b/app/src/layout/dock/Inbox.ts
index 992b5f0fa8..af20c61f25 100644
--- a/app/src/layout/dock/Inbox.ts
+++ b/app/src/layout/dock/Inbox.ts
@@ -39,7 +39,6 @@ export class Inbox extends Model {
<span class="fn__space"></span>
<span class="inboxSelectCount ft__smaller ft__on-surface"></span>
</div>
- <span class="fn__flex-1"></span>
<span class="fn__space"></span>
<svg data-type="selectall" class="toolbar__icon"><use xlink:href="#iconUncheck"></use></svg>
<svg data-type="previous" disabled="disabled" class="toolbar__icon"><use xlink:href='#iconLeft'></use></svg>
diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts
index bcd62b07c7..7479f8fae4 100644
--- a/app/src/mobile/dock/MobileFiles.ts
+++ b/app/src/mobile/dock/MobileFiles.ts
@@ -93,7 +93,7 @@ export class MobileFiles extends Model {
filesElement.innerHTML = `<div class="toolbar toolbar--border toolbar--dark">
<div class="fn__space"></div>
<div class="toolbar__text">${window.siyuan.languages.fileTree}</div>
- <div class="fn__flex-1 fn__space"></div>
+ <div class="fn__space"></div>
<svg data-type="newNotebook" class="toolbar__icon"><use xlink:href="#iconFilesRoot"></use></svg>
<svg data-type="refresh" class="toolbar__icon"><use xlink:href="#iconRefresh"></use></svg>
<svg data-type="focus" class="toolbar__icon"><use xlink:href="#iconFocus"></use></svg>
diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts
index 38fea2e67e..24acbcd005 100644
--- a/app/src/mobile/dock/MobileOutline.ts
+++ b/app/src/mobile/dock/MobileOutline.ts
@@ -50,7 +50,7 @@ export class MobileOutline extends Model {
<div class="toolbar__text">
${window.siyuan.languages.outline}
</div>
- <div class="fn__flex-1 fn__space"></div>
+ <div class="fn__space"></div>
<input class="b3-text-field search__label fn__none fn__size200" placeholder="${window.siyuan.languages.filterKeywordEnter}" />
<svg data-type="search" class="toolbar__icon"><use xlink:href='#iconFilter'></use></svg>
<svg data-type="keepCurrentExpand" class="toolbar__icon${window.siyuan.storage[Constants.LOCAL_OUTLINE].keepCurrentExpand ? " toolbar__icon--active" : ""}"><use xlink:href="#iconFocus"></use></svg>
diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts
index bbe7811d02..02b4ad0d72 100644
--- a/app/src/util/Tree.ts
+++ b/app/src/util/Tree.ts
@@ -55,6 +55,7 @@ export class Tree {
}
private genHTML(data: (IBlockTree & { folded?: boolean })[]) {
+ const isM = isMobile();
let html = `<ul${data[0].depth === 0 ? " class='b3-list b3-list--background'" : ""}>`;
data.forEach((item) => {
let titleTip = "";
@@ -68,7 +69,7 @@ export class Tree {
iconHTML = `<svg class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${getIconByType(item.nodeType, item.subType)}"></use></svg>`;
} else if (item.type === "outline") {
titleTip = ` aria-label="${escapeAriaLabel(Lute.BlockDOM2Content(item.name))}"`;
- iconHTML = `<svg class="b3-list-item__graphic popover__block" data-id="${item.id}" style="height: 22px;width: 16px;"><use xlink:href="#${getIconByType(item.nodeType, item.subType)}"></use></svg>`;
+ iconHTML = `<svg class="b3-list-item__graphic popover__block" data-id="${item.id}" style="height: 22px;width: ${isM ? 20 : 16}px;"><use xlink:href="#${getIconByType(item.nodeType, item.subType)}"></use></svg>`;
}
let countHTML = "";
if (item.count) {
@@ -76,16 +77,16 @@ export class Tree {
}
const hasChild = (item.children && item.children.length > 0) || (item.blocks && item.blocks.length > 0);
let style = "";
- if (isMobile()) {
+ if (isM) {
if (item.depth > 0) {
style = `padding-left: ${(item.depth - 1) * 20 + 24}px`;
}
} else {
style = `padding-left: ${(item.depth * 18) || 4}px;margin-right: 2px`;
}
- const showArrow = hasChild || (item.type === "backlink" && !isMobile());
+ const showArrow = hasChild || (item.type === "backlink" && !isM);
// data-id 需要添加 item.id,否则大纲更新时 name 不一致导致 https://github.com/siyuan-note/siyuan/issues/11843
- html += `<li class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
+ html += `<li class="b3-list-item${isM ? "" : " b3-list-item--hide-action"}"
${item.id ? 'data-node-id="' + item.id + '"' : ""}
${item.box ? 'data-notebook-id="' + item.box + '"' : ""}
style="--file-toggle-width:${item.depth === 0 ? 22 : ((item.depth + 1) * 18)}px"
@@ -112,6 +113,7 @@ ${item.label !== undefined && item.label !== null ? `data-label='${item.label}'`
}
private genBlockHTML(data: IBlock[], show = false, type: string) {
+ const isM = isMobile();
let html = `<ul class="${!show ? "fn__none" : ""}">`;
data.forEach((item: IBlock & {
subType: string;
@@ -127,7 +129,7 @@ ${item.label !== undefined && item.label !== null ? `data-label='${item.label}'`
}
let iconHTML;
if (type === "outline") {
- iconHTML = `<svg data-showref="true" class="b3-list-item__graphic popover__block" data-id="${item.id}" style="height: 22px;width: 16px;"><use xlink:href="#${getIconByType(item.type, item.subType)}"></use></svg>`;
+ iconHTML = `<svg data-showref="true" class="b3-list-item__graphic popover__block" data-id="${item.id}" style="height: 22px;width: ${isM?20:16}px;"><use xlink:href="#${getIconByType(item.type, item.subType)}"></use></svg>`;
} else {
if (item.type === "NodeDocument") {
iconHTML = `<span data-showref="true" class="b3-list-item__graphic popover__block" data-id="${item.id}">${unicode2Emoji(item.ial.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}</span>`;
@@ -136,14 +138,14 @@ ${item.label !== undefined && item.label !== null ? `data-label='${item.label}'`
}
}
let style = "";
- if (isMobile()) {
+ if (isM) {
if (item.depth > 0) {
style = `padding-left: ${(item.depth - 1) * 20 + 24}px`;
}
} else {
style = `padding-left: ${item.depth * 18 || 4}px;margin-right: 2px`;
}
- html += `<li class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
+ html += `<li class="b3-list-item${isM ? "" : " b3-list-item--hide-action"}"
style="--file-toggle-width:${item.depth === 0 ? 22 : ((item.depth + 1) * 18)}px"
data-node-id="${item.id}"
data-ref-text="${encodeURIComponent(item.refText)}"