Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

Open Evernote guide in separate route tab

tianma7196c2cf1ea8
diff --git a/apps/web/src/app/App.tsx b/apps/web/src/app/App.tsx
index e9986007..84f788c4 100644
--- a/apps/web/src/app/App.tsx
+++ b/apps/web/src/app/App.tsx
@@ -2,6 +2,7 @@ import { lazy, Suspense, useEffect } from "react";
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import { Navigate, Route, Routes, useNavigate } from "react-router";
import { api } from "@/lib/api";
+import { EVERNOTE_MIGRATION_PATH } from "@/lib/routes";
import type { AuthSession } from "@edgeever/shared";
const EvernoteImportGuidePane = lazy(() =>
@@ -111,7 +112,7 @@ const AuthenticatedWorkspace = () => {
export const App = () => (
<Routes>
- <Route path="/evernote-migration" element={<EvernoteMigrationRoute />} />
+ <Route path={EVERNOTE_MIGRATION_PATH} element={<EvernoteMigrationRoute />} />
<Route path="/" element={<AuthenticatedWorkspace />} />
<Route path="/settings" element={<AuthenticatedWorkspace />} />
<Route path="*" element={<Navigate to="/" replace />} />
diff --git a/apps/web/src/components/SettingsPane.tsx b/apps/web/src/components/SettingsPane.tsx
index 8993b880..9618e0d5 100644
--- a/apps/web/src/components/SettingsPane.tsx
+++ b/apps/web/src/components/SettingsPane.tsx
@@ -9,6 +9,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from
import { Input } from "@/components/ui/input";
import { Switch } from "@/components/ui/switch";
import { api } from "@/lib/api";
+import { EVERNOTE_MIGRATION_PATH } from "@/lib/routes";
import { cn, formatDateTime } from "@/lib/utils";
import { AppConfirmDialog } from "./dialogs/ConfirmDialogs";
@@ -135,7 +136,16 @@ const EvernoteImportGuideCard = () => (
<UploadCloud className="h-4 w-4 text-emerald-700" />
导入印象笔记
<Button size="sm" variant="outline" className="h-7 bg-white px-2.5 text-xs" type="button" asChild>
- <a href="/evernote-migration" target="_blank" rel="noreferrer">
+ <a
+ href={EVERNOTE_MIGRATION_PATH}
+ target="_blank"
+ rel="noopener noreferrer"
+ aria-label="在新标签页打开印象笔记迁移操作指引"
+ onClick={(event) => {
+ event.preventDefault();
+ window.open(EVERNOTE_MIGRATION_PATH, "_blank", "noopener,noreferrer");
+ }}
+ >
<HelpCircle className="h-3.5 w-3.5" />
操作指引
</a>
diff --git a/apps/web/src/lib/routes.ts b/apps/web/src/lib/routes.ts
new file mode 100644
index 00000000..246c298b
--- /dev/null
+++ b/apps/web/src/lib/routes.ts
@@ -0,0 +1 @@
+export const EVERNOTE_MIGRATION_PATH = "/evernote-migration";