An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle:
Vanessacb7f6f7cb8b9
diff --git a/app/src/boot/globalEvent/event.ts b/app/src/boot/globalEvent/event.tsindex 637cd6fdd9..47a5b442f8 100644--- a/app/src/boot/globalEvent/event.ts+++ b/app/src/boot/globalEvent/event.ts@@ -6,7 +6,7 @@ import {globalClick} from "./click";import {goBack, goForward} from "../../util/backForward";import {Constants} from "../../constants";import {isIPad} from "../../protyle/util/compatibility";-import {globalTouchEnd, globalTouchStart} from "./touch";+import {globalTouchEnd} from "./touch";import {initDockMenu} from "../../menus/dock";import {hasClosestByAttribute, hasClosestByClassName, isInEmbedBlock} from "../../protyle/util/hasClosest";import {initTabMenu} from "../../menus/tab";@@ -147,8 +147,6 @@ export const initWindowEvent = (app: App) => {embedBlockElement.firstElementChild.classList.toggle("protyle-icons--show");return;}- // 触摸屏背景和嵌入块按钮显示- globalTouchStart(event);}, false);document.addEventListener("touchend", (event) => {diff --git a/app/src/boot/globalEvent/touch.ts b/app/src/boot/globalEvent/touch.tsindex a6ddf60885..2d0f5e0f18 100644--- a/app/src/boot/globalEvent/touch.ts+++ b/app/src/boot/globalEvent/touch.ts@@ -17,19 +17,6 @@ import {Tab} from "../../layout/Tab";import {Editor} from "../../editor";import {hideTooltip} from "../../dialog/tooltip";-export const globalTouchStart = (event: TouchEvent) => {- const target = event.target as HTMLElement;- const backgroundElement = hasClosestByClassName(target, "protyle-background");- if (backgroundElement) {- if (backgroundElement.classList.contains("protyle-background--enable")) {- backgroundElement.classList.add("protyle-background--mobileshow");- }- } else {- document.querySelector(".protyle-background--mobileshow")?.classList.remove("protyle-background--mobileshow");- }- return false;-};-export const globalTouchEnd = (event: TouchEvent, yDiff: number, time: number, app: App) => {const target = event.target as HTMLElement;const isIPadBoolean = isIPad();diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.tsindex c97d981c9d..5e2f1d1132 100644--- a/app/src/mobile/util/touch.ts+++ b/app/src/mobile/util/touch.ts@@ -9,7 +9,7 @@ import {popMenu} from "../menu";import {activeBlur} from "./keyboardToolbar";import {isIPhone} from "../../protyle/util/compatibility";import {App} from "../../index";-import {globalTouchEnd, globalTouchStart} from "../../boot/globalEvent/touch";+import {globalTouchEnd} from "../../boot/globalEvent/touch";import {getRangeByPoint} from "../../protyle/util/selection";import {getCurrentEditor} from "../editor";@@ -163,10 +163,6 @@ export const handleTouchStart = (event: TouchEvent) => {return;}- if (globalTouchStart(event)) {- return;- }-if (getSelection().rangeCount > 0 && hasClosestBlock(event.target as Element)) {const editor = getCurrentEditor();if (editor && !editor.protyle.disabled && event.touches[0].clientY > window.innerHeight / 2 &&