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

Vanessaee9a02f904cd
diff --git a/app/src/assets/scss/component/_menu.scss b/app/src/assets/scss/component/_menu.scss
index d2f21b97a5..ebf052bff7 100644
--- a/app/src/assets/scss/component/_menu.scss
+++ b/app/src/assets/scss/component/_menu.scss
@@ -50,7 +50,7 @@
.b3-menu {
&__submenu {
top: 48px;
- left: 0;
+ left: 100vw;
bottom: 0;
max-height: none;
right: 0;
@@ -58,6 +58,9 @@
border: 0;
padding: 0;
border-radius: 0;
+ width: 100%;
+ transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;
+ display: block;
& > .b3-menu__item:first-child {
border-top: .5px solid var(--b3-theme-background-light);
@@ -81,8 +84,14 @@
border-top: .5px solid var(--b3-theme-background-light);
}
- &--show > .b3-menu__submenu--row {
- width: 100%;
+ &--show {
+ & > .b3-menu__submenu {
+ transform: translateX(-100vw);
+ }
+
+ & > .b3-menu__submenu--row {
+ width: 100%;
+ }
}
&--readonly {
diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.ts
index 74057e832c..19199cacbd 100644
--- a/app/src/menus/Menu.ts
+++ b/app/src/menus/Menu.ts
@@ -24,7 +24,10 @@ export class Menu {
if (lastShowElements.length > 0) {
lastShowElements[lastShowElements.length - 1].classList.remove("b3-menu__item--show");
} else {
- this.remove();
+ this.element.style.transform = "";
+ setTimeout(() => {
+ this.remove();
+ }, Constants.TIMEOUT_DBLCLICK);
}
return;
}