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

Vanessa9b46324d26f0
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss
index 6838ebb8c8..1874f249ee 100644
--- a/app/src/assets/scss/business/_av.scss
+++ b/app/src/assets/scss/business/_av.scss
@@ -10,6 +10,13 @@
opacity: 1;
}
+ &--touch {
+ .av__views .block__icon,
+ .av__row--footer .av__calc {
+ opacity: 1;
+ }
+ }
+
&__cursor {
width: .1px;
height: 0;
diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss
index 3d72507f56..7e3c5b12a1 100644
--- a/app/src/assets/scss/mobile.scss
+++ b/app/src/assets/scss/mobile.scss
@@ -516,11 +516,6 @@
}
}
-.av__views .block__icon,
-.av__row--footer .av__calc {
- opacity: 1;
-}
-
.b3-dialog__container {
max-width: 100vw;
}
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index 0617dc39f0..b7acda36a7 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -12,6 +12,8 @@ import {showMessage} from "../../../dialog/message";
import {addClearButton} from "../../../util/addClearButton";
import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../util/escape";
import {electronUndo} from "../../undo";
+import {isInAndroid, isInHarmony, isInIOS} from "../../util/compatibility";
+import {isMobile} from "../../../util/functions";
export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, viewID?: string, renderAll = true) => {
let avElements: Element[] = [];
@@ -29,6 +31,9 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
if (e.getAttribute("data-render") === "true") {
return;
}
+ if (isMobile() || isInIOS() || isInAndroid() || isInHarmony()) {
+ e.classList.add("av--touch");
+ }
const alignSelf = e.style.alignSelf;
if (e.firstElementChild.innerHTML === "") {
e.style.alignSelf = "";