Skip to content

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

:art: Block icons support quickly inserting blocks above or below https://github.com/siyuan-note/siyuan/issues/17900

Danielb76d99fde321
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 98a377ddd3..b324c8eb6f 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -587,7 +587,7 @@ export class Gutter {
const centerY = iconRect.top + iconRect.height / 2;
const lineH = 12;
const top = centerY - lineH / 2;
- const plusSize = 20;
+ const plusSize = 16;
lineBefore.style.display = "";
lineBefore.style.width = "2px";
lineBefore.style.height = `${lineH}px`;
@@ -612,7 +612,7 @@ export class Gutter {
// 横排:框线贴块标上下边缘,+号定位在外偏位置
const lineW = 10;
const left = rect.left + (rect.width - lineW) / 2;
- const plusSize = 20;
+ const plusSize = 16;
const plusLeft = rect.left + (rect.width - plusSize) / 2;
lineBefore.style.display = "";
lineBefore.style.width = `${lineW}px`;
@@ -2936,6 +2936,6 @@ data-type="fold" style="cursor:inherit;"><svg style="width: 10px;${fold && fold
// 追加块标边缘悬浮触发的插入元素(默认隐藏,悬浮块标显示线条,悬浮线条变+号),由 mousemove 定位
// 追加块标边缘的框线(悬浮块标显示)与+号(悬浮框线显示),默认隐藏,由 mousemove 定位
// 双元素:框线贴块标边缘不移动(避免闪烁),+号独立定位在外偏位置,tooltip 基于+号元素对齐
- this.element.insertAdjacentHTML("beforeend", `<button class="protyle-gutters__line" data-type="gutterLineBefore" style="display:none"></button><button class="protyle-gutters__line" data-type="gutterLineAfter" style="display:none"></button><button class="protyle-gutters__plus ariaLabel" data-type="gutterPlusBefore" data-position="6west" aria-label="${window.siyuan.languages.insertBefore}" style="display:none"><svg><use xlink:href="#iconAdd"></use></svg></button><button class="protyle-gutters__plus ariaLabel" data-type="gutterPlusAfter" data-position="6west" aria-label="${window.siyuan.languages.insertAfter}" style="display:none"><svg><use xlink:href="#iconAdd"></use></svg></button>`);
+ this.element.insertAdjacentHTML("beforeend", `<button class="protyle-gutters__line" data-type="gutterLineBefore" style="display:none"></button><button class="protyle-gutters__line" data-type="gutterLineAfter" style="display:none"></button><button class="protyle-gutters__plus ariaLabel" data-type="gutterPlusBefore" data-position="west" aria-label="${window.siyuan.languages.insertBefore}" style="display:none"><svg><use xlink:href="#iconAdd"></use></svg></button><button class="protyle-gutters__plus ariaLabel" data-type="gutterPlusAfter" data-position="west" aria-label="${window.siyuan.languages.insertAfter}" style="display:none"><svg><use xlink:href="#iconAdd"></use></svg></button>`);
}
}