Skip to content

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

:art: Refine mobile menu sheet presentation https://github.com/siyuan-note/siyuan/issues/14648

Daniel2970a0781556
diff --git a/app/src/assets/scss/component/_menu.scss b/app/src/assets/scss/component/_menu.scss
index 37053ca511..f4b0ef0c33 100644
--- a/app/src/assets/scss/component/_menu.scss
+++ b/app/src/assets/scss/component/_menu.scss
@@ -182,8 +182,8 @@
&--sheet {
top: auto;
bottom: 0;
- left: 8px;
- right: 8px;
+ left: 0;
+ right: 0;
width: auto;
height: auto;
max-height: 90vh;
@@ -259,7 +259,7 @@
transition: opacity 150ms linear;
&--open {
- opacity: .4;
+ opacity: .2;
pointer-events: auto;
}
}
diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.ts
index 7d71d40974..9a3e318ba4 100644
--- a/app/src/menus/Menu.ts
+++ b/app/src/menus/Menu.ts
@@ -237,7 +237,7 @@ export class Menu {
this.element.style.transform = `translateY(${offset}px)`;
const scrimElement = this.getFullscreenScrim();
if (scrimElement) {
- scrimElement.style.opacity = Math.max(0, .4 * (1 - offset / this.element.clientHeight)).toString();
+ scrimElement.style.opacity = Math.max(0, .2 * (1 - offset / this.element.clientHeight)).toString();
}
if (event.cancelable) {
event.preventDefault();
@@ -330,7 +330,7 @@ export class Menu {
private setSheetHeight(position: "bottom" | "all") {
this.updateSheetTitle();
if (position === "bottom") {
- this.element.style.height = "50vh";
+ this.element.style.height = "56vh";
return;
}
let itemsElement = this.element.lastElementChild;
@@ -339,7 +339,7 @@ export class Menu {
itemsElement = shownItems[shownItems.length - 1]
.querySelector(":scope > .b3-menu__submenu > .b3-menu__items") || itemsElement;
}
- const maxHeight = window.innerHeight * .9;
+ const maxHeight = window.innerHeight * .56;
const titleHeight = this.element.firstElementChild.getBoundingClientRect().height;
const contentHeight = itemsElement.scrollHeight;
this.element.style.height = Math.min(maxHeight, Math.max(160, titleHeight + contentHeight)) + "px";