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(web): remove duplicate system info entry
tianma-if1d111e123af0
diff --git a/apps/web/src/components/SettingsPane.tsx b/apps/web/src/components/SettingsPane.tsxindex dbebb8f4..1ed74c63 100644--- a/apps/web/src/components/SettingsPane.tsx+++ b/apps/web/src/components/SettingsPane.tsx@@ -369,25 +369,6 @@ export const SettingsPane = ({</button>);})}- <div className="mt-auto overflow-hidden rounded-xl border border-slate-200 bg-white">- <button- type="button"- onClick={() => setSystemInfoOpen(true)}- className="flex min-h-16 w-full items-center justify-between gap-3 px-3.5 py-2.5 text-left text-slate-600 transition-colors hover:bg-slate-200/50 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/70"- >- <span className="flex min-w-0 items-center gap-2">- <span className="relative flex h-4 w-4 shrink-0 items-center justify-center">- <Info className="h-4 w-4 text-emerald-600" />- {deployedUpdateUnseen ? <span className="absolute -right-0.5 -top-0.5 h-1.5 w-1.5 rounded-full bg-emerald-500 ring-1 ring-white" /> : null}- </span>- <span className="min-w-0">- <span className="block truncate text-sm font-semibold">{t("systemInfo.title")}</span>- <span className="mt-0.5 block truncate text-xs font-normal text-slate-500">{t("systemInfo.description")}</span>- </span>- </span>- <ChevronRight className="h-4 w-4 shrink-0 text-slate-400" />- </button>- </div></aside>{/* 右侧设置内容区 */}diff --git a/apps/web/src/components/SystemInfoAccess.test.mjs b/apps/web/src/components/SystemInfoAccess.test.mjsindex 9dae53df..8f022884 100644--- a/apps/web/src/components/SystemInfoAccess.test.mjs+++ b/apps/web/src/components/SystemInfoAccess.test.mjs@@ -11,10 +11,17 @@ describe("system information access", () => {);});- test("keeps an entry in the desktop settings layout", () => {+ test("does not duplicate the entry in desktop settings", () => {const desktopSettings = settingsPaneSource.match(/桌面端布局:双栏[\s\S]*?移动端布局/)?.[0];- expect(desktopSettings).toContain("setSystemInfoOpen(true)");- expect(desktopSettings).toContain('t("systemInfo.title")');+ expect(desktopSettings).not.toContain("setSystemInfoOpen(true)");+ expect(desktopSettings).not.toContain('t("systemInfo.title")');+ });++ test("keeps the entry in mobile settings", () => {+ const mobileSettings = settingsPaneSource.match(/移动端布局[\s\S]*?<SystemInfoDialog/)?.[0];++ expect(mobileSettings).toContain("setSystemInfoOpen(true)");+ expect(mobileSettings).toContain('t("systemInfo.title")');});});