AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Fix deployment login and notebook editor issues
yomac358464052c9
diff --git a/.env.example b/.env.exampleindex ceef23fe..a2e9c2fb 100644--- a/.env.example+++ b/.env.example@@ -11,7 +11,7 @@ EDGE_EVER_AUTH_USERNAME=admin# 生成命令:`bun run auth:hash -- <你的密码>`EDGE_EVER_AUTH_PASSWORD_HASH=-# Web session 有效期,单位:天。服务端会限制在 1-1825 天。-EDGE_EVER_SESSION_TTL_DAYS=1825+# Web session 有效期,单位:天。服务端会限制在 1-400 天。+EDGE_EVER_SESSION_TTL_DAYS=400# 本地 CLI / Wrangler 部署所需的 Cloudflare 账号、资源和 Token 模板请看 `.env.local.example`。diff --git a/.env.local.example b/.env.local.exampleindex 5e5950c3..8be721c5 100644--- a/.env.local.example+++ b/.env.local.example@@ -44,8 +44,8 @@ EDGE_EVER_AUTH_USERNAME=admin# 线上部署时建议把对应 hash 配成 Cloudflare Worker Secret。EDGE_EVER_AUTH_PASSWORD_HASH=-# Web session 有效期,单位:天。服务端会限制在 1-1825 天。-EDGE_EVER_SESSION_TTL_DAYS=1825+# Web session 有效期,单位:天。服务端会限制在 1-400 天。+EDGE_EVER_SESSION_TTL_DAYS=400# 可选:公开 demo 模式。只建议 demo.edgeever.org 这类共享演示环境开启。# 开启后,Worker 会在读取笔记本时补齐示例内容,并通过 Cron 定期重置 demo 数据。diff --git a/apps/api/src/index.ts b/apps/api/src/index.tsindex 81dcd8aa..391f98c1 100644--- a/apps/api/src/index.ts+++ b/apps/api/src/index.ts@@ -211,8 +211,8 @@ const PASSWORD_HASH_ITERATIONS = 100_000;const PASSWORD_HASH_BYTES = 32;const PASSWORD_SALT_BYTES = 16;const SESSION_TOKEN_BYTES = 32;-const DEFAULT_SESSION_TTL_DAYS = 5 * 365;-const MAX_SESSION_TTL_DAYS = 5 * 365;+const DEFAULT_SESSION_TTL_DAYS = 400;+const MAX_SESSION_TTL_DAYS = 400;const DEFAULT_R2_BUCKET_NAME = "edgeever-resources";const DEMO_SEED_NOTEBOOKS = [{ id: "nb_inbox", parentId: null, name: "等待分类", slug: "inbox", icon: "notebook", color: "#0f766e", sortOrder: 10 },diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsxindex 1552617e..02461f86 100644--- a/apps/mobile/src/screens/WorkspaceScreen.tsx+++ b/apps/mobile/src/screens/WorkspaceScreen.tsx@@ -2250,6 +2250,11 @@ const NotebookManagerModal = ({});const requestDeleteNotebook = (notebook: Notebook) => {+ if (notebook.id === "nb_inbox" || notebook.slug === "inbox" || notebook.name === "等待分类") {+ Alert.alert("等待分类不能删除", "等待分类是默认笔记本,用来保证新笔记始终有归属。");+ return;+ }+Alert.alert("删除笔记本?", `将删除“${notebook.name}”。如果服务端不允许删除非空笔记本,请先移动或删除其中笔记。`, [{ text: "取消", style: "cancel" },{diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsxindex 746f0fd1..d96846b9 100644--- a/apps/web/src/components/WorkspaceApp.tsx+++ b/apps/web/src/components/WorkspaceApp.tsx@@ -1568,7 +1568,7 @@ export const WorkspaceApp = ({};const handleDeleteNotebook = (notebook: Notebook) => {- if (notebook.slug === "inbox") {+ if (notebook.id === "nb_inbox" || notebook.slug === "inbox" || notebook.name === "等待分类") {setAppNoticeDialog({title: t("workspace.inboxDeleteTitle"),description: t("workspace.inboxDeleteDescription"),diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.cssindex 226d6823..af8e594d 100644--- a/apps/web/src/styles/globals.css+++ b/apps/web/src/styles/globals.css@@ -141,6 +141,14 @@ textarea {margin: 0 0 1rem;}+.ProseMirror ul {+ list-style-type: disc;+}++.ProseMirror ol {+ list-style-type: decimal;+}+.ProseMirror li {margin: 0.25rem 0;}diff --git a/apps/web/src/styles/mobile-markdown-editor.css b/apps/web/src/styles/mobile-markdown-editor.cssindex 6a81bc19..eac9bdc6 100644--- a/apps/web/src/styles/mobile-markdown-editor.css+++ b/apps/web/src/styles/mobile-markdown-editor.css@@ -363,6 +363,14 @@ input {padding-left: 1.4em;}+.edgeever-mobile-tiptap-content ul {+ list-style-type: disc;+}++.edgeever-mobile-tiptap-content ol {+ list-style-type: decimal;+}+.edgeever-mobile-tiptap-content blockquote {border-left: 3px solid #cbd5e1;color: #475569;diff --git a/scripts/run-wrangler.mjs b/scripts/run-wrangler.mjsindex 3275c241..df2ef107 100644--- a/scripts/run-wrangler.mjs+++ b/scripts/run-wrangler.mjs@@ -210,6 +210,26 @@ const result = spawnSync(executable, ["--config", configPath, ...finalWranglerArshell: process.platform === "win32",});+if (result.status === 0 && isDeployCommand && authPasswordHash) {+ const secretResult = spawnSync(+ executable,+ ["--config", configPath, "secret", "put", "EDGE_EVER_AUTH_PASSWORD_HASH"],+ {+ input: authPasswordHash,+ stdio: ["pipe", "inherit", "inherit"],+ shell: process.platform === "win32",+ },+ );++ if (secretResult.error) {+ throw secretResult.error;+ }++ if (secretResult.status !== 0) {+ process.exit(secretResult.status ?? 1);+ }+}+if (result.error) {console.error(result.error.message);process.exit(1);