Skip to content

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

:sparkles: Add new encrypted notebook entry to mobile menu #18034

Danielcfba3922cc6c
diff --git a/app/src/mobile/menu/index.ts b/app/src/mobile/menu/index.ts
index 0caac93859..79833eb623 100644
--- a/app/src/mobile/menu/index.ts
+++ b/app/src/mobile/menu/index.ts
@@ -1,6 +1,6 @@
import {popSearch} from "./search";
import {closePanel} from "../util/closePanel";
-import {mountHelp, newDailyNote, newNotebook} from "../../util/mount";
+import {mountHelp, newDailyNote, newEncryptedNotebook, newNotebook} from "../../util/mount";
import {exitSiYuan, lockScreen, processSync} from "../../dialog/processSystem";
import {openHistory} from "../../history/history";
import {syncGuide} from "../../sync/syncGuide";
@@ -66,6 +66,9 @@ export const initRightMenu = (app: App) => {
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuNewNotebook">
<svg class="b3-menu__icon"><use xlink:href="#iconNewNoteBook"></use></svg><span class="b3-menu__label">${window.siyuan.languages.newNotebook}</span>
</div>
+ <div class="b3-menu__item${(window.siyuan.config.readonly || !window.siyuan.config.notebookCrypto?.enabled) ? " fn__none" : ""}" id="menuNewEncryptedNotebook">
+ <svg class="b3-menu__icon"><use xlink:href="#iconLock"></use></svg><span class="b3-menu__label">${window.siyuan.languages.newEncryptedNotebook}</span>
+ </div>
<div class="b3-menu__separator"></div>
<div id="menuNewDaily" class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}">
<svg class="b3-menu__icon"><use xlink:href="#iconCalendar"></use></svg><span class="b3-menu__label">${window.siyuan.languages.dailyNote}</span>
@@ -144,6 +147,12 @@ export const initRightMenu = (app: App) => {
event.preventDefault();
event.stopPropagation();
break;
+ } else if (target.id === "menuNewEncryptedNotebook") {
+ newEncryptedNotebook();
+ closePanel();
+ event.preventDefault();
+ event.stopPropagation();
+ break;
} else if (target.id === "menuNewDaily") {
newDailyNote(app);
closePanel();