Skip to content

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

:iphone: https://github.com/siyuan-note/siyuan/issues/2621

Vanessaa314c5a947e0
diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts
index d7954e89ab..e0564f91c3 100644
--- a/app/src/mobile/index.ts
+++ b/app/src/mobile/index.ts
@@ -15,7 +15,7 @@ import {promiseTransactions} from "../protyle/wysiwyg/transaction";
import {bootSync} from "../dialog/processSystem";
import {initMessage} from "../dialog/message";
import {goBack} from "./util/MobileBackFoward";
-import {showKeyboardToolbar} from "./util/showKeyboardToolbar";
+import {hideKeyboardToolbar, showKeyboardToolbar} from "./util/showKeyboardToolbar";
class App {
constructor() {
@@ -78,3 +78,4 @@ new App();
window.goBack = goBack;
window.showKeyboardToolbar = showKeyboardToolbar;
+window.hideKeyboardToolbar = hideKeyboardToolbar;
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index bef39f8885..e376675fc9 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -16,9 +16,11 @@ import {hasTopClosestByTag} from "../../protyle/util/hasClosest";
import {MobileBacklinks} from "./MobileBacklinks";
import {MobileBookmarks} from "./MobileBookmarks";
import {MobileTags} from "./MobileTags";
+import {initKeyboardToolbar} from "./showKeyboardToolbar";
export const initFramework = () => {
setInlineStyle();
+ initKeyboardToolbar();
const scrimElement = document.querySelector(".scrim");
const sidebarElement = document.getElementById("sidebar");
let outline: MobileOutline;
diff --git a/app/src/mobile/util/showKeyboardToolbar.ts b/app/src/mobile/util/showKeyboardToolbar.ts
index d4843e29d0..18da2281d0 100644
--- a/app/src/mobile/util/showKeyboardToolbar.ts
+++ b/app/src/mobile/util/showKeyboardToolbar.ts
@@ -3,3 +3,12 @@ export const showKeyboardToolbar = (bottom = 0) => {
toolbarElement.classList.remove("fn__none");
toolbarElement.style.bottom = bottom + "px";
}
+
+export const hideKeyboardToolbar = () => {
+ const toolbarElement = document.getElementById("keyboardToolbar");
+ toolbarElement.classList.add("fn__none");
+}
+
+export const initKeyboardToolbar = () => {
+ const toolbarElement = document.getElementById("keyboardToolbar");
+}
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 82fa3afbf1..8aae8f7c92 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -37,7 +37,10 @@ interface Window {
}
goBack(): void
+
showKeyboardToolbar(bottom?: number): void
+
+ hideKeyboardToolbar(): void
}
interface ITextOption {