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/14475

Vanessa378b552069fa
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index c0234e50c4..f995b9053e 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -416,7 +416,7 @@ export const showPopover = async (app: App, showRef = false) => {
}
});
if (!hasPin && popoverTargetElement.parentElement &&
- popoverTargetElement.parentElement.style.opacity !== "0.1" // 反向面板图标拖拽时不应该弹层
+ popoverTargetElement.parentElement.style.opacity !== "0.38" // 反向面板图标拖拽时不应该弹层
) {
window.siyuan.blockPanels.push(new BlockPanel({
app,
diff --git a/app/src/layout/Tab.ts b/app/src/layout/Tab.ts
index e147a8c08b..237fb0a91a 100644
--- a/app/src/layout/Tab.ts
+++ b/app/src/layout/Tab.ts
@@ -50,7 +50,7 @@ export class Tab {
event.stopPropagation();
event.preventDefault();
const dragElement = Array.from(this.headElement.parentElement.childNodes).find((item: HTMLElement) => {
- if (item.style?.opacity === "0.1") {
+ if (item.style?.opacity === "0.38") {
return true;
}
});
@@ -96,7 +96,7 @@ export class Tab {
layoutToJSON(this, modeJSON);
event.dataTransfer.setData(Constants.SIYUAN_DROP_TAB, JSON.stringify(modeJSON));
event.dataTransfer.dropEffect = "move";
- tabElement.style.opacity = "0.1";
+ tabElement.style.opacity = "0.38";
window.siyuan.dragElement = this.headElement;
}
});
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index fac56a54cf..1e0934553f 100644
--- a/app/src/layout/Wnd.ts
+++ b/app/src/layout/Wnd.ts
@@ -191,7 +191,7 @@ export class Wnd {
let oldTabHeaderElement = window.siyuan.dragElement;
let exitDrag = false;
Array.from(it.firstElementChild.childNodes).find((item: HTMLElement) => {
- if (item.style?.opacity === "0.1") {
+ if (item.style?.opacity === "0.38") {
oldTabHeaderElement = item;
exitDrag = true;
return true;
@@ -207,7 +207,7 @@ export class Wnd {
return;
} else if (!exitDrag && !oldTabHeaderElement) { // 拖拽到新窗口
oldTabHeaderElement = document.createElement("li");
- oldTabHeaderElement.style.opacity = "0.1";
+ oldTabHeaderElement.style.opacity = "0.38";
oldTabHeaderElement.innerHTML = '<svg class="svg"><use xlink:href="#iconFile"></use></svg>';
oldTabHeaderElement.setAttribute("data-clone", "true");
it.firstElementChild.append(oldTabHeaderElement);
@@ -274,7 +274,7 @@ export class Wnd {
}
const nextTabHeaderElement = (Array.from(it.firstElementChild.childNodes).find((item: HTMLElement) => {
- if (item.style?.opacity === "0.1") {
+ if (item.style?.opacity === "0.38") {
return true;
}
}) as HTMLElement)?.nextElementSibling;
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 170ae39ee9..894e775d60 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -435,7 +435,7 @@ export class Files extends Model {
const ghostElement = document.createElement("ul");
selectElements.forEach((item: HTMLElement, index) => {
ghostElement.append(item.cloneNode(true));
- item.style.opacity = "0.1";
+ item.style.opacity = "0.38";
const itemNodeId = item.dataset.nodeId ||
item.dataset.path; // 拖拽笔记本时值不能为空,否则 drop 就不会继续排序
if (itemNodeId) {
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index 94f2c10df1..145524e4a6 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -842,7 +842,7 @@ export const addResize = (obj: Layout | Wnd) => {
documentSelf.ondragstart = () => {
// 文件树拖拽会产生透明效果
document.querySelectorAll(".sy__file .b3-list-item").forEach((item: HTMLElement) => {
- if (item.style.opacity === "0.1") {
+ if (item.style.opacity === "0.38") {
item.style.opacity = "";
}
});
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index d890c4a95e..c0cc9b6704 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -150,7 +150,7 @@ export class Gutter {
setTimeout(() => {
ghostElement.remove();
});
- buttonElement.style.opacity = "0.1";
+ buttonElement.style.opacity = "0.38";
window.siyuan.dragElement = avElement as HTMLElement || protyle.wysiwyg.element;
event.dataTransfer.setData(`${Constants.SIYUAN_DROP_GUTTER}${buttonElement.getAttribute("data-type")}${Constants.ZWSP}${buttonElement.getAttribute("data-subtype")}${Constants.ZWSP}${selectIds}${Constants.ZWSP}${window.siyuan.config.system.workspaceDir}`,
protyle.wysiwyg.element.innerHTML);
diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts
index fe23f67fab..50dead316a 100644
--- a/app/src/protyle/render/av/blockAttr.ts
+++ b/app/src/protyle/render/av/blockAttr.ts
@@ -218,7 +218,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
element.addEventListener("dragstart", (event: DragEvent) => {
const target = event.target as HTMLElement;
window.siyuan.dragElement = target.parentElement;
- window.siyuan.dragElement.style.opacity = ".1";
+ window.siyuan.dragElement.style.opacity = ".38";
dragBlockElement = hasClosestBlock(window.siyuan.dragElement) as HTMLElement;
const ghostElement = document.createElement("div");
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts
index 3dd79aed99..446f2dec71 100644
--- a/app/src/protyle/render/av/openMenuPanel.ts
+++ b/app/src/protyle/render/av/openMenuPanel.ts
@@ -179,7 +179,7 @@ export const openMenuPanel = (options: {
}
avPanelElement.addEventListener("dragstart", (event: DragEvent) => {
window.siyuan.dragElement = event.target as HTMLElement;
- window.siyuan.dragElement.style.opacity = ".1";
+ window.siyuan.dragElement.style.opacity = ".38";
return;
});
avPanelElement.addEventListener("drop", (event) => {
diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts
index 6d2509d4fa..6c2715ed0b 100644
--- a/app/src/util/Tree.ts
+++ b/app/src/util/Tree.ts
@@ -258,7 +258,7 @@ data-def-path="${item.defPath}">
if (liElement) {
event.dataTransfer.setData("text/html", liElement.outerHTML);
// 设置了的话 drop 就无法监听 alt event.dataTransfer.dropEffect = "move";
- liElement.style.opacity = "0.1";
+ liElement.style.opacity = "0.38";
window.siyuan.dragElement = liElement;
}
});