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: Keep mobile sidebars below the status bar https://github.com/siyuan-note/siyuan/issues/14542
Daniel01f52ea97199
diff --git a/app/src/assets/scss/main/_mobile.scss b/app/src/assets/scss/main/_mobile.scssindex 5b3aa45c78..dc910ea6e5 100644--- a/app/src/assets/scss/main/_mobile.scss+++ b/app/src/assets/scss/main/_mobile.scss@@ -665,8 +665,6 @@ body.mobile-topbar--merged {.side-panel {position: fixed;- top: 0;- left: 0;background-color: var(--b3-theme-surface);height: 100%;width: 100vw;@@ -687,10 +685,6 @@ body.mobile-topbar--merged {transition: none;}- & > .toolbar {- padding-top: var(--mobile-top-safe-area);- }-// 窄屏下 Dock 图标过多时可横向滚动,关闭按钮固定在工具栏末端始终可触达& > .toolbar--border > .toolbar__scroll {flex: 1;@@ -1024,7 +1018,7 @@ body.mobile-topbar--merged {height: auto;margin: 0;min-height: 44px;- padding: max(8px, var(--mobile-top-safe-area)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));+ padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));position: sticky;top: 0;width: 100%;@@ -1145,18 +1139,6 @@ body.mobile-topbar--merged {top: 0;transform: translateX(100vw);- &:not(.b3-menu--sheet) {- padding-top: var(--mobile-top-safe-area);-- .b3-menu__submenu {- top: calc(48px + var(--mobile-top-safe-area));- }-- .b3-menu__submenu .b3-menu__submenu {- top: var(--mobile-top-safe-area);- }- }-.mobile-main-menu {&__search {background-color: var(--b3-theme-surface);diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.tsindex 332d3e470a..2039da2adb 100644--- a/app/src/mobile/index.ts+++ b/app/src/mobile/index.ts@@ -61,13 +61,6 @@ import {initHarmonyTextSelectionMenu} from "../util/harmonyTextSelectionMenu";import {updateMobileTopBarLayout} from "./util/mobileTopBar";import {showMobileBars} from "./util/mobileBars";-const updateMobileSafeArea = () => {- const statusBarHeight = window.JSAndroid?.getStatusBarHeight?.();- if (typeof statusBarHeight === "number" && Number.isFinite(statusBarHeight) && statusBarHeight >= 0) {- document.body.style.setProperty("--mobile-top-safe-area", `${statusBarHeight}px`);- }-};-class App {public plugins: import("../plugin").Plugin[] = [];public appId: string;@@ -176,7 +169,6 @@ class App {}, false);// 判断手机横竖屏状态window.matchMedia("(orientation:portrait)").addEventListener("change", () => {- updateMobileSafeArea();updateCardHV();updateMobileTopBarLayout();showMobileBars();@@ -188,7 +180,6 @@ class App {window.siyuan.config = confResponse.data.conf;window.siyuan.isPublish = confResponse.data.isPublish;document.body.classList.toggle("body--android", Boolean(isInAndroid()));- updateMobileSafeArea();correctHotkey(siyuanApp);await loadPlugins(this);getLocalStorage(() => {diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex dcd3206da3..e17a673bc0 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -327,7 +327,6 @@ interface Window {showKeyboard(): voidprint(title: string, html: string): voidgetScreenWidthPx(): number- getStatusBarHeight?(): numberexit(): voidsetWebViewFocusable(enable: boolean): voidsendNotification(channel: string, title: string, body: string, delayInSeconds: number): number