An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/17628
Vanessa3d38aa07b703
diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.tsindex 0f5a23a1fd..03e67fd945 100644--- a/app/src/mobile/dock/MobileFiles.ts+++ b/app/src/mobile/dock/MobileFiles.ts@@ -31,6 +31,7 @@ export class MobileFiles extends Model {startY: number;isDragging: boolean;ghostElement: HTMLElement;+ startTime: number;};constructor(app: App) {@@ -301,18 +302,25 @@ export class MobileFiles extends Model {startX: touch.clientX,startY: touch.clientY,ghostElement: null,+ startTime: Date.now(),};}, {passive: false});filesElement.addEventListener("touchmove", (event: TouchEvent) => {const state = this.touchDragState;+ if (!state) return;const touch = event.touches[0];-if (!state.isDragging) {+ if (Date.now() - state.startTime < 400 &&+ (Math.abs(touch.clientX - state.startX) > 5 || Math.abs(touch.clientY - state.startY) > 5)) {+ this.touchDragState = null;+ return;+ }if (Math.abs(touch.clientX - state.startX) < 5 && Math.abs(touch.clientY - state.startY) < 5) return;state.isDragging = true;const ghostElement = document.createElement("ul");+ ghostElement.id = "dragGhost";ghostElement.append(state.selectedElement.cloneNode(true));ghostElement.setAttribute("style", `background-color: var(--b3-theme-surface);width: 100%;touch-action: none;margin-left: -50%;margin-top:20px;z-index:${window.siyuan.zIndex};position: fixed;top:${touch.clientX}px;left:${touch.clientY}px`);ghostElement.setAttribute("class", "b3-list b3-list--background");@@ -320,6 +328,8 @@ export class MobileFiles extends Model {state.ghostElement = ghostElement;state.selectedElement.style.opacity = "0.38";+ event.preventDefault();+ event.stopPropagation();}if (state.isDragging) {@@ -360,16 +370,14 @@ export class MobileFiles extends Model {!(selectedDataType === "navigation-root" && targetDataType === "navigation-root")) {liElement.classList.add("dragover");}- event.preventDefault();}}, {passive: false});- filesElement.addEventListener("touchend", async (event: TouchEvent) => {+ filesElement.addEventListener("touchend", async () => {const state = this.touchDragState;if (!state) return;state.selectedElement.style.opacity = "";if (state.isDragging) {- event.preventDefault();if (state.ghostElement) {state.ghostElement.remove();}@@ -396,7 +404,7 @@ export class MobileFiles extends Model {if (newElement.getAttribute("data-path").startsWith(dataPath.replace(".sy", ""))) {this.clearDragIndicators();this.touchDragState = null;- return;+ return;}fromPaths.push(dataPath);selectFileElements.push(state.selectedElement);diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.tsindex 526aad14ec..b814361a54 100644--- a/app/src/mobile/util/touch.ts+++ b/app/src/mobile/util/touch.ts@@ -176,7 +176,6 @@ export const handleTouchStart = (event: TouchEvent) => {if ((otherTouchElement && otherTouchElement.parentElement.classList.contains("b3-chips__doctag")) ||target.closest(".protyle-gutters") ||target.closest(".av__gallery") ||- target.closest('[style^="--file-toggle-width"]') ||(target.tagName === "IMG" && target.style.cursor === "move" && target.parentElement.classList.contains("protyle-background__img"))) {clientX = null;clientY = null;@@ -214,6 +213,7 @@ export const handleTouchMove = (event: TouchEvent) => {const target = event.target as HTMLElement;if (!clientX || !clientY ||target.tagName === "AUDIO" ||+ document.getElementById("dragGhost") ||hasClosestByClassName(target, "b3-dialog", true) ||(window.siyuan.mobile.editor && !window.siyuan.mobile.editor.protyle.toolbar.subElement.classList.contains("fn__none")) ||hasClosestByClassName(target, "keyboard") ||