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
feat(mobile): align app with PWA mobile experience
tianma-if354eaed1e4a5
diff --git a/apps/mobile/app.json b/apps/mobile/app.jsonindex 7ab091f2..8033d4e6 100644--- a/apps/mobile/app.json+++ b/apps/mobile/app.json@@ -27,6 +27,7 @@{"android": {"compileSdkVersion": 36,+ "usesCleartextTraffic": true,"targetSdkVersion": 36,"enableMinifyInReleaseBuilds": true,"enableShrinkResourcesInReleaseBuilds": truediff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsxindex a6111b8d..5b5965b3 100644--- a/apps/mobile/app/_layout.tsx+++ b/apps/mobile/app/_layout.tsx@@ -7,10 +7,12 @@ import { PersistQueryClientProvider } from "@tanstack/react-query-persist-clientimport { Stack } from "expo-router";import { StatusBar } from "expo-status-bar";import * as SplashScreen from "expo-splash-screen";-import { useState } from "react";+import { useState, type ReactNode } from "react";import { GestureHandlerRootView } from "react-native-gesture-handler";import { SafeAreaProvider } from "react-native-safe-area-context";import { SessionProvider } from "../src/lib/session";+import { MobileThemeProvider, useMobileTheme } from "../src/lib/mobile-theme";+import { MobileLocaleProvider } from "../src/lib/mobile-locale";void SplashScreen.preventAutoHideAsync();@@ -64,29 +66,44 @@ export default function RootLayout() {return (<GestureHandlerRootView style={{ flex: 1 }}>- <SafeAreaProvider>- <PersistQueryClientProvider- client={queryClient}- persistOptions={{- buster: "native-cache-v1",- dehydrateOptions: {- shouldDehydrateQuery: (query) => {- const section = query.queryKey[1];- const isOfflineReadableData = section === "notebooks" || section === "memos" || section === "memo";+ <MobileThemeProvider>+ <MobileLocaleProvider>+ <ThemedApp>+ <SafeAreaProvider>+ <PersistQueryClientProvider+ client={queryClient}+ persistOptions={{+ buster: "native-cache-v1",+ dehydrateOptions: {+ shouldDehydrateQuery: (query) => {+ const section = query.queryKey[1];+ const isOfflineReadableData = section === "notebooks" || section === "memos" || section === "memo";- return query.state.status === "success" && isOfflineReadableData;- },- },- maxAge: MOBILE_CACHE_MAX_AGE,- persister,- }}- >- <SessionProvider>- <Stack screenOptions={{ headerShown: false }} />- <StatusBar style="dark" />- </SessionProvider>- </PersistQueryClientProvider>- </SafeAreaProvider>+ return query.state.status === "success" && isOfflineReadableData;+ },+ },+ maxAge: MOBILE_CACHE_MAX_AGE,+ persister,+ }}+ >+ <SessionProvider>+ <Stack screenOptions={{ headerShown: false }} />+ </SessionProvider>+ </PersistQueryClientProvider>+ </SafeAreaProvider>+ </ThemedApp>+ </MobileLocaleProvider>+ </MobileThemeProvider></GestureHandlerRootView>);}++const ThemedApp = ({ children }: { children: ReactNode }) => {+ const { resolvedTheme } = useMobileTheme();+ return (+ <>+ {children}+ <StatusBar style={resolvedTheme === "dark" ? "light" : "dark"} />+ </>+ );+};diff --git a/apps/mobile/app/index.tsx b/apps/mobile/app/index.tsxindex a84e8396..73eb2056 100644--- a/apps/mobile/app/index.tsx+++ b/apps/mobile/app/index.tsx@@ -1,10 +1,12 @@import * as SplashScreen from "expo-splash-screen";import { useIsRestoring } from "@tanstack/react-query";import { lazy, Suspense, useEffect } from "react";-import { ActivityIndicator, StyleSheet, Text, View } from "react-native";+import { ActivityIndicator, StyleSheet, View } from "react-native";+import { Text } from "../src/components/LocalizedText";import { LoginScreen } from "../src/screens/LoginScreen";import { useSession } from "../src/lib/session";import { markStartup } from "../src/lib/startup-performance";+import { resolveMobileThemeStyles, useMobileTheme } from "../src/lib/mobile-theme";const WorkspaceScreen = lazy(() =>import("../src/screens/WorkspaceScreen").then((module) => ({ default: module.WorkspaceScreen }))@@ -34,12 +36,16 @@ export default function IndexScreen() {);}-const StartupPlaceholder = ({ showBrand = false }: { showBrand?: boolean }) => (- <View style={styles.loading}>- {showBrand ? <Text style={styles.brand}>EdgeEver</Text> : null}- <ActivityIndicator color="#15803d" />- </View>-);+const StartupPlaceholder = ({ showBrand = false }: { showBrand?: boolean }) => {+ const { resolvedTheme } = useMobileTheme();+ const themedStyles = resolveMobileThemeStyles(styles, resolvedTheme);+ return (+ <View style={themedStyles.loading}>+ {showBrand ? <Text style={themedStyles.brand}>EdgeEver</Text> : null}+ <ActivityIndicator color="#15803d" />+ </View>+ );+};const styles = StyleSheet.create({loading: {diff --git a/apps/mobile/src/components/LocalTiptapEditor.tsx b/apps/mobile/src/components/LocalTiptapEditor.tsxindex e0520cd1..868d300f 100644--- a/apps/mobile/src/components/LocalTiptapEditor.tsx+++ b/apps/mobile/src/components/LocalTiptapEditor.tsx@@ -28,6 +28,8 @@ type LocalTiptapEditorProps = {onPickImage: () => Promise<PickedImage | null>;onReady: (startupMs: number) => Promise<void>;ref: Ref<LocalTiptapEditorRef>;+ locale: "zh-CN" | "en-US";+ theme: "light" | "dark";};const CHANGE_IDLE_MS = 500;@@ -51,7 +53,7 @@ export default function LocalTiptapEditor(props: LocalTiptapEditorProps) {inline: false,}),Placeholder.configure({- placeholder: "开始记录...",+ placeholder: props.locale === "en-US" ? "Start writing..." : "开始记录...",}),],content: resolveImageSources(props.content, props.baseUrl),@@ -124,11 +126,8 @@ export default function LocalTiptapEditor(props: LocalTiptapEditorProps) {editor,selector: ({ editor: activeEditor }) =>(activeEditor?.isActive("bold") ? 1 : 0) |- (activeEditor?.isActive("italic") ? 2 : 0) |- (activeEditor?.isActive("heading", { level: 2 }) ? 4 : 0) |(activeEditor?.isActive("bulletList") ? 8 : 0) |- (activeEditor?.isActive("blockquote") ? 16 : 0) |- (activeEditor?.isActive("codeBlock") ? 32 : 0),+ (activeEditor?.isActive("blockquote") ? 16 : 0),});const insertImage = async () => {@@ -143,18 +142,13 @@ export default function LocalTiptapEditor(props: LocalTiptapEditorProps) {return (<div className="edgeever-editor-shell">- <style>{EDITOR_STYLES}</style>- <div aria-label="编辑器工具栏" className="edgeever-editor-toolbar" role="toolbar">- <ToolbarButton active={Boolean(toolbarState & 4)} label="标题" onRun={() => editor?.chain().focus().toggleHeading({ level: 2 }).run()} text="H2" />- <ToolbarButton active={Boolean(toolbarState & 1)} label="加粗" onRun={() => editor?.chain().focus().toggleBold().run()} text="B" />- <ToolbarButton active={Boolean(toolbarState & 2)} label="斜体" onRun={() => editor?.chain().focus().toggleItalic().run()} text="I" />- <ToolbarButton active={Boolean(toolbarState & 8)} label="无序列表" onRun={() => editor?.chain().focus().toggleBulletList().run()} text="•" />- <ToolbarButton active={Boolean(toolbarState & 16)} label="引用" onRun={() => editor?.chain().focus().toggleBlockquote().run()} text="❝" />- <ToolbarButton active={Boolean(toolbarState & 32)} label="代码块" onRun={() => editor?.chain().focus().toggleCodeBlock().run()} text="</>" />- <ToolbarButton label="分割线" onRun={() => editor?.chain().focus().setHorizontalRule().run()} text="—" />- <ToolbarButton label="插入图片" onRun={() => void insertImage()} text="+图" />- <ToolbarButton label="撤销" onRun={() => editor?.chain().focus().undo().run()} text="↶" />- <ToolbarButton label="重做" onRun={() => editor?.chain().focus().redo().run()} text="↷" />+ <style>{getEditorStyles(props.theme)}</style>+ <div aria-label={props.locale === "en-US" ? "Editor toolbar" : "编辑器工具栏"} className="edgeever-editor-toolbar" role="toolbar">+ <ToolbarButton label={props.locale === "en-US" ? "Upload image" : "上传图片"} onRun={() => void insertImage()} text={props.locale === "en-US" ? "+ Image" : "+图"} />+ <ToolbarButton active={Boolean(toolbarState & 1)} label={props.locale === "en-US" ? "Bold" : "加粗"} onRun={() => editor?.chain().focus().toggleBold().run()} text="B" />+ <ToolbarButton active={Boolean(toolbarState & 8)} label={props.locale === "en-US" ? "Bullet list" : "无序列表"} onRun={() => editor?.chain().focus().toggleBulletList().run()} text="•" />+ <ToolbarButton active={Boolean(toolbarState & 16)} label={props.locale === "en-US" ? "Quote" : "引用"} onRun={() => editor?.chain().focus().toggleBlockquote().run()} text="❝" />+ <ToolbarButton label={props.locale === "en-US" ? "Horizontal rule" : "分割线"} onRun={() => editor?.chain().focus().setHorizontalRule().run()} text="—" /></div><EditorContent editor={editor} /></div>@@ -209,15 +203,15 @@ const resolveUrl = (source: string, baseUrl: string) => {return `${baseUrl.replace(/\/+$/, "")}${source}`;};-const EDITOR_STYLES = `- :root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }+const getEditorStyles = (theme: "light" | "dark") => `+ :root { color-scheme: ${theme}; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }* { box-sizing: border-box; }- html, body, #root { width: 100%; height: 100%; margin: 0; background: #fff; }- body { overflow: hidden; color: #0f172a; }- .edgeever-editor-shell { display: flex; height: 100%; min-height: 100%; flex-direction: column; background: #fff; }- .edgeever-editor-toolbar { display: flex; flex: 0 0 auto; gap: 6px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; scrollbar-width: none; }+ html, body, #root { width: 100%; height: 100%; margin: 0; background: ${theme === "dark" ? "#0f172a" : "#fff"}; }+ body { overflow: hidden; color: ${theme === "dark" ? "#f8fafc" : "#0f172a"}; }+ .edgeever-editor-shell { display: flex; height: 100%; min-height: 100%; flex-direction: column; background: ${theme === "dark" ? "#0f172a" : "#fff"}; }+ .edgeever-editor-toolbar { display: flex; flex: 0 0 auto; gap: 6px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid ${theme === "dark" ? "#334155" : "#e2e8f0"}; background: ${theme === "dark" ? "#020617" : "#f8fafc"}; scrollbar-width: none; }.edgeever-editor-toolbar::-webkit-scrollbar { display: none; }- .edgeever-editor-toolbar button { min-width: 38px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: #fff; color: #475569; font: inherit; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px #e2e8f0; }+ .edgeever-editor-toolbar button { min-width: 38px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: ${theme === "dark" ? "#1e293b" : "#fff"}; color: ${theme === "dark" ? "#e2e8f0" : "#475569"}; font: inherit; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px ${theme === "dark" ? "#475569" : "#e2e8f0"}; }.edgeever-editor-toolbar button.is-active { background: #ccfbf1; color: #0f766e; box-shadow: inset 0 0 0 1px #5eead4; }.tiptap { min-height: 100%; outline: none; }.edgeever-editor-shell > div:last-child { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }@@ -225,9 +219,9 @@ const EDITOR_STYLES = `.edgeever-editor-content > :first-child { margin-top: 0; }.edgeever-editor-content p.is-editor-empty:first-child::before { float: left; height: 0; color: #94a3b8; content: attr(data-placeholder); pointer-events: none; }.edgeever-editor-content h1, .edgeever-editor-content h2, .edgeever-editor-content h3 { line-height: 1.3; }- .edgeever-editor-content blockquote { margin-left: 0; padding-left: 14px; border-left: 3px solid #5eead4; color: #475569; }+ .edgeever-editor-content blockquote { margin-left: 0; padding-left: 14px; border-left: 3px solid #5eead4; color: ${theme === "dark" ? "#cbd5e1" : "#475569"}; }.edgeever-editor-content pre { overflow-x: auto; border-radius: 10px; padding: 14px; background: #0f172a; color: #e2e8f0; }- .edgeever-editor-content code { border-radius: 4px; padding: 2px 4px; background: #f1f5f9; }+ .edgeever-editor-content code { border-radius: 4px; padding: 2px 4px; background: ${theme === "dark" ? "#1e293b" : "#f1f5f9"}; }.edgeever-editor-content pre code { padding: 0; background: transparent; }.edgeever-editor-content img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 10px; }.edgeever-editor-content hr { margin: 24px 0; border: 0; border-top: 1px solid #cbd5e1; }diff --git a/apps/mobile/src/components/LocalizedText.tsx b/apps/mobile/src/components/LocalizedText.tsxnew file mode 100644index 00000000..074e6a52--- /dev/null+++ b/apps/mobile/src/components/LocalizedText.tsx@@ -0,0 +1,71 @@+import { Children, forwardRef, isValidElement, type ComponentRef, type ReactNode } from "react";+import {+ Alert as NativeAlert,+ Pressable as NativePressable,+ Text as NativeText,+ TextInput as NativeTextInput,+ type PressableProps,+ type TextInputProps,+ type TextProps,+} from "react-native";+import { translateCurrentMobileText, useMobileLocale } from "../lib/mobile-locale";++const translateChildren = (children: ReactNode, translate: (value: string) => string): ReactNode =>+ Children.map(children, (child) => {+ if (typeof child === "string") {+ return translate(child);+ }+ if (isValidElement(child) && child.type === NativeText) {+ return child;+ }+ return child;+ });++export const Text = forwardRef<ComponentRef<typeof NativeText>, TextProps>(({ children, ...props }, ref) => {+ const { translate } = useMobileLocale();+ return (+ <NativeText {...props} ref={ref}>+ {translateChildren(children, translate)}+ </NativeText>+ );+});++Text.displayName = "LocalizedText";++export const TextInput = forwardRef<ComponentRef<typeof NativeTextInput>, TextInputProps>(({ accessibilityHint, accessibilityLabel, placeholder, ...props }, ref) => {+ const { translate } = useMobileLocale();+ return (+ <NativeTextInput+ {...props}+ accessibilityHint={typeof accessibilityHint === "string" ? translate(accessibilityHint) : accessibilityHint}+ accessibilityLabel={typeof accessibilityLabel === "string" ? translate(accessibilityLabel) : accessibilityLabel}+ placeholder={placeholder ? translate(placeholder) : placeholder}+ ref={ref}+ />+ );+});++TextInput.displayName = "LocalizedTextInput";++export const Pressable = forwardRef<ComponentRef<typeof NativePressable>, PressableProps>(+ ({ accessibilityHint, accessibilityLabel, ...props }, ref) => (+ <NativePressable+ {...props}+ accessibilityHint={typeof accessibilityHint === "string" ? translateCurrentMobileText(accessibilityHint) : accessibilityHint}+ accessibilityLabel={typeof accessibilityLabel === "string" ? translateCurrentMobileText(accessibilityLabel) : accessibilityLabel}+ ref={ref}+ />+ )+);++Pressable.displayName = "LocalizedPressable";++export const Alert = {+ alert: (...[title, message, buttons, options]: Parameters<typeof NativeAlert.alert>) =>+ NativeAlert.alert(+ translateCurrentMobileText(title),+ message ? translateCurrentMobileText(message) : message,+ buttons?.map((button) => ({ ...button, text: button.text ? translateCurrentMobileText(button.text) : button.text })),+ options+ ),+};diff --git a/apps/mobile/src/components/icons.tsx b/apps/mobile/src/components/icons.tsxindex 60a93b23..e223de2d 100644--- a/apps/mobile/src/components/icons.tsx+++ b/apps/mobile/src/components/icons.tsx@@ -1,11 +1,15 @@import Feather from "@expo/vector-icons/Feather";import type { ComponentProps } from "react";+import { resolveMobileThemeColor, useMobileTheme } from "../lib/mobile-theme";type FeatherName = ComponentProps<typeof Feather>["name"];type IconProps = Omit<ComponentProps<typeof Feather>, "name">;const createIcon = (name: FeatherName) => {- const Icon = (props: IconProps) => <Feather name={name} {...props} />;+ const Icon = ({ color, ...props }: IconProps) => {+ const { resolvedTheme } = useMobileTheme();+ return <Feather name={name} {...props} color={resolveMobileThemeColor(color as string | undefined, resolvedTheme)} />;+ };Icon.displayName = `EdgeEverIcon(${name})`;return Icon;};@@ -39,6 +43,7 @@ export const Link = createIcon("link");export const List = createIcon("list");export const LockKeyhole = createIcon("lock");export const LogOut = createIcon("log-out");+export const Moon = createIcon("moon");export const Merge = createIcon("git-merge");export const Minus = createIcon("minus");export const MoreHorizontal = createIcon("more-horizontal");@@ -53,6 +58,7 @@ export const Search = createIcon("search");export const ShieldCheck = createIcon("shield");export const SlidersHorizontal = createIcon("sliders");export const Sparkles = createIcon("star");+export const Sun = createIcon("sun");export const Tag = createIcon("tag");export const Trash2 = createIcon("trash-2");export const Upload = createIcon("upload");diff --git a/apps/mobile/src/lib/mobile-locale.tsx b/apps/mobile/src/lib/mobile-locale.tsxnew file mode 100644index 00000000..79ae34cb--- /dev/null+++ b/apps/mobile/src/lib/mobile-locale.tsx@@ -0,0 +1,149 @@+import { enUS, zhCN } from "@edgeever/shared/i18n";+import { createContext, useContext, useEffect, useMemo, useState, type ReactNode } from "react";+import {+ readMobileLocalePreference,+ writeMobileLocalePreference,+ type MobileLocalePreference,+} from "./preferences";++type SupportedMobileLocale = "zh-CN" | "en-US";+type MobileLocaleContextValue = {+ preference: MobileLocalePreference;+ resolvedLocale: SupportedMobileLocale;+ setPreference: (preference: MobileLocalePreference) => void;+ translate: (value: string) => string;+};++type TranslationPair = { source: string; target: string; pattern?: RegExp; placeholders?: string[] };++const mobileOnlyTranslations = new Map<string, string>([+ ["返回", "Back"],+ ["切换到深色模式", "Switch to dark mode"],+ ["切换到浅色模式", "Switch to light mode"],+ ["完成编辑", "Finish editing"],+ ["完成新建笔记", "Finish creating note"],+ ["笔记列表操作", "Note list actions"],+ ["搜索", "Search"],+ ["搜索标题、正文或标签", "Search titles, content, or tags"],+ ["输入关键词开始搜索", "Enter a keyword to search"],+ ["搜索本机同步缓存,结果会即时显示", "Search the local synced cache with instant results"],+ ["笔记操作", "Note actions"],+ ["编辑笔记", "Edit note"],+ ["所在笔记本", "Notebook"],+ ["笔记标题", "Note title"],+ ["笔记标签", "Note tags"],+ ["选择笔记本", "Choose notebook"],+ ["没有正文预览", "No content preview"],+ ["原生运行时启动", "Native runtime startup"],+ ["启动至 JS 执行", "Launch to JavaScript execution"],+ ["启动至会话/缓存就绪", "Launch to session/cache ready"],+ ["启动至工作区首帧", "Launch to workspace first frame"],+ ["启动至列表数据就绪", "Launch to list data ready"],+ ["启动至交互空闲", "Launch to interaction idle"],+ ["最近一次本地编辑器启动", "Latest local editor startup"],+ ["暂不可用", "Unavailable"],+ ["尚未记录", "Not recorded"],+]);++const flattenStrings = (value: unknown, prefix = "", output = new Map<string, string>()) => {+ if (typeof value === "string") {+ output.set(prefix, value);+ return output;+ }+ if (!value || typeof value !== "object") {+ return output;+ }+ for (const [key, child] of Object.entries(value)) {+ flattenStrings(child, prefix ? `${prefix}.${key}` : key, output);+ }+ return output;+};++const escapeRegExp = (value: string) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");+const zhStrings = flattenStrings(zhCN);+const enStrings = flattenStrings(enUS);+const translationPairs: TranslationPair[] = Array.from(zhStrings.entries())+ .flatMap(([key, source]) => {+ const target = enStrings.get(key);+ if (!target || source === target) {+ return [];+ }+ const placeholders: string[] = [];+ const patternSource = escapeRegExp(source).replace(/\\\{\\\{(\w+)\\\}\\\}/g, (_match, placeholder: string) => {+ placeholders.push(placeholder);+ return "(.+?)";+ });+ return [{ source, target, pattern: placeholders.length > 0 ? new RegExp(`^${patternSource}$`) : undefined, placeholders }];+ })+ .sort((left, right) => right.source.length - left.source.length);+const exactTranslations = new Map(translationPairs.filter((pair) => !pair.pattern).map((pair) => [pair.source, pair.target]));+const templateTranslations = translationPairs.filter((pair) => pair.pattern);++const resolveSystemLocale = (): SupportedMobileLocale =>+ (Intl.DateTimeFormat().resolvedOptions().locale || "zh-CN").toLowerCase().startsWith("en") ? "en-US" : "zh-CN";++export const translateMobileText = (value: string, locale: SupportedMobileLocale) => {+ if (locale !== "en-US" || !/[\u3400-\u9fff]/.test(value)) {+ return value;+ }+ const exact = mobileOnlyTranslations.get(value) ?? exactTranslations.get(value);+ if (exact) {+ return exact;+ }+ for (const pair of templateTranslations) {+ const match = pair.pattern?.exec(value);+ if (!match) {+ continue;+ }+ return (pair.placeholders ?? []).reduce(+ (translated, placeholder, index) => translated.replace(`{{${placeholder}}}`, match[index + 1] ?? ""),+ pair.target+ );+ }+ return value;+};++let currentResolvedMobileLocale: SupportedMobileLocale = resolveSystemLocale();+export const translateCurrentMobileText = (value: string) => translateMobileText(value, currentResolvedMobileLocale);++const MobileLocaleContext = createContext<MobileLocaleContextValue>({+ preference: "system",+ resolvedLocale: resolveSystemLocale(),+ setPreference: () => undefined,+ translate: (value) => value,+});++export const MobileLocaleProvider = ({ children }: { children: ReactNode }) => {+ const [preference, setPreferenceState] = useState<MobileLocalePreference>("system");++ useEffect(() => {+ let active = true;+ void readMobileLocalePreference().then((storedPreference) => {+ if (active) {+ setPreferenceState(storedPreference);+ }+ });+ return () => {+ active = false;+ };+ }, []);++ const resolvedLocale = preference === "system" ? resolveSystemLocale() : preference;+ currentResolvedMobileLocale = resolvedLocale;+ const value = useMemo<MobileLocaleContextValue>(+ () => ({+ preference,+ resolvedLocale,+ setPreference: (nextPreference) => {+ setPreferenceState(nextPreference);+ void writeMobileLocalePreference(nextPreference);+ },+ translate: (text) => translateMobileText(text, resolvedLocale),+ }),+ [preference, resolvedLocale]+ );++ return <MobileLocaleContext.Provider value={value}>{children}</MobileLocaleContext.Provider>;+};++export const useMobileLocale = () => useContext(MobileLocaleContext);diff --git a/apps/mobile/src/lib/mobile-theme.tsx b/apps/mobile/src/lib/mobile-theme.tsxnew file mode 100644index 00000000..9243cd32--- /dev/null+++ b/apps/mobile/src/lib/mobile-theme.tsx@@ -0,0 +1,134 @@+import { createContext, useContext, useEffect, useMemo, useState, type ReactNode } from "react";+import { useColorScheme } from "react-native";+import { readMobileThemePreference, writeMobileThemePreference, type MobileThemePreference } from "./preferences";++export type MobileResolvedTheme = "light" | "dark";++type MobileThemeContextValue = {+ preference: MobileThemePreference;+ resolvedTheme: MobileResolvedTheme;+ setPreference: (preference: MobileThemePreference) => void;+ toggleTheme: () => void;+};++const MobileThemeContext = createContext<MobileThemeContextValue | null>(null);++const foregroundDarkMap: Record<string, string> = {+ "#020617": "#f8fafc",+ "#0f172a": "#f8fafc",+ "#1e293b": "#f1f5f9",+ "#17211a": "#f8fafc",+ "#334155": "#e2e8f0",+ "#475569": "#e2e8f0",+ "#64748b": "#cbd5e1",+ "#94a3b8": "#94a3b8",+ "#b91c1c": "#fca5a5",+ "#be123c": "#fda4af",+ "#e11d48": "#fb7185",+};++const backgroundDarkMap: Record<string, string> = {+ "#ffffff": "#0f172a",+ "#f8fafc": "#020617",+ "#f7faf7": "#020617",+ "#f1f5f9": "#1e293b",+ "#ecfdf5": "#064e3b",+ "#ecfdf3": "#064e3b",+ "#f0fdf4": "#052e16",+ "#fef2f2": "#450a0a",+ "#fff1f2": "#4c0519",+ "#fffbeb": "#451a03",+};++const borderDarkMap: Record<string, string> = {+ "#f1f5f9": "#1e293b",+ "#e2e8f0": "#334155",+ "#cbd5e1": "#475569",+ "#a7f3d0": "#047857",+ "#fecaca": "#7f1d1d",+ "#fda4af": "#9f1239",+ "#dce7dd": "#334155",+ "#cad8cc": "#475569",+ "#bbf7d0": "#047857",+ "#fde68a": "#92400e",+};++const mapThemeColor = (value: unknown, theme: MobileResolvedTheme, palette: Record<string, string>) => {+ if (theme !== "dark" || typeof value !== "string") {+ return value;+ }+ return palette[value.toLowerCase()] ?? value;+};++export const resolveMobileThemeColor = (value: string | undefined, theme: MobileResolvedTheme, usage: "foreground" | "background" | "border" = "foreground") =>+ mapThemeColor(value, theme, usage === "background" ? backgroundDarkMap : usage === "border" ? borderDarkMap : foregroundDarkMap) as string | undefined;++export const resolveMobileThemeStyles = <T extends Record<string, unknown>>(styleSheet: T, theme: MobileResolvedTheme): T => {+ if (theme === "light") {+ return styleSheet;+ }+ return Object.fromEntries(+ Object.entries(styleSheet).map(([styleName, styleValue]) => {+ if (!styleValue || typeof styleValue !== "object") {+ return [styleName, styleValue];+ }+ const resolvedStyle = Object.fromEntries(+ Object.entries(styleValue).map(([property, value]) => {+ if (property === "color" || property === "tintColor") {+ return [property, mapThemeColor(value, theme, foregroundDarkMap)];+ }+ if (property === "backgroundColor") {+ return [property, mapThemeColor(value, theme, backgroundDarkMap)];+ }+ if (property.startsWith("border") && property.endsWith("Color")) {+ return [property, mapThemeColor(value, theme, borderDarkMap)];+ }+ return [property, value];+ })+ );+ return [styleName, resolvedStyle];+ })+ ) as T;+};++export const MobileThemeProvider = ({ children }: { children: ReactNode }) => {+ const systemTheme = useColorScheme();+ const [preference, setPreferenceState] = useState<MobileThemePreference>("system");++ useEffect(() => {+ let active = true;+ void readMobileThemePreference().then((storedPreference) => {+ if (active) {+ setPreferenceState(storedPreference);+ }+ });+ return () => {+ active = false;+ };+ }, []);++ const resolvedTheme: MobileResolvedTheme = preference === "system" ? (systemTheme === "dark" ? "dark" : "light") : preference;+ const value = useMemo<MobileThemeContextValue>(() => ({+ preference,+ resolvedTheme,+ setPreference: (nextPreference) => {+ setPreferenceState(nextPreference);+ void writeMobileThemePreference(nextPreference);+ },+ toggleTheme: () => {+ const nextPreference = resolvedTheme === "dark" ? "light" : "dark";+ setPreferenceState(nextPreference);+ void writeMobileThemePreference(nextPreference);+ },+ }), [preference, resolvedTheme]);++ return <MobileThemeContext.Provider value={value}>{children}</MobileThemeContext.Provider>;+};++export const useMobileTheme = () => {+ const context = useContext(MobileThemeContext);+ if (!context) {+ throw new Error("useMobileTheme must be used within MobileThemeProvider");+ }+ return context;+};diff --git a/apps/mobile/src/lib/preferences.ts b/apps/mobile/src/lib/preferences.tsindex 9a01ada9..6c7d5b8f 100644--- a/apps/mobile/src/lib/preferences.ts+++ b/apps/mobile/src/lib/preferences.ts@@ -5,11 +5,13 @@ const NOTEBOOK_SORT_KEY = "edgeever.mobile.notebookSort";const IMAGE_COMPRESSION_KEY = "edgeever.mobile.imageCompressionEnabled";const LOCALE_PREFERENCE_KEY = "edgeever.mobile.localePreference";const RESOURCE_LAYOUT_KEY = "edgeever.mobile.resourceLayout";+const THEME_PREFERENCE_KEY = "edgeever.mobile.themePreference";export type MobileMemoListDensity = "preview" | "compact";export type MobileNotebookSortPreference = "manual" | "name-asc" | "memo-count-desc" | "updated-desc";export type MobileLocalePreference = "system" | "zh-CN" | "en-US";export type MobileResourceLayoutPreference = "grid" | "list";+export type MobileThemePreference = "system" | "light" | "dark";export const readMobileMemoListDensity = async (): Promise<MobileMemoListDensity> => {const value = await AsyncStorage.getItem(MEMO_LIST_DENSITY_KEY);@@ -46,6 +48,13 @@ export const readMobileResourceLayout = async (): Promise<MobileResourceLayoutPrexport const writeMobileResourceLayout = (layout: MobileResourceLayoutPreference) => AsyncStorage.setItem(RESOURCE_LAYOUT_KEY, layout);+export const readMobileThemePreference = async (): Promise<MobileThemePreference> => {+ const value = await AsyncStorage.getItem(THEME_PREFERENCE_KEY);+ return value === "light" || value === "dark" || value === "system" ? value : "system";+};++export const writeMobileThemePreference = (theme: MobileThemePreference) => AsyncStorage.setItem(THEME_PREFERENCE_KEY, theme);+const isMobileNotebookSortPreference = (value: unknown): value is MobileNotebookSortPreference =>value === "manual" || value === "name-asc" || value === "memo-count-desc" || value === "updated-desc";diff --git a/apps/mobile/src/screens/AccountSecurityModal.tsx b/apps/mobile/src/screens/AccountSecurityModal.tsxindex 25b7a40d..8e669a3f 100644--- a/apps/mobile/src/screens/AccountSecurityModal.tsx+++ b/apps/mobile/src/screens/AccountSecurityModal.tsx@@ -5,17 +5,15 @@ import { KeyRound, Plus, UserRound, Users, X } from "../components/icons";import { useEffect, useState, type ReactNode } from "react";import {ActivityIndicator,- Alert,Modal,- Pressable,ScrollView,StyleSheet,Switch,- Text,- TextInput,View,} from "react-native";import { SafeAreaView } from "react-native-safe-area-context";+import { Alert, Pressable, Text, TextInput } from "../components/LocalizedText";+import { resolveMobileThemeStyles, useMobileTheme, type MobileResolvedTheme } from "../lib/mobile-theme";import { useSession } from "../lib/session";type Section = "password" | "users";@@ -31,6 +29,8 @@ export const AccountSecurityModal = ({onClose: () => void;visible: boolean;}) => {+ const { resolvedTheme } = useMobileTheme();+ refreshAccountSecurityThemeStyles(resolvedTheme);const { client } = useSession();const queryClient = useQueryClient();const [section, setSection] = useState<Section>("password");@@ -235,7 +235,7 @@ const PrimaryButton = ({ disabled, label, onPress }: { disabled: boolean; label:</Pressable>);-const styles = StyleSheet.create({+const baseAccountSecurityStyles = StyleSheet.create({safeArea: { backgroundColor: "#f7faf7", flex: 1 },header: { alignItems: "center", borderBottomColor: "#dce7dd", borderBottomWidth: 1, flexDirection: "row", justifyContent: "space-between", padding: 16 },title: { color: "#17211a", fontSize: 17, fontWeight: "800" },@@ -271,3 +271,13 @@ const styles = StyleSheet.create({userName: { color: "#17211a", fontSize: 14, fontWeight: "800" },link: { color: "#15803d", fontSize: 12, fontWeight: "700", marginTop: 6 },});++let styles = baseAccountSecurityStyles;+let accountSecurityStylesTheme: MobileResolvedTheme = "light";++const refreshAccountSecurityThemeStyles = (theme: MobileResolvedTheme) => {+ if (accountSecurityStylesTheme !== theme) {+ styles = resolveMobileThemeStyles(baseAccountSecurityStyles, theme);+ accountSecurityStylesTheme = theme;+ }+};diff --git a/apps/mobile/src/screens/LoginScreen.tsx b/apps/mobile/src/screens/LoginScreen.tsxindex 1efd3b90..0244e8da 100644--- a/apps/mobile/src/screens/LoginScreen.tsx+++ b/apps/mobile/src/screens/LoginScreen.tsx@@ -4,19 +4,20 @@ import {KeyboardAvoidingView,Linking,Platform,- Pressable,StyleSheet,- Text,- TextInput,View,} from "react-native";import { SafeAreaView } from "react-native-safe-area-context";import { ExternalLink, LockKeyhole } from "../components/icons";+import { Pressable, Text, TextInput } from "../components/LocalizedText";+import { resolveMobileThemeStyles, useMobileTheme, type MobileResolvedTheme } from "../lib/mobile-theme";import { useSession } from "../lib/session";const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever";export const LoginScreen = () => {+ const { resolvedTheme } = useMobileTheme();+ refreshLoginThemeStyles(resolvedTheme);const { signIn } = useSession();const [baseUrl, setBaseUrl] = useState("");const [username, setUsername] = useState("admin");@@ -118,7 +119,7 @@ export const LoginScreen = () => {);};-const styles = StyleSheet.create({+const baseLoginStyles = StyleSheet.create({safeArea: {backgroundColor: "#ecfdf5",flex: 1,@@ -222,3 +223,13 @@ const styles = StyleSheet.create({fontWeight: "800",},});++let styles = baseLoginStyles;+let loginStylesTheme: MobileResolvedTheme = "light";++const refreshLoginThemeStyles = (theme: MobileResolvedTheme) => {+ if (loginStylesTheme !== theme) {+ styles = resolveMobileThemeStyles(baseLoginStyles, theme);+ loginStylesTheme = theme;+ }+};diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsxindex 56c8f737..8b88671a 100644--- a/apps/mobile/src/screens/WorkspaceScreen.tsx+++ b/apps/mobile/src/screens/WorkspaceScreen.tsx@@ -1,4 +1,4 @@-import { createContext, memo, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from "react";+import { memo, useEffect, useMemo, useRef, useState, type ComponentRef, type ReactNode } from "react";import { keepPreviousData, useInfiniteQuery, useMutation, useQuery, useQueryClient, type InfiniteData, type QueryClient, type UseMutationResult } from "@tanstack/react-query";import * as Clipboard from "expo-clipboard";import Constants from "expo-constants";@@ -15,7 +15,6 @@ import {CheckSquare,Code,Copy,- Database,ExternalLink,FileArchive,FileSpreadsheet,@@ -35,6 +34,7 @@ import {LogOut,Merge,Minus,+ Moon,MoreHorizontal,Music,Pencil,@@ -47,6 +47,7 @@ import {ShieldCheck,SlidersHorizontal,Sparkles,+ Sun,Tag,Trash2,Upload,@@ -57,7 +58,6 @@ import {} from "../components/icons";import {ActivityIndicator,- Alert,BackHandler,AppState,type AppStateStatus,@@ -67,27 +67,23 @@ import {Linking,Modal,Platform,- Pressable,RefreshControl,ScrollView,StyleSheet,Switch,- Text,- TextInput,View,} from "react-native";import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";+import { Alert, Pressable, Text, TextInput } from "../components/LocalizedText";import Markdown from "react-native-markdown-display";import { createExcerpt, docToMarkdown, docToText, getNotebookDescendantIds, markdownToDoc, type ApiToken, type MemoDetail, type MemoRevision, type MemoSummary, type Notebook, type ResourceListItem, type TagSummary, type TiptapDoc } from "@edgeever/shared";import { clearMobileMemoDraft, clearMobileNewMemoDraft, readMobileMemoDraft, readMobileNewMemoDraft, writeMobileMemoDraft, writeMobileNewMemoDraft } from "../lib/mobile-drafts";import {readMobileImageCompressionEnabled,- readMobileLocalePreference,readMobileMemoListDensity,readMobileNotebookSort,readMobileResourceLayout,writeMobileImageCompressionEnabled,- writeMobileLocalePreference,writeMobileMemoListDensity,writeMobileNotebookSort,writeMobileResourceLayout,@@ -96,6 +92,7 @@ import {type MobileNotebookSortPreference,type MobileResourceLayoutPreference,} from "../lib/preferences";+import { useMobileLocale } from "../lib/mobile-locale";import { useSession } from "../lib/session";import {deleteMobileSyncQueueItem,@@ -122,23 +119,16 @@ import {import { AccountSecurityModal } from "./AccountSecurityModal";import { getStartupPerformanceItems, markStartup, recordEditorStartup } from "../lib/startup-performance";import LocalTiptapEditor, { type LocalTiptapEditorRef } from "../components/LocalTiptapEditor";+import { resolveMobileThemeStyles, useMobileTheme, type MobileResolvedTheme } from "../lib/mobile-theme";const ALL_NOTES_ID = "all";const DEFAULT_MEMO_TITLE = "无标题笔记";+const resolveEditableMemoTitle = (title?: string | null) => {+ const trimmedTitle = title?.trim() ?? "";+ return trimmedTitle === DEFAULT_MEMO_TITLE ? "" : trimmedTitle;+};const MOBILE_APP_VERSION = Constants.expoConfig?.version ?? "0.1.2";const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever";-const EVERNOTE_IMPORT_SCRIPT_URL =- "https://raw.githubusercontent.com/tianma-if/edgeever/main/scripts/import-evernote-enex-via-mcp.mjs";-const EVERNOTE_MIGRATION_PROMPT = `你是 AI 编程助手。请帮我把本地的印象笔记全量迁移到我当前部署的 EdgeEver 实例中:-1. 检查并使用 \`pipx install evernote-backup\` 自动安装备份工具。-2. 提示我输入印象笔记的用户名和密码并初始化数据库(指定 china 后端),随后同步数据并导出到 \`./evernote-export\` 目录。-3. 从 GitHub 下载最新版迁移脚本:\`${EVERNOTE_IMPORT_SCRIPT_URL}\` 到本地。-4. 安装脚本所需的本地图片压缩库 \`sharp\` 和 \`fast-xml-parser\` 依赖。-5. 使用先前配置的 URL 和 Token 运行该脚本完成迁移(脚本会自动进行 WebP 图片转换):- - 全量迁移:\`bun import-evernote-enex-via-mcp.mjs --input "./evernote-export" --yes\`- - 指定迁移某些笔记本:追加 \`--include "笔记本A,笔记本B"\` 参数。--请告诉我你需要什么信息(如账号密码),收到后直接并发自动执行上述步骤。`;const MOBILE_MEMO_TEMPLATES_ZH: MemoTemplate[] = [{id: "quick-note",@@ -288,7 +278,7 @@ const MAX_COMPRESSED_IMAGE_EDGE = 2560;const IMAGE_COMPRESSION_QUALITY = 0.82;type MobileView = "notes" | "search" | "account" | "settings";-type SettingsTab = "general" | "users" | "data" | "ai" | "account";+type SettingsTab = "general" | "users" | "ai" | "account";type MemoView = "notebook" | "trash";type MemoTemplate = {id: string;@@ -303,8 +293,7 @@ type NotebookOption = {};type MobileNotebookSortMode = MobileNotebookSortPreference;type MobileLocaleMode = MobileLocalePreference;-const MobileLocaleContext = createContext<MobileLocaleMode>("system");-const useMobileLocalePreference = () => useContext(MobileLocaleContext);+const useMobileLocalePreference = () => useMobileLocale().preference;type TextSelection = {start: number;end: number;@@ -321,6 +310,9 @@ type MobileMemoUpdatePayload = {type MobileMemoUpdateMutation = UseMutationResult<MemoDetail, Error, { memo: MemoDetail; payload: MobileMemoUpdatePayload }>;export const WorkspaceScreen = () => {+ const { resolvedTheme } = useMobileTheme();+ const { preference: localePreference, setPreference: setLocalePreference } = useMobileLocale();+ refreshWorkspaceThemeStyles(resolvedTheme);const { client, session, signOut } = useSession();const queryClient = useQueryClient();const safeAreaInsets = useSafeAreaInsets();@@ -333,7 +325,6 @@ export const WorkspaceScreen = () => {const [memoSortMode, setMemoSortMode] = useState<MemoSortMode>("updated-desc");const [memoListDensity, setMemoListDensity] = useState<MobileMemoListDensity>("preview");const [notebookSortMode, setNotebookSortMode] = useState<MobileNotebookSortMode>("manual");- const [localePreference, setLocalePreference] = useState<MobileLocaleMode>("system");const [imageCompressionEnabled, setImageCompressionEnabled] = useState(true);const [selectedMemoId, setSelectedMemoId] = useState<string | null>(null);const [searchText, setSearchText] = useState("");@@ -348,7 +339,6 @@ export const WorkspaceScreen = () => {const [tagsManagerOpen, setTagsManagerOpen] = useState(false);const [resourcesOpen, setResourcesOpen] = useState(false);const [apiTokensOpen, setApiTokensOpen] = useState(false);- const [evernoteGuideOpen, setEvernoteGuideOpen] = useState(false);const [advancedPlayOpen, setAdvancedPlayOpen] = useState(false);const [systemInfoOpen, setSystemInfoOpen] = useState(false);const [accountSecurityOpen, setAccountSecurityOpen] = useState(false);@@ -645,20 +635,6 @@ export const WorkspaceScreen = () => {};}, []);- useEffect(() => {- let mounted = true;-- readMobileLocalePreference().then((locale) => {- if (mounted) {- setLocalePreference(locale);- }- });-- return () => {- mounted = false;- };- }, []);-useEffect(() => {let mounted = true;@@ -685,7 +661,6 @@ export const WorkspaceScreen = () => {const handleLocalePreferenceChange = (locale: MobileLocaleMode) => {setLocalePreference(locale);- void writeMobileLocalePreference(locale);};const handleImageCompressionChange = (enabled: boolean) => {@@ -1115,8 +1090,7 @@ export const WorkspaceScreen = () => {}, [client, dataScope, queryClient]);return (- <MobileLocaleContext.Provider value={localePreference}>- <SafeAreaView edges={["top", "left", "right"]} style={styles.safeArea}>+ <SafeAreaView edges={["top", "left", "right"]} style={styles.safeArea}>{activeView === "notes" ? (<NotesView@@ -1189,7 +1163,6 @@ export const WorkspaceScreen = () => {setAccountSecurityOpen(true);}}onOpenApiTokens={() => setApiTokensOpen(true)}- onOpenEvernoteGuide={() => setEvernoteGuideOpen(true)}onOpenSystemInfo={() => setSystemInfoOpen(true)}localePreference={localePreference}onLocalePreferenceChange={handleLocalePreferenceChange}@@ -1260,7 +1233,6 @@ export const WorkspaceScreen = () => {{tagsManagerOpen ? <TagsManagerModal onClose={() => setTagsManagerOpen(false)} visible /> : null}{resourcesOpen ? <ResourcesModal activeMemo={selectedMemo} imageCompressionEnabled={imageCompressionEnabled} onClose={() => setResourcesOpen(false)} visible /> : null}{apiTokensOpen ? <ApiTokensModal baseUrl={session?.baseUrl ?? ""} onClose={() => setApiTokensOpen(false)} visible /> : null}- {evernoteGuideOpen ? <EvernoteGuideModal onClose={() => setEvernoteGuideOpen(false)} visible /> : null}{advancedPlayOpen ? <AdvancedPlayModal onClose={() => setAdvancedPlayOpen(false)} visible /> : null}{syncQueueOpen ? <SyncQueueModalonClose={() => setSyncQueueOpen(false)}@@ -1284,6 +1256,7 @@ export const WorkspaceScreen = () => {activeNotebookId={activeNotebookId}baseUrl={session?.baseUrl ?? ""}dataScope={dataScope}+ imageCompressionEnabled={imageCompressionEnabled}notebooks={notebooks}onClose={() => setCreateOpen(false)}onCreated={(memo) => {@@ -1435,8 +1408,7 @@ export const WorkspaceScreen = () => {onPress={() => setActiveView("settings")}/></View>- </SafeAreaView>- </MobileLocaleContext.Provider>+ </SafeAreaView>);};@@ -1642,6 +1614,7 @@ const NotebookPickerModal = ({onSelect: (notebookId: string) => void;visible: boolean;}) => {+ const { translate } = useMobileLocale();const [searchText, setSearchText] = useState("");const [collapsedNotebookIds, setCollapsedNotebookIds] = useState<Set<string>>(() => new Set());const notebookOptions = flattenNotebooks(notebooks, notebookSortMode);@@ -1650,6 +1623,9 @@ const NotebookPickerModal = ({const visibleNotebookOptions = searchQuery? filterNotebookOptions(notebookOptions, searchText): filterCollapsedNotebookOptions(notebookOptions, collapsedNotebookIds);+ const activeNotebookName = activeNotebookId === ALL_NOTES_ID+ ? "全部笔记"+ : notebooks.find((notebook) => notebook.id === activeNotebookId)?.name ?? "全部笔记";useEffect(() => {if (visible) {@@ -1672,17 +1648,21 @@ const NotebookPickerModal = ({};return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>选择笔记本</Text>- <View style={styles.iconButtonPlaceholder} />- </View>+ <Modal animationType="fade" onRequestClose={onClose} transparent visible={visible}>+ <Pressable onPress={onClose} style={styles.actionSheetBackdrop}>+ <Pressable style={[styles.actionSheet, styles.notebookPickerSheet]}>+ <View style={styles.actionSheetHandle} />+ <View style={styles.notebookPickerHeader}>+ <View style={styles.notebookPickerHeaderText}>+ <Text style={styles.actionSheetTitle}>切换笔记本</Text>+ <Text style={styles.panelLabel}>{translate(`当前:${activeNotebookName}`)}</Text>+ </View>+ <IconButton accessibilityLabel="关闭" onPress={onClose}>+ <X color="#0f172a" size={20} />+ </IconButton>+ </View>- <ScrollView contentContainerStyle={styles.editorForm}>+ <ScrollView contentContainerStyle={styles.editorForm} style={styles.notebookPickerScroll}><View style={styles.searchBox}><Search color="#64748b" size={18} /><TextInput@@ -1706,7 +1686,7 @@ const NotebookPickerModal = ({<Text numberOfLines={1} style={styles.panelValue}>全部笔记</Text>- <Text style={styles.panelLabel}>{notebooksMemoCount} 条笔记</Text>+ <Text style={styles.panelLabel}>{translate(`${notebooksMemoCount} 条笔记`)}</Text></View>{activeNotebookId === ALL_NOTES_ID ? <Check color="#0f172a" size={18} /> : null}</Pressable>@@ -1728,7 +1708,7 @@ const NotebookPickerModal = ({<Text numberOfLines={1} style={styles.panelValue}>{depth > 0 ? `${"· ".repeat(depth)}${notebook.name}` : notebook.name}</Text>- <Text style={styles.panelLabel}>{notebook.memoCount} 条笔记</Text>+ <Text style={styles.panelLabel}>{translate(`${notebook.memoCount} 条笔记`)}</Text></Pressable>{activeNotebookId === notebook.id ? <Check color="#0f172a" size={18} /> : null}</View>@@ -1739,8 +1719,9 @@ const NotebookPickerModal = ({<Text style={styles.mutedText}>没有匹配的笔记本</Text></View>) : null}- </ScrollView>- </SafeAreaView>+ </ScrollView>+ </Pressable>+ </Pressable></Modal>);};@@ -1972,7 +1953,6 @@ const SettingsView = ({onLocalePreferenceChange,onOpenAdvancedPlay,onOpenApiTokens,- onOpenEvernoteGuide,onOpenPassword,onOpenSystemInfo,onOpenUserManagement,@@ -1986,17 +1966,16 @@ const SettingsView = ({onLocalePreferenceChange: (locale: MobileLocaleMode) => void;onOpenAdvancedPlay: () => void;onOpenApiTokens: () => void;- onOpenEvernoteGuide: () => void;onOpenPassword: () => void;onOpenSystemInfo: () => void;onOpenUserManagement: () => void;onSignOut: () => void;}) => {+ const { resolvedTheme, toggleTheme } = useMobileTheme();const [activeTab, setActiveTab] = useState<SettingsTab | null>(null);const tabs: Array<{ key: SettingsTab; label: string; icon: ReactNode }> = [{ key: "general", label: "常规设置", icon: <SlidersHorizontal color="#059669" size={17} /> },...(isOwner ? [{ key: "users" as const, label: "成员管理", icon: <Users color="#059669" size={17} /> }] : []),- { key: "data", label: "数据管理", icon: <Database color="#059669" size={17} /> },{ key: "ai", label: "AI集成", icon: <Sparkles color="#059669" size={17} /> },{ key: "account", label: "登录设置", icon: <ShieldCheck color="#059669" size={17} /> },];@@ -2047,9 +2026,6 @@ const SettingsView = ({if (activeTab === "users") {return <SettingsLinkGroup description="为家人或团队成员创建独立的个人笔记空间。实例不开放公开注册。" icon={<Users color="#047857" size={16} />} onPress={onOpenUserManagement} title="成员管理" />;}- if (activeTab === "data") {- return <SettingsLinkGroup description="MCP 迁移流程与 Prompt。" icon={<FileArchive color="#047857" size={16} />} onPress={onOpenEvernoteGuide} title="Evernote 导入指引" />;- }if (activeTab === "ai") {return (<View style={styles.settingsDetailList}>@@ -2079,7 +2055,14 @@ const SettingsView = ({{activeTab ? tabs.find((tab) => tab.key === activeTab)?.icon : <UserRound color="#047857" size={17} />}<Text numberOfLines={1} style={styles.settingsTitle}>{title}</Text></View>- <View style={styles.settingsBackPlaceholder} />+ <Pressable+ accessibilityLabel={resolvedTheme === "dark" ? "切换到浅色模式" : "切换到深色模式"}+ accessibilityRole="button"+ onPress={toggleTheme}+ style={styles.settingsThemeButton}+ >+ {resolvedTheme === "dark" ? <Sun color="#64748b" size={19} /> : <Moon color="#64748b" size={19} />}+ </Pressable></View><ScrollView contentContainerStyle={styles.settingsScrollContent} style={styles.viewBody}>{activeTab === null ? (@@ -2123,6 +2106,7 @@ const CreateMemoModal = ({activeNotebookId,baseUrl,dataScope,+ imageCompressionEnabled,notebooks,onClose,onCreated,@@ -2133,6 +2117,7 @@ const CreateMemoModal = ({activeNotebookId: string;baseUrl: string;dataScope: string;+ imageCompressionEnabled: boolean;notebooks: Notebook[];onClose: () => void;onCreated: (memo: MemoDetail) => void;@@ -2140,12 +2125,17 @@ const CreateMemoModal = ({syncQueueScope: string;visible: boolean;}) => {+ const { client } = useSession();const queryClient = useQueryClient();+ const { resolvedLocale } = useMobileLocale();+ const { resolvedTheme } = useMobileTheme();const fallbackNotebookId = activeNotebookId !== ALL_NOTES_ID ? activeNotebookId : notebooks[0]?.id ?? "";const editorRef = useRef<LocalTiptapEditorRef>(null);const contentJsonRef = useRef<TiptapDoc>(markdownToDoc(""));const contentMarkdownRef = useRef("");const dirtyRef = useRef(false);+ const flushResolverRef = useRef<(() => void) | null>(null);+ const materializedMemoRef = useRef<MemoDetail | null>(null);const [notebookId, setNotebookId] = useState(fallbackNotebookId);const [title, setTitle] = useState("");const [tagsText, setTagsText] = useState("");@@ -2155,8 +2145,15 @@ const CreateMemoModal = ({const [draftRestored, setDraftRestored] = useState(false);const [dirty, setDirty] = useState(false);const [editorReady, setEditorReady] = useState(false);+ const [imageOperation, setImageOperation] = useState<"idle" | "creating" | "uploading">("idle");const targetNotebookId = notebookId || fallbackNotebookId;const selectedNotebookName = notebooks.find((notebook) => notebook.id === targetNotebookId)?.name ?? "选择笔记本";+ const titleRef = useRef(title);+ const tagsTextRef = useRef(tagsText);+ const targetNotebookIdRef = useRef(targetNotebookId);+ titleRef.current = title;+ tagsTextRef.current = tagsText;+ targetNotebookIdRef.current = targetNotebookId;useEffect(() => {if (!visible) {@@ -2195,13 +2192,26 @@ const CreateMemoModal = ({return;}const timeout = setTimeout(() => {- void writeMobileNewMemoDraft(dataScope, {- title,- contentMarkdown: contentMarkdownRef.current,- notebookId: targetNotebookId,- tagsText,- updatedAt: new Date().toISOString(),- });+ const materializedMemo = materializedMemoRef.current;+ if (materializedMemo) {+ void writeMobileMemoDraft({+ memoId: materializedMemo.id,+ expectedRevision: materializedMemo.revision,+ title,+ contentMarkdown: contentMarkdownRef.current,+ notebookId: targetNotebookId,+ tagsText,+ updatedAt: new Date().toISOString(),+ });+ } else {+ void writeMobileNewMemoDraft(dataScope, {+ title,+ contentMarkdown: contentMarkdownRef.current,+ notebookId: targetNotebookId,+ tagsText,+ updatedAt: new Date().toISOString(),+ });+ }}, 350);return () => clearTimeout(timeout);}, [dataScope, dirty, draftLoaded, tagsText, targetNotebookId, title, visible, contentMarkdown]);@@ -2211,6 +2221,27 @@ const CreateMemoModal = ({if (!targetNotebookId) {throw new Error("请先创建一个笔记本");}+ const materializedMemo = materializedMemoRef.current;+ if (materializedMemo) {+ const optimisticMemo = createOptimisticMemo(materializedMemo, {+ title: titleRef.current.trim() || DEFAULT_MEMO_TITLE,+ contentJson: contentJsonRef.current,+ contentMarkdown: contentMarkdownRef.current.trim(),+ notebookId: targetNotebookIdRef.current,+ tags: parseTags(tagsTextRef.current),+ });+ await upsertLocalMemo(dataScope, optimisticMemo);+ await queueMobileMemoUpdate(syncQueueScope, {+ memoId: materializedMemo.id,+ expectedRevision: materializedMemo.revision,+ expectedContentHash: materializedMemo.contentHash,+ title: optimisticMemo.title ?? DEFAULT_MEMO_TITLE,+ contentMarkdown: optimisticMemo.contentMarkdown,+ notebookId: optimisticMemo.notebookId,+ tags: optimisticMemo.tags,+ });+ return optimisticMemo;+ }const now = new Date().toISOString();const temporaryId = `local:${Date.now().toString(36)}:${Math.random().toString(36).slice(2, 10)}`;const markdown = contentMarkdownRef.current.trim();@@ -2249,6 +2280,7 @@ const CreateMemoModal = ({return memo;},onSuccess: async (memo) => {+ const materializedMemoId = materializedMemoRef.current?.id ?? null;await Promise.all([queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),@@ -2258,23 +2290,71 @@ const CreateMemoModal = ({setContentMarkdown("");contentMarkdownRef.current = "";contentJsonRef.current = markdownToDoc("");+ materializedMemoRef.current = null;dirtyRef.current = false;setDirty(false);await clearMobileNewMemoDraft(dataScope);+ if (materializedMemoId) {+ await clearMobileMemoDraft(materializedMemoId);+ }await onQueued();onCreated(memo);},});- const canSubmitCreateMemo = Boolean(targetNotebookId) && !createMutation.isPending;+ const canSubmitCreateMemo = Boolean(targetNotebookId) && !createMutation.isPending && imageOperation === "idle";- const pickImageLinkFromClipboard = async () => {- const text = await Clipboard.getStringAsync();- const url = text.trim();- if (!/^https?:\/\//i.test(url)) {- Alert.alert("新建笔记暂未上传图片", "可以先复制图片链接插入;本地图片请在完成创建后上传。");+ const materializeMemoForImage = async () => {+ if (materializedMemoRef.current) {+ return materializedMemoRef.current;+ }+ if (!client || !targetNotebookIdRef.current) {+ throw new Error("当前无法连接实例,请稍后重试");+ }+ setImageOperation("creating");+ const response = await client.createMemo({+ notebookId: targetNotebookIdRef.current,+ title: titleRef.current.trim() || DEFAULT_MEMO_TITLE,+ contentMarkdown: contentMarkdownRef.current.trim(),+ tags: parseTags(tagsTextRef.current),+ });+ materializedMemoRef.current = response.memo;+ await upsertLocalMemo(dataScope, response.memo);+ await clearMobileNewMemoDraft(dataScope);+ await Promise.all([+ queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),+ queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),+ ]);+ return response.memo;+ };++ const pickAndUploadImage = async () => {+ try {+ const DocumentPicker = await import("expo-document-picker");+ const result = await DocumentPicker.getDocumentAsync({+ copyToCacheDirectory: true,+ multiple: false,+ type: ["image/*"],+ });+ const asset = result.canceled ? null : result.assets[0];+ if (!asset) {+ return null;+ }+ const memo = await materializeMemoForImage();+ setImageOperation("uploading");+ const uploadAsset = await prepareUploadAsset(asset, imageCompressionEnabled);+ const form = new FormData();+ form.append("file", uploadAsset as unknown as Blob);+ const { resource } = await client!.uploadMemoResource(memo.id, form);+ return {+ alt: resource.filename || uploadAsset.name || "图片",+ url: resource.url,+ };+ } catch (error) {+ Alert.alert("图片上传失败", error instanceof Error ? error.message : "请检查网络连接后重试");return null;+ } finally {+ setImageOperation("idle");}- return { alt: "图片", url };};const markDirty = () => {@@ -2282,11 +2362,35 @@ const CreateMemoModal = ({setDirty(true);};- const requestClose = () => {- if (createMutation.isPending) {+ const flushEditor = async () => {+ if (!editorRef.current) {+ return;+ }+ await new Promise<void>((resolve) => {+ let settled = false;+ const finish = () => {+ if (settled) {+ return;+ }+ settled = true;+ flushResolverRef.current = null;+ resolve();+ };+ flushResolverRef.current = finish;+ editorRef.current?.flush();+ setTimeout(finish, 1000);+ });+ };++ const requestClose = async () => {+ if (createMutation.isPending || imageOperation !== "idle") {+ return;+ }+ await flushEditor();+ if (materializedMemoRef.current) {+ createMutation.mutate();return;}- editorRef.current?.flush();if (!dirtyRef.current) {onClose();return;@@ -2335,34 +2439,35 @@ const CreateMemoModal = ({contentMarkdownRef.current = markdown;setContentMarkdown(markdown);markDirty();+ flushResolverRef.current?.();+ flushResolverRef.current = null;}}- onPickImage={pickImageLinkFromClipboard}+ onPickImage={pickAndUploadImage}onReady={async (elapsedMs) => {setEditorReady(true);recordEditorStartup(elapsedMs);}}ref={editorRef}+ locale={resolvedLocale}+ theme={resolvedTheme}/>- ) : null, [baseUrl, draftLoaded]);+ ) : null, [baseUrl, draftLoaded, resolvedLocale, resolvedTheme]);return (- <Modal animationType="slide" onRequestClose={requestClose} presentationStyle="fullScreen" visible={visible}>+ <Modal animationType="none" onRequestClose={() => void requestClose()} presentationStyle="fullScreen" visible={visible}><SafeAreaView style={styles.createMemoSafeArea}><View style={styles.createMemoHeader}>- <Pressable accessibilityLabel="返回" accessibilityRole="button" disabled={createMutation.isPending} onPress={requestClose} style={styles.createMemoBackButton}>- <ChevronLeft color={createMutation.isPending ? "#cbd5e1" : "#0f172a"} size={30} />+ <Pressable accessibilityLabel="返回" accessibilityRole="button" disabled={createMutation.isPending || imageOperation !== "idle"} onPress={() => void requestClose()} style={styles.createMemoBackButton}>+ <ChevronLeft color={createMutation.isPending || imageOperation !== "idle" ? "#cbd5e1" : "#0f172a"} size={30} /></Pressable><View style={styles.createMemoHeaderActions}><Text style={[styles.createMemoStatus, createMutation.isPending && styles.createMemoStatusActive]}>- {createMutation.isPending ? "保存中" : dirty ? "本地草稿" : editorReady ? "已保存" : "正在启动"}+ {imageOperation === "creating" ? "正在创建" : imageOperation === "uploading" ? "正在上传" : createMutation.isPending ? "保存中" : dirty ? "本地草稿" : editorReady ? "已保存" : "正在启动"}</Text><PressableaccessibilityLabel="完成新建笔记"disabled={!canSubmitCreateMemo}- onPress={() => {- editorRef.current?.flush();- createMutation.mutate();- }}+ onPress={() => void flushEditor().then(() => createMutation.mutate())}style={[styles.createMemoDoneButton, !canSubmitCreateMemo && styles.createMemoDoneButtonDisabled]}>{createMutation.isPending ? <ActivityIndicator color="#64748b" size="small" /> : <Text style={[styles.createMemoDoneText, !canSubmitCreateMemo && styles.createMemoDoneTextDisabled]}>完成</Text>}@@ -2552,7 +2657,7 @@ const NotebookManagerModal = ({}) => {const { client } = useSession();const queryClient = useQueryClient();- const createNotebookInputRef = useRef<TextInput>(null);+ const createNotebookInputRef = useRef<ComponentRef<typeof TextInput>>(null);const [name, setName] = useState("");const [parentId, setParentId] = useState<string | null>(null);const [editingNotebookId, setEditingNotebookId] = useState<string | null>(null);@@ -3229,89 +3334,6 @@ const ApiTokenRow = ({);};-const EvernoteGuideModal = ({ onClose, visible }: { onClose: () => void; visible: boolean }) => {- const [copiedValue, setCopiedValue] = useState<string | null>(null);-- const copyText = async (value: string, label: string) => {- await Clipboard.setStringAsync(value);- setCopiedValue(label);- setTimeout(() => setCopiedValue((current) => (current === label ? null : current)), 1600);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>Evernote 导入指引</Text>- <IconButton onPress={() => copyText(EVERNOTE_MIGRATION_PROMPT, "prompt-header")}>- {copiedValue === "prompt-header" ? <ShieldCheck color="#047857" size={18} /> : <Copy color="#0f172a" size={18} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <View style={styles.guideHero}>- <Upload color="#047857" size={24} />- <Text style={styles.panelValue}>推荐通过 AI 编程助手 + EdgeEver MCP 自动迁移</Text>- <Text style={styles.panelLabel}>- 该方案支持大体量 ENEX 导入、WebP 图片转换、创建/修改时间保留,以及嵌套笔记本目录层级还原。- </Text>- </View>-- <GuideStep- title="1. 配置 EdgeEver MCP 服务"- body="在设置页打开“MCP 与 API Token”,创建包含笔记本、笔记、资源、标签读写权限的 Token,复制完整 MCP 配置并交给 AI 编程助手安装。"- />- <GuideStep- title="2. 发送完整迁移 Prompt"- body="让助手安装 evernote-backup,初始化印象笔记 china 后端数据库,同步并导出 ENEX,再下载 EdgeEver 迁移脚本执行导入。"- />- <GuideStep- title="3. 按需限定导入范围"- body="默认会全量迁移。只想导入部分笔记本时,让助手在导入命令后追加 --include 参数。"- />- <GuideStep- title="4. 回到 EdgeEver 验证"- body="导入完成后刷新客户端,检查笔记本组层级、笔记正文、图片资源、创建时间和修改时间是否正常。"- />-- <View style={styles.promptCard}>- <View style={styles.promptCardHeader}>- <Text style={styles.panelValue}>可直接复制给 AI 助手的 Prompt</Text>- <ActionButton label={copiedValue === "prompt-card" ? "已复制" : "复制"} onPress={() => copyText(EVERNOTE_MIGRATION_PROMPT, "prompt-card")}>- {copiedValue === "prompt-card" ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}- </ActionButton>- </View>- <Text selectable style={styles.revisionPreviewText}>- {EVERNOTE_MIGRATION_PROMPT}- </Text>- </View>-- <View style={styles.revisionPreviewBlock}>- <Text style={styles.label}>手动模式备用</Text>- <Text style={styles.revisionPreviewText}>- 不使用 AI 助手时,可以手动下载迁移脚本并按脚本头部注释执行。脚本地址:- </Text>- <Text selectable style={styles.tokenValueText}>- {EVERNOTE_IMPORT_SCRIPT_URL}- </Text>- <View style={styles.tokenActionRow}>- <ActionButton label={copiedValue === "script-url" ? "已复制" : "复制地址"} onPress={() => copyText(EVERNOTE_IMPORT_SCRIPT_URL, "script-url")}>- {copiedValue === "script-url" ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}- </ActionButton>- <ActionButton label="打开" onPress={() => Linking.openURL(EVERNOTE_IMPORT_SCRIPT_URL)}>- <ExternalLink color="#0f172a" size={16} />- </ActionButton>- </View>- </View>- </ScrollView>- </SafeAreaView>- </Modal>- );-};-const AdvancedPlayModal = ({ onClose, visible }: { onClose: () => void; visible: boolean }) => {const [copiedPromptId, setCopiedPromptId] = useState<string | null>(null);const localePreference = useMobileLocalePreference();@@ -3475,13 +3497,6 @@ const SyncQueueModal = ({);};-const GuideStep = ({ body, title }: { body: string; title: string }) => (- <View style={styles.guideStep}>- <Text style={styles.panelValue}>{title}</Text>- <Text style={styles.panelLabel}>{body}</Text>- </View>-);-const SystemInfoModal = ({baseUrl,memoCount,@@ -4357,6 +4372,8 @@ const RichEditorModal = ({updateMutation: MobileMemoUpdateMutation;}) => {const { client } = useSession();+ const { resolvedLocale } = useMobileLocale();+ const { resolvedTheme } = useMobileTheme();const editorRef = useRef<LocalTiptapEditorRef>(null);const contentJsonRef = useRef<TiptapDoc>(memo?.contentJson ?? markdownToDoc(memo?.contentMarkdown ?? ""));const contentMarkdownRef = useRef(memo?.contentMarkdown ?? "");@@ -4365,7 +4382,7 @@ const RichEditorModal = ({const flushResolverRef = useRef<(() => void) | null>(null);const savingRef = useRef(false);const uploadingRef = useRef(false);- const [title, setTitle] = useState(memo?.title?.trim() || "");+ const [title, setTitle] = useState(resolveEditableMemoTitle(memo?.title));const [tagsText, setTagsText] = useState(memo?.tags.join(", ") ?? "");const [notebookId, setNotebookId] = useState(memo?.notebookId ?? "");const [notebookPickerOpen, setNotebookPickerOpen] = useState(false);@@ -4411,7 +4428,7 @@ const RichEditorModal = ({contentMarkdownRef.current = restoredDraft ? restoredDraft.contentMarkdown : memo.contentMarkdown || "";contentSnapshotRef.current = JSON.stringify(restoredJson);dirtyRef.current = canRestore;- setTitle(restoredDraft ? restoredDraft.title : memo.title?.trim() || "");+ setTitle(resolveEditableMemoTitle(restoredDraft ? restoredDraft.title : memo.title));setTagsText(restoredDraft ? restoredDraft.tagsText : memo.tags.join(", "));setNotebookId(restoredDraft ? restoredDraft.notebookId : memo.notebookId);setDirty(canRestore);@@ -4579,9 +4596,11 @@ const RichEditorModal = ({recordEditorStartup(elapsedMs);}}ref={editorRef}+ locale={resolvedLocale}+ theme={resolvedTheme}/>) : null,- [baseUrl, draftLoaded, memo?.id]+ [baseUrl, draftLoaded, memo?.id, resolvedLocale, resolvedTheme]);useEffect(() => {@@ -4602,54 +4621,68 @@ const RichEditorModal = ({return () => clearTimeout(timeout);}, [dirty, memo, notebookId, tagsText, title]);+ useEffect(() => {+ if (!memo || !dirty || !ready || savingRef.current || uploadingRef.current) {+ return;+ }+ const timeout = setTimeout(() => {+ void flushEditor().then(save);+ }, 1200);+ return () => clearTimeout(timeout);+ }, [dirty, memo, notebookId, ready, tagsText, title]);+return (- <Modal animationType="slide" onRequestClose={() => void requestClose()} presentationStyle="fullScreen" visible={Boolean(memo)}>+ <Modal animationType="none" onRequestClose={() => void requestClose()} presentationStyle="fullScreen" visible={Boolean(memo)}><SafeAreaView style={styles.richEditorSafeArea}>- <View style={styles.modalHeader}>- <IconButton accessibilityLabel="保存并关闭" disabled={saving || uploading} onPress={() => void requestClose()}>- <X color={saving || uploading ? "#cbd5e1" : "#0f172a"} size={20} />- </IconButton>- <Text numberOfLines={1} style={styles.modalTitle}>- 富文本编辑器- </Text>- <IconButton accessibilityLabel="保存" disabled={saving || uploading || !ready} onPress={() => void flushEditor().then(save)}>- {saving ? <ActivityIndicator color="#0f172a" /> : <Check color={saving || uploading || !ready ? "#cbd5e1" : "#0f172a"} size={20} />}- </IconButton>+ <View style={styles.createMemoHeader}>+ <Pressable accessibilityLabel="返回" accessibilityRole="button" disabled={saving || uploading} onPress={() => void requestClose()} style={styles.createMemoBackButton}>+ <ChevronLeft color={saving || uploading ? "#cbd5e1" : "#0f172a"} size={30} />+ </Pressable>+ <View style={styles.createMemoHeaderActions}>+ <Text style={[styles.createMemoStatus, (saving || uploading || dirty) && styles.createMemoStatusActive, error && styles.richEditorStatusError]}>{saveLabel}</Text>+ <Pressable+ accessibilityLabel="完成编辑"+ accessibilityRole="button"+ disabled={saving || uploading || !ready}+ onPress={() => void requestClose()}+ style={[styles.createMemoDoneButton, (saving || uploading || !ready) && styles.createMemoDoneButtonDisabled]}+ >+ {saving ? <ActivityIndicator color="#64748b" size="small" /> : <Text style={[styles.createMemoDoneText, (uploading || !ready) && styles.createMemoDoneTextDisabled]}>完成</Text>}+ </Pressable>+ </View></View>{memo && baseUrl ? (<View style={styles.richEditorContainer}>- <View style={styles.richEditorMeta}>- <View style={styles.richEditorTitleBlock}>- <TextInput- onChangeText={(value) => {- setTitle(value);- dirtyRef.current = true;- setDirty(true);- }}- placeholder={DEFAULT_MEMO_TITLE}- placeholderTextColor="#94a3b8"- style={styles.richEditorTitle}- value={title}- />- <Pressable accessibilityRole="button" onPress={() => setNotebookPickerOpen(true)}>- <Text numberOfLines={1} style={styles.richEditorNotebook}>{notebookLabel} · 修订 {memo.revision}</Text>- </Pressable>- </View>- <Text style={[styles.richEditorStatus, error ? styles.richEditorStatusError : saving || uploading || !ready ? styles.richEditorStatusLoading : styles.richEditorStatusActive]}>{saveLabel}</Text>- </View><TextInput- autoCapitalize="none"onChangeText={(value) => {- setTagsText(value);+ setTitle(value);dirtyRef.current = true;setDirty(true);}}- placeholder="标签,用逗号分隔"+ placeholder={DEFAULT_MEMO_TITLE}placeholderTextColor="#94a3b8"- style={styles.richEditorTagsInput}- value={tagsText}+ style={styles.createMemoTitleInput}+ value={title}/>+ <View style={styles.createMemoMetaRow}>+ <Pressable accessibilityLabel="所在笔记本" accessibilityRole="button" onPress={() => setNotebookPickerOpen(true)} style={styles.createMemoNotebookButton}>+ <Text numberOfLines={1} style={styles.createMemoNotebookText}>{notebookLabel}</Text>+ <ChevronDown color="#64748b" size={14} />+ </Pressable>+ <TextInput+ autoCorrect+ onChangeText={(value) => {+ setTagsText(value);+ dirtyRef.current = true;+ setDirty(true);+ }}+ placeholder="添加标签,用逗号分隔"+ placeholderTextColor="#94a3b8"+ style={styles.createMemoTagsInput}+ value={tagsText}+ />+ </View>{draftRestored ? <Text style={styles.richEditorDraftNotice}>已恢复上次未完成的本地草稿</Text> : null}<View style={styles.richEditorFrame}>{!ready || !draftLoaded ? (@@ -6563,7 +6596,7 @@ const detailMarkdownStyles = StyleSheet.create({},});-const styles = StyleSheet.create({+const baseWorkspaceStyles = StyleSheet.create({safeArea: {backgroundColor: "#f8fafc",flex: 1,@@ -6592,8 +6625,11 @@ const styles = StyleSheet.create({justifyContent: "center",width: 36,},- settingsBackPlaceholder: {+ settingsThemeButton: {+ alignItems: "center",+ borderRadius: 8,height: 36,+ justifyContent: "center",width: 36,},settingsHeaderTitle: {@@ -7608,6 +7644,26 @@ const styles = StyleSheet.create({paddingHorizontal: 16,paddingTop: 10,},+ notebookPickerSheet: {+ maxHeight: "82%",+ paddingHorizontal: 0,+ },+ notebookPickerHeader: {+ alignItems: "center",+ borderBottomColor: "#e2e8f0",+ borderBottomWidth: 1,+ flexDirection: "row",+ justifyContent: "space-between",+ paddingBottom: 12,+ paddingHorizontal: 16,+ },+ notebookPickerHeaderText: {+ flex: 1,+ gap: 2,+ },+ notebookPickerScroll: {+ flexShrink: 1,+ },actionSheetHandle: {alignSelf: "center",backgroundColor: "#cbd5e1",@@ -7946,14 +8002,6 @@ const styles = StyleSheet.create({gap: 8,padding: 14,},- guideStep: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 6,- padding: 14,- },promptCard: {backgroundColor: "#ffffff",borderColor: "#e2e8f0",@@ -8394,3 +8442,14 @@ const styles = StyleSheet.create({fontWeight: "800",},});++let styles = baseWorkspaceStyles;+let workspaceStylesTheme: MobileResolvedTheme = "light";++const refreshWorkspaceThemeStyles = (theme: MobileResolvedTheme) => {+ if (workspaceStylesTheme === theme) {+ return;+ }+ styles = resolveMobileThemeStyles(baseWorkspaceStyles, theme);+ workspaceStylesTheme = theme;+};diff --git a/apps/web/src/i18n/resources/en-US.ts b/apps/web/src/i18n/resources/en-US.tsindex 757e9fc5..0c34ffad 100644--- a/apps/web/src/i18n/resources/en-US.ts+++ b/apps/web/src/i18n/resources/en-US.ts@@ -1,703 +1 @@-export const enUS = {- common: {- appName: "EdgeEver",- close: "Close",- cancel: "Cancel",- save: "Save",- delete: "Delete",- loading: "Loading",- back: "Go back",- language: "Language",- untitledMemo: "Untitled note",- processing: "Processing",- saving: "Saving",- copied: "Copied",- githubRepository: "GitHub repository",- },- dialogs: {- memoDelete: {- permanentBulkTitle: "Delete {{count}} notes permanently",- permanentSingleTitle: "Delete note permanently",- softBulkTitle: "Delete {{count}} notes",- softSingleTitle: "Delete note",- permanentDescription: "This action cannot be undone.",- softDescription: "Deleted notes can be restored from Trash.",- permanentConfirm: "Delete permanently",- softConfirm: "Delete",- },- notebookName: {- createTitle: "New notebook",- renameTitle: "Rename notebook",- createDescription: "Create a new notebook to organize related notes.",- renameDescription: "Changes sync to the notebook tree immediately.",- nameLabel: "Name",- namePlaceholder: "Notebook name",- createSubmit: "Create",- },- },- login: {- title: "Sign in to EdgeEver",- subtitle: "Your personal self-hosted notes workspace",- username: "Username",- password: "Password",- submitting: "Signing in...",- submit: "Open workspace",- },- nav: {- mobileMain: "Mobile primary navigation",- home: "Home",- mine: "Me",- createMemo: "New note",- createDisabled: "You cannot create a note in this view",- creating: "Creating",- },- workspace: {- inboxDeleteTitle: "Inbox cannot be deleted",- inboxDeleteDescription: "Inbox is the default notebook, so new notes always have a home.",- selection: {- pin: "Pin",- unpin: "Unpin",- chooseMemo: "Select a note",- trashCannotPin: "Notes in trash cannot be pinned",- updatingPin: "Updating pin",- trashCannotMove: "Notes in trash cannot be moved",- noMovableNotebook: "No notebook available",- moving: "Moving",- move: "Move",- needTwoMemos: "Select at least 2 notes",- trashCannotMerge: "Notes in trash cannot be merged",- merging: "Merging",- merge: "Merge notes",- deleting: "Deleting",- permanentDelete: "Delete permanently",- delete: "Delete",- },- loading: {- notebooks: "Loading notebooks",- settings: "Loading profile",- assets: "Loading resources",- tags: "Loading tags",- migration: "Loading migration guide",- editor: "Loading editor",- },- pullToRefresh: {- refreshingNotes: "Fetching latest notes",- refreshingPage: "Refreshing page",- releaseNotes: "Release to refresh",- releasePage: "Release to refresh page",- pullNotes: "Pull to refresh",- pullPage: "Pull to refresh page",- },- },- notebookPane: {- notebooks: "Notebooks",- workspaceFallback: "Edge notes workspace",- backToList: "Back to note list",- newNotebook: "New notebook",- newMemo: "New note",- entries: "Note entries",- allMemos: "All notes",- sortTitle: "Notebook sort: {{label}}",- loading: "Loading",- secondaryEntries: "Secondary entries",- profile: "Profile",- trash: "Trash",- emptyTrash: "Empty trash",- empty: "Empty",- syncNow: "Sync now",- sync: {- offlineWithPending: "Offline, {{count}} pending",- offline: "Offline",- syncing: "Syncing",- conflicts: "{{count}} sync conflicts",- retry: "{{count}} waiting to retry",- pending: "{{count}} pending",- synced: "Synced",- },- },- notebookTree: {- dragNotebook: "Move notebook “{{name}}”",- expandCollapse: "Expand/collapse",- collapse: "Collapse {{name}}",- expand: "Expand {{name}}",- current: "Current: {{name}}",- switchTo: "Switch to {{name}}",- newChild: "New child notebook",- newChildAria: "Create child notebook under {{name}}",- rename: "Rename",- renameNotebook: "Rename notebook",- renameAria: "Rename {{name}}",- deleteNotebook: "Delete notebook",- deleteAria: "Delete {{name}}",- },- settings: {- title: "Me",- subtitle: "Preferences, system info, MCP tokens, and sign-in session",- preferences: "Preferences",- languageTitle: "Interface language",- languageDescription: "Change the display language for the product UI.",- systemLanguage: "Follow system",- imageCompressionTitle: "Compress note images",- imageCompressionDescription: "Compress large images locally before upload to reduce storage use.",- imageCompressionAria: "Compress note images",- themeTitle: "Interface theme",- themeDescription: "Choose light, dark, or follow your system setting.",- themeSystem: "Follow system",- themeLight: "Light",- themeDark: "Dark",- themeToggleToDark: "Switch to dark mode",- themeToggleToLight: "Switch to light mode",- tabs: {- general: "General",- data: "Data Management",- ai: "AI Integrations",- account: "Login Settings",- },- },- systemInfo: {- title: "System info",- description: "View the current app version, build identifier, and runtime environment.",- version: "Version",- build: "Build",- browser: "Browser",- os: "System",- language: "Language",- timeZone: "Time zone",- installMode: "Mode",- standalone: "Installed app",- browserMode: "Browser",- unknown: "Unknown",- copy: "Copy info",- },- dataExport: {- title: "Import and export",- description: "One archive for openness and complete recovery: read notes directly as Markdown, or use the structured data, revision history, and attachments to migrate between EdgeEver instances.",- exportButton: "Export EdgeEver ZIP",- importButton: "Import EdgeEver ZIP",- working: "Preparing notes and attachments…",- importing: "Importing notes and attachments…",- progress: "{{completed}} / {{total}}",- complete: "Export complete. Your ZIP download has started.",- error: "Export failed. Check your connection and try again.",- importComplete: "EdgeEver ZIP imported successfully.",- importErrors: {- invalidZip: "This file cannot be extracted. It is not a valid ZIP or is damaged.",- missingManifest: "This file cannot be identified because manifest.json is missing.",- unsupportedFormat: "This archive format is not supported. Select a ZIP exported by EdgeEver.",- unsupportedVersion: "This EdgeEver ZIP requires a newer version of EdgeEver. Upgrade before importing it.",- invalidManifest: "manifest.json is invalid, so the archive version and integrity cannot be verified.",- missingData: "The archive is missing structured notebook or note data.",- invalidData: "The archive contains invalid structured data and may have been modified or damaged.",- incompleteData: "Notes or revision history are incomplete and do not match the manifest.",- incompleteResources: "Images or attachments are missing or damaged and do not match the manifest.",- serverRejected: "The server could not write the imported data: {{message}}",- network: "EdgeEver could not be reached during import. Check your connection and try again.",- unknown: "Import failed because of an unknown error. Export a new archive and try again.",- },- importConfirmTitle: "Import EdgeEver ZIP",- importConfirmDescription: "This file contains {{memos}} notes and {{resources}} resources. Other data in this instance is preserved, but matching EdgeEver IDs are overwritten.",- confirmImport: "Import",- },- shortcuts: {- title: "Keyboard shortcuts",- manage: "Manage",- description: "Set key combinations for common note actions. Press Esc to cancel recording.",- recording: "Press shortcut",- reset: "Restore defaults",- requireModifier: "Press a shortcut that includes Ctrl, ⌘, or Alt.",- conflict: "This shortcut is already used by “{{label}}”.",- actions: {- createMemo: {- label: "New note",- description: "Create a new note in the current notebook.",- },- createNotebook: {- label: "New notebook",- description: "Create a new notebook at the current level.",- },- focusSearch: {- label: "Search notes",- description: "Open search or focus search within the current note.",- },- focusReplace: {- label: "Replace text",- description: "Open replace in the current note.",- },- },- },- options: {- memoDensity: {- preview: "Preview list",- compact: "Compact list",- },- memoSort: {- updatedDesc: "Recently updated",- createdDesc: "Created time",- titleAsc: "Title A-Z",- },- notebookSort: {- nameAsc: "Name",- memoCountDesc: "Note count",- updatedDesc: "Updated date",- },- memoFilter: {- all: "All",- pinned: "Pinned",- tagged: "Tagged",- untagged: "Untagged",- },- },- mobileSheets: {- selectionCount: "{{count}} selected",- selectMemo: "Select notes",- listOptions: "List options",- displayMode: "Display mode",- sortMode: "Sort by",- tags: "Tags",- assets: "Attachments",- emptyTrash: "Empty trash",- trash: "Trash",- moveToNotebook: "Move to notebook",- searchNotebook: "Search notebooks",- noNotebookFound: "No notebooks found",- currentTarget: "Current target: {{name}}",- moveTo: "Move to {{name}}",- bulkActions: "Bulk actions",- mergeMemos: "Merge notes",- clearSelection: "Clear selection",- more: "More",- },- memoList: {- selectionCount: "{{count}} selected",- selectMemo: "Select notes",- selectedListNone: "Deselect current list",- selectedListAll: "Select current list",- noSelectableInList: "No selectable notes in the current list",- chooseNotebook: "Choose notebook",- move: "Move",- mergeMemos: "Merge notes",- permanentDelete: "Delete permanently",- clearSelection: "Clear selection",- cancelSearch: "Exit search",- searchPlaceholder: "Search notes",- clearSearch: "Clear search",- cancel: "Cancel",- switchNotebook: "Switch notebook",- bulkActions: "Bulk actions",- listOptions: "List options",- filterTitle: "Filter: {{label}}",- sortTitle: "Sort: {{label}}",- previewList: "Preview list",- compactList: "Compact list",- emptyTrashTitle: "Empty trash. This cannot be undone",- emptyTrash: "Empty",- more: "More",- moreActions: "More list actions",- tags: "Tags",- assets: "Attachments",- trash: "Trash",- currentNotebook: "Current notebook",- allNotebooks: "All notebooks",- deletedMemos: "Deleted notes",- allMemos: "All notes",- memoCount: "{{count}} notes",- deletedCount: "{{count}} deleted",- constrainedCount: "{{label}} · {{count}} notes",- searchConstraint: "Search “{{query}}”",- searchActive: "Searching",- searchResults: "{{count}} results",- filterConstraint: "Filter: {{label}}",- reset: "Reset",- fetchingLatest: "Fetching latest notes",- fetchEmptyTitle: "No notes fetched yet",- fetchEmptyDescription: "Network or PWA background recovery may have briefly interrupted sync. This is not treated as an empty notebook.",- retry: "Retry",- trashEmptyTitle: "Trash is empty",- emptyTitle: "No notes yet",- noFilteredTitle: "No notes match the filter",- trashEmptyDescription: "Deleted notes will appear here.",- emptyDescription: "Create a note first, then preview, search, and organize notes here.",- noFilteredDescription: "Try another filter or adjust your search keywords.",- newMemo: "New note",- loadingMore: "Loading more notes",- openMemo: "Open note",- unpin: "Unpin",- pinMemo: "Pin note",- restoreMemo: "Restore note",- moveToNotebook: "Move to notebook",- deleteMemo: "Delete note",- toggleOffFilter: "Cancel {{label}}",- manualSync: "Sync notes manually",- manualSyncing: "Syncing notes",- manualSyncOffline: "Cannot sync notes while offline",- },- memoCard: {- yesterday: "Yesterday",- emptyMemo: "Empty note",- select: "Select {{title}}",- unselect: "Deselect {{title}}",- dragMany: "Move {{count}} notes",- dragOne: "Move “{{title}}”",- interactionHint: "Ctrl/Cmd click to toggle selection, Shift click for range selection, drag to a notebook on the left to move, long press on mobile to select",- moreActions: "More actions",- restoreMemo: "Restore note",- deleteMemo: "Delete note",- },- assets: {- uploadNth: "Uploading file {{current}}/{{total}}...",- compressingFile: "Compressing: {{filename}}",- uploadingFile: "Uploading: {{filename}}",- title: "Attachment manager",- fileCount: "{{count}} files",- imageCount: "{{count}} images",- filters: {- all: "All",- image: "Images",- document: "Documents",- other: "Other",- },- searchPlaceholder: "Search attachment names or source notes...",- gridView: "Grid view",- listView: "List view",- activeMemo: "Current note: “{{title}}”",- unnamedMemo: "Untitled note",- unnamedShort: "Untitled",- uploadAttachment: "Upload attachment",- processing: "Processing...",- noActiveMemoHint: "Tip: open a note in the editor on the right to drag or upload new files here.",- loading: "Loading attachments...",- noMatches: "No matching attachments",- empty: "No attachments yet",- noMatchesDescription: "Try changing the search term or category filter",- emptyDescription: "Drag files here, or upload files above",- previewImage: "Preview image",- downloadOpen: "Download/open",- deletedMemo: "Deleted note",- fromMemo: "From: {{source}}",- sourceMemo: "Source note: {{source}}",- openInNewWindow: "Open in new window",- dropTitle: "Release files here",- dropDescription: "Files will be uploaded and attached to the note currently being edited:",- uploadSuccess: "Upload complete",- uploadError: "Upload failed. Please try again later",- },- tagsDialog: {- title: "Tags",- count: "{{count}} tags",- loading: "Loading",- empty: "No tags yet",- nameLabel: "Tag name",- memoCount: "{{count}} notes",- renameTitle: "Rename tag",- renameAria: "Rename tag {{name}}",- deleteTitle: "Delete tag",- deleteAria: "Delete tag {{name}}",- deleteConfirmTitle: "Delete tag #{{name}}",- deleteConfirmDescription: "This tag will be removed from {{count}} notes. Note content will not be deleted.",- deleteConfirmLabel: "Delete tag",- },- revisions: {- emptyMemo: "Empty note",- title: "Version history",- loading: "Loading",- empty: "No previous versions",- timeline: "History",- revisionName: "Revision {{revision}}",- compareTitle: "Revision {{revision}} against current content",- changedLines: "{{count}} changed lines",- noRevisionSelected: "No revision selected",- restoreVersion: "Restore this version",- historyVersion: "Historical version",- currentContent: "Current content",- restoreConfirmTitle: "Restore this historical version",- restoreConfirmDescription: "The current content will be replaced by this historical version, and a new revision will still be created.",- restoreConfirmLabel: "Restore",- },- editor: {- imageScale: "Image scale",- scaleTo: "Scale to {{percent}}%",- imageSizeSmall: "Small",- imageSizeMedium: "Medium",- imageSizeLarge: "Large",- imageSizeFull: "Full",- resizeImage: "Drag to resize image width",- currentNotebook: "Current notebook",- close: "Close",- searchNotebook: "Search notebooks",- noNotebookFound: "No notebooks found",- currentNotebookAria: "Current notebook: {{name}}",- switchToNotebook: "Switch to {{name}}",- attachmentInsertText: "Attachment: {{filename}} {{url}}",- placeholder: "Start writing...",- loading: "Loading",- emptySelection: "Select or create a note",- saveState: {- saving: "Saving",- saved: "Saved",- queued: "Queued",- conflict: "Conflict",- error: "Save failed",- unsaved: "Unsaved",- },- uploadState: {- failed: "Upload failed",- compressing: "Compressing",- uploading: "Uploading",- fileFailed: "File upload failed",- imageCompressing: "Compressing image",- fileUploading: "Uploading file",- },- notebookFallback: "Notebook",- saveAndBack: "Save and return to list",- backToList: "Back to list",- previousMemo: "Previous note",- nextMemo: "Next note",- updatedAt: "Updated {{time}}",- done: "Done",- uploadAttachment: "Upload attachment",- collapseFormat: "Collapse formatting",- format: "Format",- searchCurrentMemo: "Search current note",- replaceCurrentMemo: "Replace in current note",- versionHistory: "Version history",- save: "Save",- more: "More",- moreAria: "More note actions",- restoreMemo: "Restore note",- deleteForever: "Delete permanently",- deleteMemo: "Delete note",- notebookPlaceholder: "Current notebook",- tagPlaceholder: "Add tags, separated by commas",- searchPlaceholder: "Search in current note",- replacePlaceholder: "Replace with",- previousSearchResult: "Previous search result",- nextSearchResult: "Next search result",- replaceAll: "Replace all",- closeSearch: "Close search",- editMemo: "Edit note",- },- editorToolbar: {- toolbar: "Editor toolbar",- paragraph: "Body",- heading1: "Heading 1",- heading2: "Heading 2",- heading3: "Heading 3",- undo: "Undo",- redo: "Redo",- bold: "Bold",- italic: "Italic",- strike: "Strikethrough",- inlineCode: "Inline code",- bulletList: "Bulleted list",- orderedList: "Numbered list",- quote: "Quote",- codeBlock: "Code block",- codeLanguage: "Code language",- plainText: "Plain text",- horizontalRule: "Divider",- markdown: "Switch to Markdown source",- richText: "Switch to rich text",- markdownSource: "Markdown source",- switchToMarkdown: "Switch to Markdown mode",- switchToRichText: "Switch to rich text mode",- },- mobileNotebookPicker: {- title: "Switch notebook",- current: "Current: {{name}}",- allMemos: "All notes",- notebookFallback: "Notebook",- searchPlaceholder: "Search notebooks",- clearSearch: "Clear search",- currentAll: "Current: all notes",- switchAll: "Switch to all notes",- matchedNotebooks: "Matching notebooks",- notebooks: "Notebooks",- collapseAllAria: "Collapse all notebooks",- expandAllAria: "Expand all notebooks",- collapseAll: "Collapse all",- expandAll: "Expand all",- noSearchResult: "No results for “{{query}}”",- noNotebook: "No notebooks found",- showAll: "Show all notebooks",- collapse: "Collapse {{name}}",- expand: "Expand {{name}}",- currentNotebook: "Current: {{name}}",- switchToNotebook: "Switch to {{name}}",- },- workspaceDialogs: {- emptyTrashTitle: "Empty trash",- emptyTrashDescription: "All notes in Trash and still-linked attachments will be deleted. This action cannot be undone.",- emptyTrashConfirm: "Empty trash",- emptyTrashFailedTitle: "Couldn't empty trash",- emptyTrashFailedDescription: "Your notes have been restored to Trash. Please try again.",- deleteNotebookTitle: "Delete notebook “{{name}}”",- deleteNotebookDescription: "Clear its notes and child notebooks first. It cannot be restored from here after deletion.",- ok: "OK",- resizeMemoList: "Resize note list",- resizeMemoListHint: "Drag to resize the list column, double-click to reset, or use arrow keys for fine tuning",- },- evernoteGuide: {- title: "Evernote migration guide",- subtitle: "AI Agent powered migration that preserves notebook stack hierarchy",- },- evernoteImport: {- title: "Import Evernote",- guide: "Guide",- openGuideAria: "Open Evernote migration guide in a new tab",- description: "Review the steps for migrating from Evernote to EdgeEver. MCP and AI Agent batch import are recommended.",- },- session: {- loggingOut: "Signing out...",- logout: "Sign out",- },- users: {- title: "Members",- description: "Create isolated personal note spaces for family or team members. Public registration stays disabled.",- loading: "Loading accounts...",- create: "Add member",- creating: "Creating...",- createTitle: "Add new member",- createDescription: "The account gets isolated notes, attachments, Trash, and MCP tokens.",- username: "Username",- usernamePlaceholder: "For example: alex",- usernameExists: "That username already exists. Choose another one.",- displayName: "Display name",- displayNamePlaceholder: "Optional, for example: Alex",- password: "Initial password",- passwordPlaceholder: "Enter at least 8 characters",- passwordHint: "The member can change this password in Profile after signing in.",- newPassword: "New password (8+ characters)",- resetPassword: "Reset password",- resetTitle: "Reset password for {{username}}",- resetDescription: "Other sessions for this account will be revoked after the reset.",- enabled: "Enabled",- disabled: "Disabled",- failed: "The account operation failed. Check the input and try again.",- roles: { owner: "Instance owner", member: "Member" },- },- password: {- title: "Change password",- description: "Your current device stays signed in; other sessions will be signed out.",- currentPassword: "Current password",- newPassword: "New password",- confirmPassword: "Confirm new password",- change: "Change password",- changing: "Changing...",- changed: "Password changed successfully.",- currentPasswordIncorrect: "The current password is incorrect.",- passwordMismatch: "The new passwords do not match.",- newPasswordTooShort: "The new password must be at least 8 characters.",- changeFailed: "Unable to change the password. Please try again.",- demoReadOnly: "The demo environment uses fixed login credentials and does not allow changing the password.",- },- mcp: {- createdTitle: "API Token created",- copyToken: "Copy token",- copyConfig: "Copy full MCP config",- securityWarning: "Security reminder: this token is a sensitive credential. Do not share it publicly.",- bearerPlaceholder: "Bearer my-created-token",- title: "Generate MCP config",- example: "Example",- exampleTitle: "Remote MCP example",- copyExample: "Copy example",- scopeTitle: "Token scopes",- selectedScopes: "{{selected}}/{{total}} selected",- loadingTokens: "Loading token list...",- emptyTokens: "No API tokens",- noScope: "No scopes",- lastUsedAt: "Last used: {{time}}",- neverUsed: "Never used",- legacyTokenHint: "Plaintext cannot be recovered for old tokens. Generate a new one.",- legacyTokenCannotCopy: "Old token cannot be copied",- legacyConfigCannotCopy: "MCP config cannot be copied for old tokens",- deleteToken: "Delete token",- description: "Allow AI Agents to read and organize your notes.",- namePlaceholder: "Token name, e.g. Codex or Claude Code",- createToken: "Generate token",- activeTokens: "Token list",- deleteConfirmTitle: "Delete token “{{name}}”?",- deleteConfirmDescription: "This cannot be undone. Once deleted, all clients using this token for API or MCP calls will immediately lose access.",- deleteConfirmLabel: "Delete token",- scopes: {- "read:notebooks": "Read notebooks",- "write:notebooks": "Create and edit notebooks",- "read:memos": "Read notes",- "write:memos": "Create and edit notes",- "read:resources": "Read attachment resources",- "write:resources": "Upload and edit attachments",- "read:tags": "Read tags",- "write:tags": "Create and edit tags",- },- },- advancedPlay: {- title: "Advanced plays",- description: "Advanced workflows with AI Agents.",- copyPrompt: "Copy prompt",- prompts: {- persona: {- title: "Persona profile",- prompt: "Use EdgeEver MCP to read my notes and create a persona profile based on the real note content. Judge only from evidence in the notes, do not make psychological diagnoses, and do not exaggerate traits. Include long-term themes, work preferences, capability signals, recurring problems, recent direction, and list related note titles or memo ids after each conclusion.",- },- knowledgeMap: {- title: "Knowledge map",- prompt: "Use EdgeEver MCP to read my notes and organize a knowledge map. Identify the main knowledge areas, key concepts in each area, related notes, what I already understand, and the gaps I still need to fill. Structure the output so it is useful for continued learning and writing.",- },- tagAdvice: {- title: "Tag suggestions",- prompt: "Use EdgeEver MCP to read my notes and existing tags, then design a clearer tag system. Point out duplicate, overly narrow, overly broad, or inconsistently named tags, and suggest merges, renames, and new tags. Do not modify notes yet. Wait for my confirmation before applying changes.",- },- },- },- templates: {- title: "Templates",- description: "Choose a template to create a note instantly.",- unavailable: "Select an available notebook before creating a note.",- items: {- quickNote: {- title: "Quick note",- description: "For temporary ideas, links, and sparks.",- contentMarkdown: "## Quick note\n\n- \n\n## Next actions\n\n- [ ] ",- },- meeting: {- title: "Meeting notes",- description: "Keep agenda, decisions, and todos on one page.",- contentMarkdown: "## Meeting notes\n\nTime:\nAttendees:\n\n## Agenda\n\n- \n\n## Decisions\n\n- \n\n## Todos\n\n- [ ] ",- },- checklist: {- title: "Checklist",- description: "Quickly list tasks, shopping items, or project checks.",- contentMarkdown: "## Checklist\n\n- [ ] \n- [ ] \n- [ ] ",- },- reading: {- title: "Reading notes",- description: "Collect excerpts, ideas, and follow-up reading.",- contentMarkdown: "## Reading notes\n\nBook:\nAuthor:\n\n## Excerpts\n\n> \n\n## My thoughts\n\n\n## Follow-up questions\n\n- ",- },- daily: {- title: "Daily review",- description: "Record what you finished today and where you got stuck.",- contentMarkdown: "## Daily review\n\n## Done today\n\n- \n\n## Blockers\n\n- \n\n## Tomorrow's priorities\n\n- [ ] ",- },- },- },- pwa: {- checkingTitle: "New version found",- checkingDescription: "Applying the update. The app will refresh shortly.",- appliedTitle: "EdgeEver updated",- appliedDescription: "You are running the latest version.",- readyTitle: "New version ready",- readyDescription: "Refresh to use the latest features.",- latestWithBuild: "You are running the latest version ({{buildLabel}}).",- refreshNow: "Refresh now",- closeNotice: "Close update notice",- sidebarInstall: "Install Client",- sidebarInstallTitle: "Install EdgeEver Desktop App",- iosPrompt: {- title: "Add EdgeEver to Home Screen",- subtitle: "Enjoy full screen independent window, experience Evernote as smooth as a native app.",- step1: "Tap the Share button at the bottom of Safari browser",- step2: "Find and select 'Add to Home Screen' in the menu",- dismiss: "Got it",- },- },-} as const;+export { enUS } from "@edgeever/shared/i18n";diff --git a/apps/web/src/i18n/resources/zh-CN.ts b/apps/web/src/i18n/resources/zh-CN.tsindex 62b9a76b..38d10e3d 100644--- a/apps/web/src/i18n/resources/zh-CN.ts+++ b/apps/web/src/i18n/resources/zh-CN.ts@@ -1,703 +1 @@-export const zhCN = {- common: {- appName: "EdgeEver",- close: "关闭",- cancel: "取消",- save: "保存",- delete: "删除",- loading: "正在加载",- back: "返回上一页",- language: "语言",- untitledMemo: "无标题笔记",- processing: "处理中",- saving: "保存中",- copied: "已复制",- githubRepository: "GitHub 仓库",- },- dialogs: {- memoDelete: {- permanentBulkTitle: "永久删除 {{count}} 条笔记",- permanentSingleTitle: "永久删除笔记",- softBulkTitle: "删除 {{count}} 条笔记",- softSingleTitle: "删除笔记",- permanentDescription: "这个操作不可恢复。",- softDescription: "删除后可以在回收站恢复。",- permanentConfirm: "永久删除",- softConfirm: "删除",- },- notebookName: {- createTitle: "新建笔记本",- renameTitle: "重命名笔记本",- createDescription: "创建一个新的笔记本,用来整理相关笔记。",- renameDescription: "更新后会立即同步到笔记本树。",- nameLabel: "名称",- namePlaceholder: "笔记本名称",- createSubmit: "创建",- },- },- login: {- title: "登录 EdgeEver",- subtitle: "你的自托管笔记工作区",- username: "账号",- password: "密码",- submitting: "安全登录中...",- submit: "开启工作区",- },- nav: {- mobileMain: "移动端主导航",- home: "首页",- mine: "我的",- createMemo: "新建笔记",- createDisabled: "当前视图不可新建笔记",- creating: "正在创建",- },- workspace: {- inboxDeleteTitle: "等待分类不能删除",- inboxDeleteDescription: "等待分类是默认笔记本,用来保证新笔记始终有归属。",- selection: {- pin: "置顶",- unpin: "取消置顶",- chooseMemo: "请选择笔记",- trashCannotPin: "回收站内不可置顶",- updatingPin: "正在更新置顶",- trashCannotMove: "回收站内不可移动",- noMovableNotebook: "没有可移动的笔记本",- moving: "正在移动",- move: "移动",- needTwoMemos: "至少选择 2 条笔记",- trashCannotMerge: "回收站内不可合并",- merging: "正在合并",- merge: "合并笔记",- deleting: "正在删除",- permanentDelete: "永久删除",- delete: "删除",- },- loading: {- notebooks: "正在加载笔记本",- settings: "正在加载个人中心",- assets: "正在加载资源库",- tags: "正在加载标签",- migration: "正在加载迁移指引",- editor: "正在加载编辑器",- },- pullToRefresh: {- refreshingNotes: "正在拉取最新笔记",- refreshingPage: "正在刷新网页",- releaseNotes: "松开刷新",- releasePage: "松开刷新网页",- pullNotes: "下拉刷新",- pullPage: "下拉刷新网页",- },- },- notebookPane: {- notebooks: "笔记本",- workspaceFallback: "边缘笔记工作区",- backToList: "返回笔记列表",- newNotebook: "新建笔记本",- newMemo: "新建笔记",- entries: "笔记入口",- allMemos: "全部笔记",- sortTitle: "笔记本排序:{{label}}",- loading: "加载中",- secondaryEntries: "辅助入口",- profile: "个人中心",- trash: "回收站",- emptyTrash: "清空回收站",- empty: "清空",- syncNow: "立即同步",- sync: {- offlineWithPending: "离线,{{count}} 项待同步",- offline: "离线",- syncing: "同步中",- conflicts: "{{count}} 项同步冲突",- retry: "{{count}} 项等待重试",- pending: "{{count}} 项待同步",- synced: "已同步",- },- },- notebookTree: {- dragNotebook: "移动笔记本「{{name}}」",- expandCollapse: "展开/折叠",- collapse: "收起 {{name}}",- expand: "展开 {{name}}",- current: "当前:{{name}}",- switchTo: "切换到 {{name}}",- newChild: "新建子笔记本",- newChildAria: "在 {{name}} 下新建子笔记本",- rename: "重命名",- renameNotebook: "重命名笔记本",- renameAria: "重命名 {{name}}",- deleteNotebook: "删除笔记本",- deleteAria: "删除 {{name}}",- },- settings: {- title: "我的",- subtitle: "个人偏好、系统信息、MCP Token 与登录会话",- preferences: "偏好设置",- languageTitle: "界面语言",- languageDescription: "切换产品界面的显示语言。",- systemLanguage: "跟随系统",- imageCompressionTitle: "压缩笔记内图片",- imageCompressionDescription: "上传大图时在本地压缩,节省资源占用。",- imageCompressionAria: "是否压缩笔记内图片",- themeTitle: "界面主题",- themeDescription: "选择浅色、深色,或跟随系统设置。",- themeSystem: "跟随系统",- themeLight: "浅色",- themeDark: "深色",- themeToggleToDark: "切换到深色模式",- themeToggleToLight: "切换到浅色模式",- tabs: {- general: "常规设置",- data: "数据管理",- ai: "AI集成",- account: "登录设置",- },- },- systemInfo: {- title: "系统信息",- description: "查看当前应用版本、构建标识和运行环境。",- version: "版本号",- build: "构建",- browser: "浏览器",- os: "系统",- language: "语言",- timeZone: "时区",- installMode: "运行模式",- standalone: "已安装应用",- browserMode: "浏览器",- unknown: "未知",- copy: "复制信息",- },- dataExport: {- title: "导入与导出",- description: "一份同时兼顾开放性与完整恢复的档案:笔记可直接以 Markdown 阅读,结构化数据、历史版本和附件可用于 EdgeEver 实例间迁移。",- exportButton: "导出 EdgeEver ZIP",- importButton: "导入 EdgeEver ZIP",- working: "正在整理笔记和附件…",- importing: "正在导入笔记和附件…",- progress: "{{completed}} / {{total}}",- complete: "导出完成,ZIP 文件已开始下载。",- error: "导出失败,请检查网络连接后重试。",- importComplete: "EdgeEver ZIP 导入完成。",- importErrors: {- invalidZip: "无法解压这个文件:它不是有效的 ZIP,或文件已经损坏。",- missingManifest: "无法识别这个文件:压缩包中缺少 manifest.json。",- unsupportedFormat: "不支持这个压缩包格式:请选择由 EdgeEver 导出的 ZIP。",- unsupportedVersion: "当前版本无法导入这个 EdgeEver ZIP,请先升级 EdgeEver。",- invalidManifest: "manifest.json 内容无效,无法确认压缩包的版本和完整性。",- missingData: "压缩包缺少笔记本或笔记的结构化数据文件。",- invalidData: "压缩包中的结构化数据格式无效,可能已被修改或损坏。",- incompleteData: "压缩包中的笔记或历史版本不完整,与清单记录不一致。",- incompleteResources: "压缩包中的图片或附件缺失、损坏,与清单记录不一致。",- serverRejected: "服务器未能写入导入数据:{{message}}",- network: "导入时无法连接 EdgeEver 服务,请检查网络连接后重试。",- unknown: "导入失败,发生了无法识别的错误。请重新导出后再试。",- },- importConfirmTitle: "导入 EdgeEver ZIP",- importConfirmDescription: "文件包含 {{memos}} 篇笔记和 {{resources}} 个资源。导入会保留当前实例中的其他数据,但会覆盖相同 EdgeEver ID 的内容。",- confirmImport: "确认导入",- },- shortcuts: {- title: "绑定快捷键",- manage: "管理",- description: "为常用笔记动作设置组合键。按 Esc 可取消当前录制。",- recording: "输入组合键",- reset: "恢复默认",- requireModifier: "请按下包含 Ctrl、⌘ 或 Alt 的组合键。",- conflict: "这个组合键已用于「{{label}}」。",- actions: {- createMemo: {- label: "新建笔记",- description: "在当前笔记本中创建一条新笔记。",- },- createNotebook: {- label: "新建笔记本",- description: "在当前层级创建一个新笔记本。",- },- focusSearch: {- label: "搜索笔记",- description: "打开搜索或聚焦笔记内搜索。",- },- focusReplace: {- label: "替换文本",- description: "在当前笔记中打开替换。",- },- },- },- options: {- memoDensity: {- preview: "预览列表",- compact: "紧凑列表",- },- memoSort: {- updatedDesc: "最近更新",- createdDesc: "创建时间",- titleAsc: "标题 A-Z",- },- notebookSort: {- nameAsc: "名称",- memoCountDesc: "笔记数量",- updatedDesc: "更新日期",- },- memoFilter: {- all: "全部",- pinned: "置顶",- tagged: "有标签",- untagged: "无标签",- },- },- mobileSheets: {- selectionCount: "已选择 {{count}} 条",- selectMemo: "选择笔记",- listOptions: "列表选项",- displayMode: "显示方式",- sortMode: "排序方式",- tags: "标签",- assets: "附件",- emptyTrash: "清空回收站",- trash: "回收站",- moveToNotebook: "移动到笔记本",- searchNotebook: "搜索笔记本",- noNotebookFound: "没有找到笔记本",- currentTarget: "当前目标:{{name}}",- moveTo: "移动到 {{name}}",- bulkActions: "批量操作",- mergeMemos: "合并笔记",- clearSelection: "取消选择",- more: "更多",- },- memoList: {- selectionCount: "已选择 {{count}} 条",- selectMemo: "选择笔记",- selectedListNone: "全不选当前列表",- selectedListAll: "全选当前列表",- noSelectableInList: "当前列表没有可选择的笔记",- chooseNotebook: "选择笔记本",- move: "移动",- mergeMemos: "合并笔记",- permanentDelete: "永久删除",- clearSelection: "取消选择",- cancelSearch: "退出搜索",- searchPlaceholder: "搜索笔记",- clearSearch: "清空搜索",- cancel: "取消",- switchNotebook: "切换笔记本",- bulkActions: "批量操作",- listOptions: "列表选项",- filterTitle: "筛选:{{label}}",- sortTitle: "排序:{{label}}",- previewList: "预览列表",- compactList: "紧凑列表",- emptyTrashTitle: "清空回收站,不可恢复",- emptyTrash: "清空",- more: "更多",- moreActions: "列表更多操作",- tags: "标签",- assets: "附件",- trash: "回收站",- currentNotebook: "当前笔记本",- allNotebooks: "所有笔记本",- deletedMemos: "已删除笔记",- allMemos: "全部笔记",- memoCount: "{{count}} 条笔记",- deletedCount: "{{count}} 条已删除",- constrainedCount: "{{label}} · {{count}} 条",- searchConstraint: "搜索「{{query}}」",- searchActive: "正在搜索",- searchResults: "{{count}} 条结果",- filterConstraint: "筛选:{{label}}",- reset: "重置",- fetchingLatest: "正在拉取最新笔记",- fetchEmptyTitle: "暂时没有拉到笔记",- fetchEmptyDescription: "网络或 PWA 后台恢复可能短暂中断了同步。这里不会把它当作空笔记本。",- retry: "重新拉取",- trashEmptyTitle: "回收站为空",- emptyTitle: "暂无笔记",- noFilteredTitle: "没有符合筛选的笔记",- trashEmptyDescription: "删除的笔记会显示在这里。",- emptyDescription: "先创建一条笔记,之后可以在这里快速预览、搜索和批量整理。",- noFilteredDescription: "试试切换筛选条件,或调整搜索关键词。",- newMemo: "新建笔记",- loadingMore: "正在加载更多笔记",- openMemo: "打开笔记",- unpin: "取消置顶",- pinMemo: "置顶笔记",- restoreMemo: "恢复笔记",- moveToNotebook: "移动到笔记本",- deleteMemo: "删除笔记",- toggleOffFilter: "取消{{label}}",- manualSync: "手动同步笔记",- manualSyncing: "正在同步笔记",- manualSyncOffline: "离线时无法同步笔记",- },- memoCard: {- yesterday: "昨天",- emptyMemo: "空笔记",- select: "选择 {{title}}",- unselect: "取消选择 {{title}}",- dragMany: "移动 {{count}} 条笔记",- dragOne: "移动「{{title}}」",- interactionHint: "Ctrl/Cmd 点击切换选择,Shift 点击连续选择,可拖到左侧笔记本移动,移动端长按进入选择",- moreActions: "更多操作",- restoreMemo: "恢复笔记",- deleteMemo: "删除笔记",- },- assets: {- uploadNth: "正在上传第 {{current}}/{{total}} 个文件...",- compressingFile: "正在压缩: {{filename}}",- uploadingFile: "正在上传: {{filename}}",- title: "附件管理",- fileCount: "{{count}} 文件",- imageCount: "{{count}} 图片",- filters: {- all: "全部",- image: "图片",- document: "文档",- other: "其他",- },- searchPlaceholder: "搜索附件名或来源笔记...",- gridView: "网格视图",- listView: "列表视图",- activeMemo: "当前关联笔记:《{{title}}》",- unnamedMemo: "未命名笔记",- unnamedShort: "未命名",- uploadAttachment: "上传附件",- processing: "处理中...",- noActiveMemoHint: "提示:在右侧编辑器中打开一篇笔记,即可在此处拖放或上传新文件。",- loading: "正在加载附件列表...",- noMatches: "未找到匹配附件",- empty: "暂无附件",- noMatchesDescription: "请尝试更改搜索词或分类过滤器",- emptyDescription: "拖拽文件到这里,或在上方上传文件",- previewImage: "大图预览",- downloadOpen: "下载/打开",- deletedMemo: "已删除笔记",- fromMemo: "来自:{{source}}",- sourceMemo: "来源笔记:{{source}}",- openInNewWindow: "在新窗口打开",- dropTitle: "将文件释放于此",- dropDescription: "文件将上传并附加到当前正在编辑的笔记:",- uploadSuccess: "上传成功!",- uploadError: "上传失败,请稍后重试",- },- tagsDialog: {- title: "标签",- count: "{{count}} tags",- loading: "加载中",- empty: "暂无标签",- nameLabel: "标签名称",- memoCount: "{{count}} 条笔记",- renameTitle: "重命名标签",- renameAria: "重命名标签 {{name}}",- deleteTitle: "删除标签",- deleteAria: "删除标签 {{name}}",- deleteConfirmTitle: "删除标签 #{{name}}",- deleteConfirmDescription: "将从 {{count}} 条笔记中移除这个标签,笔记内容不会被删除。",- deleteConfirmLabel: "删除标签",- },- revisions: {- emptyMemo: "空笔记",- title: "版本历史",- loading: "加载中",- empty: "暂无历史版本",- timeline: "历史记录",- revisionName: "版本 {{revision}}",- compareTitle: "版本 {{revision}} 与当前内容",- changedLines: "{{count}} 行有变化",- noRevisionSelected: "未选择历史版本",- restoreVersion: "恢复该版本",- historyVersion: "历史版本",- currentContent: "当前内容",- restoreConfirmTitle: "恢复到这个历史版本",- restoreConfirmDescription: "当前内容会被这个历史版本替换,恢复后仍会产生新的历史记录。",- restoreConfirmLabel: "恢复",- },- editor: {- imageScale: "图片缩放",- scaleTo: "缩放到 {{percent}}%",- imageSizeSmall: "较小",- imageSizeMedium: "适中",- imageSizeLarge: "较大",- imageSizeFull: "铺满",- resizeImage: "拖拽调整图片宽度",- currentNotebook: "所在笔记本",- close: "关闭",- searchNotebook: "搜索笔记本",- noNotebookFound: "没有找到笔记本",- currentNotebookAria: "当前所在笔记本:{{name}}",- switchToNotebook: "切换到 {{name}}",- attachmentInsertText: "附件:{{filename}} {{url}}",- placeholder: "开始记录...",- loading: "加载中",- emptySelection: "选择或新建一条笔记",- saveState: {- saving: "保存中",- saved: "已保存",- queued: "待同步",- conflict: "有冲突",- error: "保存失败",- unsaved: "未保存",- },- uploadState: {- failed: "上传失败",- compressing: "压缩中",- uploading: "上传中",- fileFailed: "文件上传失败",- imageCompressing: "图片压缩中",- fileUploading: "文件上传中",- },- notebookFallback: "笔记本",- saveAndBack: "保存并返回列表",- backToList: "返回列表",- previousMemo: "上一条笔记",- nextMemo: "下一条笔记",- updatedAt: "更新于 {{time}}",- done: "完成",- uploadAttachment: "上传附件",- collapseFormat: "收起格式",- format: "格式",- searchCurrentMemo: "搜索当前笔记",- replaceCurrentMemo: "替换当前笔记",- versionHistory: "版本历史",- save: "保存",- more: "更多",- moreAria: "笔记更多操作",- restoreMemo: "恢复笔记",- deleteForever: "彻底删除",- deleteMemo: "删除笔记",- notebookPlaceholder: "所在笔记本",- tagPlaceholder: "添加标签,用逗号分隔",- searchPlaceholder: "在当前笔记内搜索",- replacePlaceholder: "替换为",- previousSearchResult: "上一个搜索结果",- nextSearchResult: "下一个搜索结果",- replaceAll: "全部替换",- closeSearch: "关闭搜索",- editMemo: "编辑笔记",- },- editorToolbar: {- toolbar: "编辑器工具栏",- paragraph: "正文",- heading1: "标题 1",- heading2: "标题 2",- heading3: "标题 3",- undo: "撤销",- redo: "重做",- bold: "加粗",- italic: "斜体",- strike: "删除线",- inlineCode: "行内代码",- bulletList: "无序列表",- orderedList: "有序列表",- quote: "引用",- codeBlock: "代码块",- codeLanguage: "代码语言",- plainText: "纯文本",- horizontalRule: "分割线",- markdown: "切换到 Markdown 源码",- richText: "切换到富文本编辑",- markdownSource: "Markdown 源码",- switchToMarkdown: "切换到 Markdown 模式",- switchToRichText: "切换到富文本模式",- },- mobileNotebookPicker: {- title: "切换笔记本",- current: "当前:{{name}}",- allMemos: "全部笔记",- notebookFallback: "笔记本",- searchPlaceholder: "搜索笔记本",- clearSearch: "清空搜索",- currentAll: "当前:全部笔记",- switchAll: "切换到全部笔记",- matchedNotebooks: "匹配的笔记本",- notebooks: "笔记本",- collapseAllAria: "收起全部笔记本",- expandAllAria: "展开全部笔记本",- collapseAll: "收起全部",- expandAll: "展开全部",- noSearchResult: "没有找到「{{query}}」",- noNotebook: "没有找到笔记本",- showAll: "显示全部笔记本",- collapse: "收起 {{name}}",- expand: "展开 {{name}}",- currentNotebook: "当前:{{name}}",- switchToNotebook: "切换到 {{name}}",- },- workspaceDialogs: {- emptyTrashTitle: "清空回收站",- emptyTrashDescription: "回收站中的全部笔记和仍关联的附件都会删除,这个操作不可恢复。",- emptyTrashConfirm: "清空回收站",- emptyTrashFailedTitle: "清空回收站失败",- emptyTrashFailedDescription: "笔记已恢复到回收站,请稍后重试。",- deleteNotebookTitle: "删除笔记本「{{name}}」",- deleteNotebookDescription: "请先清空其中的笔记和子笔记本。删除后无法从这里恢复。",- ok: "知道了",- resizeMemoList: "调整笔记列表宽度",- resizeMemoListHint: "拖拽调整列表栏宽度,双击恢复默认,方向键微调",- },- evernoteGuide: {- title: "印象笔记迁移指引",- subtitle: "AI Agent 驱动一键迁移,无损保留笔记本组结构",- },- evernoteImport: {- title: "导入印象笔记",- guide: "操作指引",- openGuideAria: "在新标签页打开印象笔记迁移操作指引",- description: "查看从印象笔记迁移到 EdgeEver 的步骤,推荐使用 MCP 与 AI Agent 批量导入。",- },- session: {- loggingOut: "安全退出中...",- logout: "退出登录",- },- users: {- title: "成员管理",- description: "为家人或团队成员创建独立的个人笔记空间。实例不开放公开注册。",- loading: "正在加载账号...",- create: "添加成员",- creating: "正在创建...",- createTitle: "添加新成员",- createDescription: "新账号会获得完全独立的笔记、附件、回收站和 MCP Token。",- username: "用户名",- usernamePlaceholder: "例如:xiaoming",- usernameExists: "这个登录账号已经存在,请换一个名称。",- displayName: "显示名称",- displayNamePlaceholder: "选填,例如:小明",- password: "初始密码",- passwordPlaceholder: "请输入至少 8 位密码",- passwordHint: "成员首次登录后可以在个人中心修改密码。",- newPassword: "新密码(至少 8 位)",- resetPassword: "重置密码",- resetTitle: "重置 {{username}} 的密码",- resetDescription: "重置后,该账号在其他设备上的登录会话将失效。",- enabled: "已启用",- disabled: "已停用",- failed: "账号操作失败,请检查输入后重试。",- roles: { owner: "实例管理员", member: "成员" },- },- password: {- title: "修改密码",- description: "修改后会保留当前设备登录,并退出其他设备上的登录会话。",- currentPassword: "当前密码",- newPassword: "新密码",- confirmPassword: "确认新密码",- change: "修改密码",- changing: "修改中...",- changed: "密码已修改成功。",- currentPasswordIncorrect: "当前密码不正确。",- passwordMismatch: "两次输入的新密码不一致。",- newPasswordTooShort: "新密码至少需要 8 个字符。",- changeFailed: "密码修改失败,请稍后重试。",- demoReadOnly: "Demo 环境使用固定登录凭据,无法修改登录密码。",- },- mcp: {- createdTitle: "API Token 已成功生成",- copyToken: "复制 Token",- copyConfig: "复制完整 MCP 配置",- securityWarning: "安全提醒:此 Token 属于高危凭证,请勿对外泄露。",- bearerPlaceholder: "Bearer 我创建的token",- title: "生成 MCP 配置",- example: "使用示例",- exampleTitle: "Remote MCP 示例",- copyExample: "复制示例",- scopeTitle: "Token 权限范围",- selectedScopes: "已选择 {{selected}}/{{total}}",- loadingTokens: "正在加载 Token 列表...",- emptyTokens: "暂无 API Token",- noScope: "无权限",- lastUsedAt: "上次调用时间:{{time}}",- neverUsed: "从未被调用",- legacyTokenHint: "旧 Token 无法找回明文,请重新生成",- legacyTokenCannotCopy: "旧 Token 无法复制",- legacyConfigCannotCopy: "旧 Token 无法复制 MCP 配置",- deleteToken: "删除 Token",- description: "让 AI Agent 可以读取和整理你的笔记。",- namePlaceholder: "Token 名称,例如:Codex 或 Claude Code",- createToken: "生成 Token",- activeTokens: "Token 列表",- deleteConfirmTitle: "确定要删除 Token「{{name}}」吗?",- deleteConfirmDescription: "删除操作不可逆。一旦删除,使用此 Token 进行 API 或 MCP 调用的一切客户端将立即失效并被拒绝访问。",- deleteConfirmLabel: "确认删除",- scopes: {- "read:notebooks": "读取笔记本",- "write:notebooks": "创建与修改笔记本",- "read:memos": "读取笔记",- "write:memos": "创建与修改笔记",- "read:resources": "读取附件资源",- "write:resources": "上传与修改附件",- "read:tags": "读取标签",- "write:tags": "创建与修改标签",- },- },- advancedPlay: {- title: "进阶玩法",- description: "搭配 AI Agent 的进阶玩法。",- copyPrompt: "复制 Prompt",- prompts: {- persona: {- title: "人物画像",- prompt: "请通过 EdgeEver MCP 读取我的笔记,基于真实笔记内容为我整理一份人物画像。请只根据笔记中的证据判断,不要做心理诊断,不要夸张定性。输出包括:长期关注的主题、做事偏好、能力线索、反复出现的问题、近期动向,并在每条结论后列出相关笔记标题或 memo id。",- },- knowledgeMap: {- title: "知识图谱",- prompt: "请通过 EdgeEver MCP 读取我的笔记,为我整理一份知识地图。请找出主要知识领域、每个领域下的关键概念、相关笔记、我已经掌握的部分和还需要补齐的问题。输出结构要适合后续继续学习和写作。",- },- tagAdvice: {- title: "标签建议",- prompt: "请通过 EdgeEver MCP 读取我的笔记和现有标签,帮我设计一套更清晰的标签体系。请指出重复、过细、过宽或命名不一致的标签,并给出合并、重命名和新增标签建议。先不要修改笔记,等我确认后再执行。",- },- },- },- templates: {- title: "模板",- description: "选择一个模板,直接创建新笔记。",- unavailable: "当前无法创建笔记,请先选择可用笔记本。",- items: {- quickNote: {- title: "速记",- description: "适合临时记录想法、链接和灵感。",- contentMarkdown: "## 速记\n\n- \n\n## 后续动作\n\n- [ ] ",- },- meeting: {- title: "会议记录",- description: "议题、结论和待办放在同一页。",- contentMarkdown: "## 会议记录\n\n时间:\n参与人:\n\n## 议题\n\n- \n\n## 结论\n\n- \n\n## 待办\n\n- [ ] ",- },- checklist: {- title: "清单",- description: "快速列出待办、采购、项目检查项。",- contentMarkdown: "## 清单\n\n- [ ] \n- [ ] \n- [ ] ",- },- reading: {- title: "读书笔记",- description: "摘录、观点和下一步阅读整理。",- contentMarkdown: "## 读书笔记\n\n书名:\n作者:\n\n## 摘录\n\n> \n\n## 我的观点\n\n\n## 延伸问题\n\n- ",- },- daily: {- title: "每日复盘",- description: "记录今天完成了什么、卡在哪里。",- contentMarkdown: "## 每日复盘\n\n## 今天完成\n\n- \n\n## 遇到的问题\n\n- \n\n## 明天优先级\n\n- [ ] ",- },- },- },- pwa: {- checkingTitle: "发现新版本",- checkingDescription: "正在应用更新,稍后会自动刷新。",- appliedTitle: "EdgeEver 已更新",- appliedDescription: "当前应用已是最新版本。",- readyTitle: "新版本已就绪",- readyDescription: "刷新后即可使用最新功能。",- latestWithBuild: "当前应用已是最新版本({{buildLabel}})。",- refreshNow: "立即刷新",- closeNotice: "关闭更新通知",- sidebarInstall: "安装桌面客户端",- sidebarInstallTitle: "安装 EdgeEver 桌面端",- iosPrompt: {- title: "将 EdgeEver 安装到主屏幕",- subtitle: "享受全屏独立窗口,体验如原生 App 般丝滑的印象笔记。",- step1: "点击 Safari 浏览器底部的分享按钮",- step2: "在菜单中找到并选择「添加到主屏幕」",- dismiss: "我知道了",- },- },-} as const;+export { zhCN } from "@edgeever/shared/i18n";diff --git a/packages/shared/package.json b/packages/shared/package.jsonindex 5d072270..7db12640 100644--- a/packages/shared/package.json+++ b/packages/shared/package.json@@ -4,7 +4,8 @@"private": true,"type": "module","exports": {- ".": "./src/index.ts"+ ".": "./src/index.ts",+ "./i18n": "./src/i18n/index.ts"},"types": "./src/index.ts","dependencies": {diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsnew file mode 100644index 00000000..b8bebfba--- /dev/null+++ b/packages/shared/src/i18n/en-US.ts@@ -0,0 +1,704 @@+// Shared by the PWA and native mobile clients.+export const enUS = {+ common: {+ appName: "EdgeEver",+ close: "Close",+ cancel: "Cancel",+ save: "Save",+ delete: "Delete",+ loading: "Loading",+ back: "Go back",+ language: "Language",+ untitledMemo: "Untitled note",+ processing: "Processing",+ saving: "Saving",+ copied: "Copied",+ githubRepository: "GitHub repository",+ },+ dialogs: {+ memoDelete: {+ permanentBulkTitle: "Delete {{count}} notes permanently",+ permanentSingleTitle: "Delete note permanently",+ softBulkTitle: "Delete {{count}} notes",+ softSingleTitle: "Delete note",+ permanentDescription: "This action cannot be undone.",+ softDescription: "Deleted notes can be restored from Trash.",+ permanentConfirm: "Delete permanently",+ softConfirm: "Delete",+ },+ notebookName: {+ createTitle: "New notebook",+ renameTitle: "Rename notebook",+ createDescription: "Create a new notebook to organize related notes.",+ renameDescription: "Changes sync to the notebook tree immediately.",+ nameLabel: "Name",+ namePlaceholder: "Notebook name",+ createSubmit: "Create",+ },+ },+ login: {+ title: "Sign in to EdgeEver",+ subtitle: "Your personal self-hosted notes workspace",+ username: "Username",+ password: "Password",+ submitting: "Signing in...",+ submit: "Open workspace",+ },+ nav: {+ mobileMain: "Mobile primary navigation",+ home: "Home",+ mine: "Me",+ createMemo: "New note",+ createDisabled: "You cannot create a note in this view",+ creating: "Creating",+ },+ workspace: {+ inboxDeleteTitle: "Inbox cannot be deleted",+ inboxDeleteDescription: "Inbox is the default notebook, so new notes always have a home.",+ selection: {+ pin: "Pin",+ unpin: "Unpin",+ chooseMemo: "Select a note",+ trashCannotPin: "Notes in trash cannot be pinned",+ updatingPin: "Updating pin",+ trashCannotMove: "Notes in trash cannot be moved",+ noMovableNotebook: "No notebook available",+ moving: "Moving",+ move: "Move",+ needTwoMemos: "Select at least 2 notes",+ trashCannotMerge: "Notes in trash cannot be merged",+ merging: "Merging",+ merge: "Merge notes",+ deleting: "Deleting",+ permanentDelete: "Delete permanently",+ delete: "Delete",+ },+ loading: {+ notebooks: "Loading notebooks",+ settings: "Loading profile",+ assets: "Loading resources",+ tags: "Loading tags",+ migration: "Loading migration guide",+ editor: "Loading editor",+ },+ pullToRefresh: {+ refreshingNotes: "Fetching latest notes",+ refreshingPage: "Refreshing page",+ releaseNotes: "Release to refresh",+ releasePage: "Release to refresh page",+ pullNotes: "Pull to refresh",+ pullPage: "Pull to refresh page",+ },+ },+ notebookPane: {+ notebooks: "Notebooks",+ workspaceFallback: "Edge notes workspace",+ backToList: "Back to note list",+ newNotebook: "New notebook",+ newMemo: "New note",+ entries: "Note entries",+ allMemos: "All notes",+ sortTitle: "Notebook sort: {{label}}",+ loading: "Loading",+ secondaryEntries: "Secondary entries",+ profile: "Profile",+ trash: "Trash",+ emptyTrash: "Empty trash",+ empty: "Empty",+ syncNow: "Sync now",+ sync: {+ offlineWithPending: "Offline, {{count}} pending",+ offline: "Offline",+ syncing: "Syncing",+ conflicts: "{{count}} sync conflicts",+ retry: "{{count}} waiting to retry",+ pending: "{{count}} pending",+ synced: "Synced",+ },+ },+ notebookTree: {+ dragNotebook: "Move notebook “{{name}}”",+ expandCollapse: "Expand/collapse",+ collapse: "Collapse {{name}}",+ expand: "Expand {{name}}",+ current: "Current: {{name}}",+ switchTo: "Switch to {{name}}",+ newChild: "New child notebook",+ newChildAria: "Create child notebook under {{name}}",+ rename: "Rename",+ renameNotebook: "Rename notebook",+ renameAria: "Rename {{name}}",+ deleteNotebook: "Delete notebook",+ deleteAria: "Delete {{name}}",+ },+ settings: {+ title: "Me",+ subtitle: "Preferences, system info, MCP tokens, and sign-in session",+ preferences: "Preferences",+ languageTitle: "Interface language",+ languageDescription: "Change the display language for the product UI.",+ systemLanguage: "Follow system",+ imageCompressionTitle: "Compress note images",+ imageCompressionDescription: "Compress large images locally before upload to reduce storage use.",+ imageCompressionAria: "Compress note images",+ themeTitle: "Interface theme",+ themeDescription: "Choose light, dark, or follow your system setting.",+ themeSystem: "Follow system",+ themeLight: "Light",+ themeDark: "Dark",+ themeToggleToDark: "Switch to dark mode",+ themeToggleToLight: "Switch to light mode",+ tabs: {+ general: "General",+ data: "Data Management",+ ai: "AI Integrations",+ account: "Login Settings",+ },+ },+ systemInfo: {+ title: "System info",+ description: "View the current app version, build identifier, and runtime environment.",+ version: "Version",+ build: "Build",+ browser: "Browser",+ os: "System",+ language: "Language",+ timeZone: "Time zone",+ installMode: "Mode",+ standalone: "Installed app",+ browserMode: "Browser",+ unknown: "Unknown",+ copy: "Copy info",+ },+ dataExport: {+ title: "Import and export",+ description: "One archive for openness and complete recovery: read notes directly as Markdown, or use the structured data, revision history, and attachments to migrate between EdgeEver instances.",+ exportButton: "Export EdgeEver ZIP",+ importButton: "Import EdgeEver ZIP",+ working: "Preparing notes and attachments…",+ importing: "Importing notes and attachments…",+ progress: "{{completed}} / {{total}}",+ complete: "Export complete. Your ZIP download has started.",+ error: "Export failed. Check your connection and try again.",+ importComplete: "EdgeEver ZIP imported successfully.",+ importErrors: {+ invalidZip: "This file cannot be extracted. It is not a valid ZIP or is damaged.",+ missingManifest: "This file cannot be identified because manifest.json is missing.",+ unsupportedFormat: "This archive format is not supported. Select a ZIP exported by EdgeEver.",+ unsupportedVersion: "This EdgeEver ZIP requires a newer version of EdgeEver. Upgrade before importing it.",+ invalidManifest: "manifest.json is invalid, so the archive version and integrity cannot be verified.",+ missingData: "The archive is missing structured notebook or note data.",+ invalidData: "The archive contains invalid structured data and may have been modified or damaged.",+ incompleteData: "Notes or revision history are incomplete and do not match the manifest.",+ incompleteResources: "Images or attachments are missing or damaged and do not match the manifest.",+ serverRejected: "The server could not write the imported data: {{message}}",+ network: "EdgeEver could not be reached during import. Check your connection and try again.",+ unknown: "Import failed because of an unknown error. Export a new archive and try again.",+ },+ importConfirmTitle: "Import EdgeEver ZIP",+ importConfirmDescription: "This file contains {{memos}} notes and {{resources}} resources. Other data in this instance is preserved, but matching EdgeEver IDs are overwritten.",+ confirmImport: "Import",+ },+ shortcuts: {+ title: "Keyboard shortcuts",+ manage: "Manage",+ description: "Set key combinations for common note actions. Press Esc to cancel recording.",+ recording: "Press shortcut",+ reset: "Restore defaults",+ requireModifier: "Press a shortcut that includes Ctrl, ⌘, or Alt.",+ conflict: "This shortcut is already used by “{{label}}”.",+ actions: {+ createMemo: {+ label: "New note",+ description: "Create a new note in the current notebook.",+ },+ createNotebook: {+ label: "New notebook",+ description: "Create a new notebook at the current level.",+ },+ focusSearch: {+ label: "Search notes",+ description: "Open search or focus search within the current note.",+ },+ focusReplace: {+ label: "Replace text",+ description: "Open replace in the current note.",+ },+ },+ },+ options: {+ memoDensity: {+ preview: "Preview list",+ compact: "Compact list",+ },+ memoSort: {+ updatedDesc: "Recently updated",+ createdDesc: "Created time",+ titleAsc: "Title A-Z",+ },+ notebookSort: {+ nameAsc: "Name",+ memoCountDesc: "Note count",+ updatedDesc: "Updated date",+ },+ memoFilter: {+ all: "All",+ pinned: "Pinned",+ tagged: "Tagged",+ untagged: "Untagged",+ },+ },+ mobileSheets: {+ selectionCount: "{{count}} selected",+ selectMemo: "Select notes",+ listOptions: "List options",+ displayMode: "Display mode",+ sortMode: "Sort by",+ tags: "Tags",+ assets: "Attachments",+ emptyTrash: "Empty trash",+ trash: "Trash",+ moveToNotebook: "Move to notebook",+ searchNotebook: "Search notebooks",+ noNotebookFound: "No notebooks found",+ currentTarget: "Current target: {{name}}",+ moveTo: "Move to {{name}}",+ bulkActions: "Bulk actions",+ mergeMemos: "Merge notes",+ clearSelection: "Clear selection",+ more: "More",+ },+ memoList: {+ selectionCount: "{{count}} selected",+ selectMemo: "Select notes",+ selectedListNone: "Deselect current list",+ selectedListAll: "Select current list",+ noSelectableInList: "No selectable notes in the current list",+ chooseNotebook: "Choose notebook",+ move: "Move",+ mergeMemos: "Merge notes",+ permanentDelete: "Delete permanently",+ clearSelection: "Clear selection",+ cancelSearch: "Exit search",+ searchPlaceholder: "Search notes",+ clearSearch: "Clear search",+ cancel: "Cancel",+ switchNotebook: "Switch notebook",+ bulkActions: "Bulk actions",+ listOptions: "List options",+ filterTitle: "Filter: {{label}}",+ sortTitle: "Sort: {{label}}",+ previewList: "Preview list",+ compactList: "Compact list",+ emptyTrashTitle: "Empty trash. This cannot be undone",+ emptyTrash: "Empty",+ more: "More",+ moreActions: "More list actions",+ tags: "Tags",+ assets: "Attachments",+ trash: "Trash",+ currentNotebook: "Current notebook",+ allNotebooks: "All notebooks",+ deletedMemos: "Deleted notes",+ allMemos: "All notes",+ memoCount: "{{count}} notes",+ deletedCount: "{{count}} deleted",+ constrainedCount: "{{label}} · {{count}} notes",+ searchConstraint: "Search “{{query}}”",+ searchActive: "Searching",+ searchResults: "{{count}} results",+ filterConstraint: "Filter: {{label}}",+ reset: "Reset",+ fetchingLatest: "Fetching latest notes",+ fetchEmptyTitle: "No notes fetched yet",+ fetchEmptyDescription: "Network or PWA background recovery may have briefly interrupted sync. This is not treated as an empty notebook.",+ retry: "Retry",+ trashEmptyTitle: "Trash is empty",+ emptyTitle: "No notes yet",+ noFilteredTitle: "No notes match the filter",+ trashEmptyDescription: "Deleted notes will appear here.",+ emptyDescription: "Create a note first, then preview, search, and organize notes here.",+ noFilteredDescription: "Try another filter or adjust your search keywords.",+ newMemo: "New note",+ loadingMore: "Loading more notes",+ openMemo: "Open note",+ unpin: "Unpin",+ pinMemo: "Pin note",+ restoreMemo: "Restore note",+ moveToNotebook: "Move to notebook",+ deleteMemo: "Delete note",+ toggleOffFilter: "Cancel {{label}}",+ manualSync: "Sync notes manually",+ manualSyncing: "Syncing notes",+ manualSyncOffline: "Cannot sync notes while offline",+ },+ memoCard: {+ yesterday: "Yesterday",+ emptyMemo: "Empty note",+ select: "Select {{title}}",+ unselect: "Deselect {{title}}",+ dragMany: "Move {{count}} notes",+ dragOne: "Move “{{title}}”",+ interactionHint: "Ctrl/Cmd click to toggle selection, Shift click for range selection, drag to a notebook on the left to move, long press on mobile to select",+ moreActions: "More actions",+ restoreMemo: "Restore note",+ deleteMemo: "Delete note",+ },+ assets: {+ uploadNth: "Uploading file {{current}}/{{total}}...",+ compressingFile: "Compressing: {{filename}}",+ uploadingFile: "Uploading: {{filename}}",+ title: "Attachment manager",+ fileCount: "{{count}} files",+ imageCount: "{{count}} images",+ filters: {+ all: "All",+ image: "Images",+ document: "Documents",+ other: "Other",+ },+ searchPlaceholder: "Search attachment names or source notes...",+ gridView: "Grid view",+ listView: "List view",+ activeMemo: "Current note: “{{title}}”",+ unnamedMemo: "Untitled note",+ unnamedShort: "Untitled",+ uploadAttachment: "Upload attachment",+ processing: "Processing...",+ noActiveMemoHint: "Tip: open a note in the editor on the right to drag or upload new files here.",+ loading: "Loading attachments...",+ noMatches: "No matching attachments",+ empty: "No attachments yet",+ noMatchesDescription: "Try changing the search term or category filter",+ emptyDescription: "Drag files here, or upload files above",+ previewImage: "Preview image",+ downloadOpen: "Download/open",+ deletedMemo: "Deleted note",+ fromMemo: "From: {{source}}",+ sourceMemo: "Source note: {{source}}",+ openInNewWindow: "Open in new window",+ dropTitle: "Release files here",+ dropDescription: "Files will be uploaded and attached to the note currently being edited:",+ uploadSuccess: "Upload complete",+ uploadError: "Upload failed. Please try again later",+ },+ tagsDialog: {+ title: "Tags",+ count: "{{count}} tags",+ loading: "Loading",+ empty: "No tags yet",+ nameLabel: "Tag name",+ memoCount: "{{count}} notes",+ renameTitle: "Rename tag",+ renameAria: "Rename tag {{name}}",+ deleteTitle: "Delete tag",+ deleteAria: "Delete tag {{name}}",+ deleteConfirmTitle: "Delete tag #{{name}}",+ deleteConfirmDescription: "This tag will be removed from {{count}} notes. Note content will not be deleted.",+ deleteConfirmLabel: "Delete tag",+ },+ revisions: {+ emptyMemo: "Empty note",+ title: "Version history",+ loading: "Loading",+ empty: "No previous versions",+ timeline: "History",+ revisionName: "Revision {{revision}}",+ compareTitle: "Revision {{revision}} against current content",+ changedLines: "{{count}} changed lines",+ noRevisionSelected: "No revision selected",+ restoreVersion: "Restore this version",+ historyVersion: "Historical version",+ currentContent: "Current content",+ restoreConfirmTitle: "Restore this historical version",+ restoreConfirmDescription: "The current content will be replaced by this historical version, and a new revision will still be created.",+ restoreConfirmLabel: "Restore",+ },+ editor: {+ imageScale: "Image scale",+ scaleTo: "Scale to {{percent}}%",+ imageSizeSmall: "Small",+ imageSizeMedium: "Medium",+ imageSizeLarge: "Large",+ imageSizeFull: "Full",+ resizeImage: "Drag to resize image width",+ currentNotebook: "Current notebook",+ close: "Close",+ searchNotebook: "Search notebooks",+ noNotebookFound: "No notebooks found",+ currentNotebookAria: "Current notebook: {{name}}",+ switchToNotebook: "Switch to {{name}}",+ attachmentInsertText: "Attachment: {{filename}} {{url}}",+ placeholder: "Start writing...",+ loading: "Loading",+ emptySelection: "Select or create a note",+ saveState: {+ saving: "Saving",+ saved: "Saved",+ queued: "Queued",+ conflict: "Conflict",+ error: "Save failed",+ unsaved: "Unsaved",+ },+ uploadState: {+ failed: "Upload failed",+ compressing: "Compressing",+ uploading: "Uploading",+ fileFailed: "File upload failed",+ imageCompressing: "Compressing image",+ fileUploading: "Uploading file",+ },+ notebookFallback: "Notebook",+ saveAndBack: "Save and return to list",+ backToList: "Back to list",+ previousMemo: "Previous note",+ nextMemo: "Next note",+ updatedAt: "Updated {{time}}",+ done: "Done",+ uploadAttachment: "Upload attachment",+ collapseFormat: "Collapse formatting",+ format: "Format",+ searchCurrentMemo: "Search current note",+ replaceCurrentMemo: "Replace in current note",+ versionHistory: "Version history",+ save: "Save",+ more: "More",+ moreAria: "More note actions",+ restoreMemo: "Restore note",+ deleteForever: "Delete permanently",+ deleteMemo: "Delete note",+ notebookPlaceholder: "Current notebook",+ tagPlaceholder: "Add tags, separated by commas",+ searchPlaceholder: "Search in current note",+ replacePlaceholder: "Replace with",+ previousSearchResult: "Previous search result",+ nextSearchResult: "Next search result",+ replaceAll: "Replace all",+ closeSearch: "Close search",+ editMemo: "Edit note",+ },+ editorToolbar: {+ toolbar: "Editor toolbar",+ paragraph: "Body",+ heading1: "Heading 1",+ heading2: "Heading 2",+ heading3: "Heading 3",+ undo: "Undo",+ redo: "Redo",+ bold: "Bold",+ italic: "Italic",+ strike: "Strikethrough",+ inlineCode: "Inline code",+ bulletList: "Bulleted list",+ orderedList: "Numbered list",+ quote: "Quote",+ codeBlock: "Code block",+ codeLanguage: "Code language",+ plainText: "Plain text",+ horizontalRule: "Divider",+ markdown: "Switch to Markdown source",+ richText: "Switch to rich text",+ markdownSource: "Markdown source",+ switchToMarkdown: "Switch to Markdown mode",+ switchToRichText: "Switch to rich text mode",+ },+ mobileNotebookPicker: {+ title: "Switch notebook",+ current: "Current: {{name}}",+ allMemos: "All notes",+ notebookFallback: "Notebook",+ searchPlaceholder: "Search notebooks",+ clearSearch: "Clear search",+ currentAll: "Current: all notes",+ switchAll: "Switch to all notes",+ matchedNotebooks: "Matching notebooks",+ notebooks: "Notebooks",+ collapseAllAria: "Collapse all notebooks",+ expandAllAria: "Expand all notebooks",+ collapseAll: "Collapse all",+ expandAll: "Expand all",+ noSearchResult: "No results for “{{query}}”",+ noNotebook: "No notebooks found",+ showAll: "Show all notebooks",+ collapse: "Collapse {{name}}",+ expand: "Expand {{name}}",+ currentNotebook: "Current: {{name}}",+ switchToNotebook: "Switch to {{name}}",+ },+ workspaceDialogs: {+ emptyTrashTitle: "Empty trash",+ emptyTrashDescription: "All notes in Trash and still-linked attachments will be deleted. This action cannot be undone.",+ emptyTrashConfirm: "Empty trash",+ emptyTrashFailedTitle: "Couldn't empty trash",+ emptyTrashFailedDescription: "Your notes have been restored to Trash. Please try again.",+ deleteNotebookTitle: "Delete notebook “{{name}}”",+ deleteNotebookDescription: "Clear its notes and child notebooks first. It cannot be restored from here after deletion.",+ ok: "OK",+ resizeMemoList: "Resize note list",+ resizeMemoListHint: "Drag to resize the list column, double-click to reset, or use arrow keys for fine tuning",+ },+ evernoteGuide: {+ title: "Evernote migration guide",+ subtitle: "AI Agent powered migration that preserves notebook stack hierarchy",+ },+ evernoteImport: {+ title: "Import Evernote",+ guide: "Guide",+ openGuideAria: "Open Evernote migration guide in a new tab",+ description: "Review the steps for migrating from Evernote to EdgeEver. MCP and AI Agent batch import are recommended.",+ },+ session: {+ loggingOut: "Signing out...",+ logout: "Sign out",+ },+ users: {+ title: "Members",+ description: "Create isolated personal note spaces for family or team members. Public registration stays disabled.",+ loading: "Loading accounts...",+ create: "Add member",+ creating: "Creating...",+ createTitle: "Add new member",+ createDescription: "The account gets isolated notes, attachments, Trash, and MCP tokens.",+ username: "Username",+ usernamePlaceholder: "For example: alex",+ usernameExists: "That username already exists. Choose another one.",+ displayName: "Display name",+ displayNamePlaceholder: "Optional, for example: Alex",+ password: "Initial password",+ passwordPlaceholder: "Enter at least 8 characters",+ passwordHint: "The member can change this password in Profile after signing in.",+ newPassword: "New password (8+ characters)",+ resetPassword: "Reset password",+ resetTitle: "Reset password for {{username}}",+ resetDescription: "Other sessions for this account will be revoked after the reset.",+ enabled: "Enabled",+ disabled: "Disabled",+ failed: "The account operation failed. Check the input and try again.",+ roles: { owner: "Instance owner", member: "Member" },+ },+ password: {+ title: "Change password",+ description: "Your current device stays signed in; other sessions will be signed out.",+ currentPassword: "Current password",+ newPassword: "New password",+ confirmPassword: "Confirm new password",+ change: "Change password",+ changing: "Changing...",+ changed: "Password changed successfully.",+ currentPasswordIncorrect: "The current password is incorrect.",+ passwordMismatch: "The new passwords do not match.",+ newPasswordTooShort: "The new password must be at least 8 characters.",+ changeFailed: "Unable to change the password. Please try again.",+ demoReadOnly: "The demo environment uses fixed login credentials and does not allow changing the password.",+ },+ mcp: {+ createdTitle: "API Token created",+ copyToken: "Copy token",+ copyConfig: "Copy full MCP config",+ securityWarning: "Security reminder: this token is a sensitive credential. Do not share it publicly.",+ bearerPlaceholder: "Bearer my-created-token",+ title: "Generate MCP config",+ example: "Example",+ exampleTitle: "Remote MCP example",+ copyExample: "Copy example",+ scopeTitle: "Token scopes",+ selectedScopes: "{{selected}}/{{total}} selected",+ loadingTokens: "Loading token list...",+ emptyTokens: "No API tokens",+ noScope: "No scopes",+ lastUsedAt: "Last used: {{time}}",+ neverUsed: "Never used",+ legacyTokenHint: "Plaintext cannot be recovered for old tokens. Generate a new one.",+ legacyTokenCannotCopy: "Old token cannot be copied",+ legacyConfigCannotCopy: "MCP config cannot be copied for old tokens",+ deleteToken: "Delete token",+ description: "Allow AI Agents to read and organize your notes.",+ namePlaceholder: "Token name, e.g. Codex or Claude Code",+ createToken: "Generate token",+ activeTokens: "Token list",+ deleteConfirmTitle: "Delete token “{{name}}”?",+ deleteConfirmDescription: "This cannot be undone. Once deleted, all clients using this token for API or MCP calls will immediately lose access.",+ deleteConfirmLabel: "Delete token",+ scopes: {+ "read:notebooks": "Read notebooks",+ "write:notebooks": "Create and edit notebooks",+ "read:memos": "Read notes",+ "write:memos": "Create and edit notes",+ "read:resources": "Read attachment resources",+ "write:resources": "Upload and edit attachments",+ "read:tags": "Read tags",+ "write:tags": "Create and edit tags",+ },+ },+ advancedPlay: {+ title: "Advanced plays",+ description: "Advanced workflows with AI Agents.",+ copyPrompt: "Copy prompt",+ prompts: {+ persona: {+ title: "Persona profile",+ prompt: "Use EdgeEver MCP to read my notes and create a persona profile based on the real note content. Judge only from evidence in the notes, do not make psychological diagnoses, and do not exaggerate traits. Include long-term themes, work preferences, capability signals, recurring problems, recent direction, and list related note titles or memo ids after each conclusion.",+ },+ knowledgeMap: {+ title: "Knowledge map",+ prompt: "Use EdgeEver MCP to read my notes and organize a knowledge map. Identify the main knowledge areas, key concepts in each area, related notes, what I already understand, and the gaps I still need to fill. Structure the output so it is useful for continued learning and writing.",+ },+ tagAdvice: {+ title: "Tag suggestions",+ prompt: "Use EdgeEver MCP to read my notes and existing tags, then design a clearer tag system. Point out duplicate, overly narrow, overly broad, or inconsistently named tags, and suggest merges, renames, and new tags. Do not modify notes yet. Wait for my confirmation before applying changes.",+ },+ },+ },+ templates: {+ title: "Templates",+ description: "Choose a template to create a note instantly.",+ unavailable: "Select an available notebook before creating a note.",+ items: {+ quickNote: {+ title: "Quick note",+ description: "For temporary ideas, links, and sparks.",+ contentMarkdown: "## Quick note\n\n- \n\n## Next actions\n\n- [ ] ",+ },+ meeting: {+ title: "Meeting notes",+ description: "Keep agenda, decisions, and todos on one page.",+ contentMarkdown: "## Meeting notes\n\nTime:\nAttendees:\n\n## Agenda\n\n- \n\n## Decisions\n\n- \n\n## Todos\n\n- [ ] ",+ },+ checklist: {+ title: "Checklist",+ description: "Quickly list tasks, shopping items, or project checks.",+ contentMarkdown: "## Checklist\n\n- [ ] \n- [ ] \n- [ ] ",+ },+ reading: {+ title: "Reading notes",+ description: "Collect excerpts, ideas, and follow-up reading.",+ contentMarkdown: "## Reading notes\n\nBook:\nAuthor:\n\n## Excerpts\n\n> \n\n## My thoughts\n\n\n## Follow-up questions\n\n- ",+ },+ daily: {+ title: "Daily review",+ description: "Record what you finished today and where you got stuck.",+ contentMarkdown: "## Daily review\n\n## Done today\n\n- \n\n## Blockers\n\n- \n\n## Tomorrow's priorities\n\n- [ ] ",+ },+ },+ },+ pwa: {+ checkingTitle: "New version found",+ checkingDescription: "Applying the update. The app will refresh shortly.",+ appliedTitle: "EdgeEver updated",+ appliedDescription: "You are running the latest version.",+ readyTitle: "New version ready",+ readyDescription: "Refresh to use the latest features.",+ latestWithBuild: "You are running the latest version ({{buildLabel}}).",+ refreshNow: "Refresh now",+ closeNotice: "Close update notice",+ sidebarInstall: "Install Client",+ sidebarInstallTitle: "Install EdgeEver Desktop App",+ iosPrompt: {+ title: "Add EdgeEver to Home Screen",+ subtitle: "Enjoy full screen independent window, experience Evernote as smooth as a native app.",+ step1: "Tap the Share button at the bottom of Safari browser",+ step2: "Find and select 'Add to Home Screen' in the menu",+ dismiss: "Got it",+ },+ },+} as const;diff --git a/packages/shared/src/i18n/index.ts b/packages/shared/src/i18n/index.tsnew file mode 100644index 00000000..d895154e--- /dev/null+++ b/packages/shared/src/i18n/index.ts@@ -0,0 +1,2 @@+export { enUS } from "./en-US";+export { zhCN } from "./zh-CN";diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsnew file mode 100644index 00000000..9bb92107--- /dev/null+++ b/packages/shared/src/i18n/zh-CN.ts@@ -0,0 +1,704 @@+// Shared by the PWA and native mobile clients.+export const zhCN = {+ common: {+ appName: "EdgeEver",+ close: "关闭",+ cancel: "取消",+ save: "保存",+ delete: "删除",+ loading: "正在加载",+ back: "返回上一页",+ language: "语言",+ untitledMemo: "无标题笔记",+ processing: "处理中",+ saving: "保存中",+ copied: "已复制",+ githubRepository: "GitHub 仓库",+ },+ dialogs: {+ memoDelete: {+ permanentBulkTitle: "永久删除 {{count}} 条笔记",+ permanentSingleTitle: "永久删除笔记",+ softBulkTitle: "删除 {{count}} 条笔记",+ softSingleTitle: "删除笔记",+ permanentDescription: "这个操作不可恢复。",+ softDescription: "删除后可以在回收站恢复。",+ permanentConfirm: "永久删除",+ softConfirm: "删除",+ },+ notebookName: {+ createTitle: "新建笔记本",+ renameTitle: "重命名笔记本",+ createDescription: "创建一个新的笔记本,用来整理相关笔记。",+ renameDescription: "更新后会立即同步到笔记本树。",+ nameLabel: "名称",+ namePlaceholder: "笔记本名称",+ createSubmit: "创建",+ },+ },+ login: {+ title: "登录 EdgeEver",+ subtitle: "你的自托管笔记工作区",+ username: "账号",+ password: "密码",+ submitting: "安全登录中...",+ submit: "开启工作区",+ },+ nav: {+ mobileMain: "移动端主导航",+ home: "首页",+ mine: "我的",+ createMemo: "新建笔记",+ createDisabled: "当前视图不可新建笔记",+ creating: "正在创建",+ },+ workspace: {+ inboxDeleteTitle: "等待分类不能删除",+ inboxDeleteDescription: "等待分类是默认笔记本,用来保证新笔记始终有归属。",+ selection: {+ pin: "置顶",+ unpin: "取消置顶",+ chooseMemo: "请选择笔记",+ trashCannotPin: "回收站内不可置顶",+ updatingPin: "正在更新置顶",+ trashCannotMove: "回收站内不可移动",+ noMovableNotebook: "没有可移动的笔记本",+ moving: "正在移动",+ move: "移动",+ needTwoMemos: "至少选择 2 条笔记",+ trashCannotMerge: "回收站内不可合并",+ merging: "正在合并",+ merge: "合并笔记",+ deleting: "正在删除",+ permanentDelete: "永久删除",+ delete: "删除",+ },+ loading: {+ notebooks: "正在加载笔记本",+ settings: "正在加载个人中心",+ assets: "正在加载资源库",+ tags: "正在加载标签",+ migration: "正在加载迁移指引",+ editor: "正在加载编辑器",+ },+ pullToRefresh: {+ refreshingNotes: "正在拉取最新笔记",+ refreshingPage: "正在刷新网页",+ releaseNotes: "松开刷新",+ releasePage: "松开刷新网页",+ pullNotes: "下拉刷新",+ pullPage: "下拉刷新网页",+ },+ },+ notebookPane: {+ notebooks: "笔记本",+ workspaceFallback: "边缘笔记工作区",+ backToList: "返回笔记列表",+ newNotebook: "新建笔记本",+ newMemo: "新建笔记",+ entries: "笔记入口",+ allMemos: "全部笔记",+ sortTitle: "笔记本排序:{{label}}",+ loading: "加载中",+ secondaryEntries: "辅助入口",+ profile: "个人中心",+ trash: "回收站",+ emptyTrash: "清空回收站",+ empty: "清空",+ syncNow: "立即同步",+ sync: {+ offlineWithPending: "离线,{{count}} 项待同步",+ offline: "离线",+ syncing: "同步中",+ conflicts: "{{count}} 项同步冲突",+ retry: "{{count}} 项等待重试",+ pending: "{{count}} 项待同步",+ synced: "已同步",+ },+ },+ notebookTree: {+ dragNotebook: "移动笔记本「{{name}}」",+ expandCollapse: "展开/折叠",+ collapse: "收起 {{name}}",+ expand: "展开 {{name}}",+ current: "当前:{{name}}",+ switchTo: "切换到 {{name}}",+ newChild: "新建子笔记本",+ newChildAria: "在 {{name}} 下新建子笔记本",+ rename: "重命名",+ renameNotebook: "重命名笔记本",+ renameAria: "重命名 {{name}}",+ deleteNotebook: "删除笔记本",+ deleteAria: "删除 {{name}}",+ },+ settings: {+ title: "我的",+ subtitle: "个人偏好、系统信息、MCP Token 与登录会话",+ preferences: "偏好设置",+ languageTitle: "界面语言",+ languageDescription: "切换产品界面的显示语言。",+ systemLanguage: "跟随系统",+ imageCompressionTitle: "压缩笔记内图片",+ imageCompressionDescription: "上传大图时在本地压缩,节省资源占用。",+ imageCompressionAria: "是否压缩笔记内图片",+ themeTitle: "界面主题",+ themeDescription: "选择浅色、深色,或跟随系统设置。",+ themeSystem: "跟随系统",+ themeLight: "浅色",+ themeDark: "深色",+ themeToggleToDark: "切换到深色模式",+ themeToggleToLight: "切换到浅色模式",+ tabs: {+ general: "常规设置",+ data: "数据管理",+ ai: "AI集成",+ account: "登录设置",+ },+ },+ systemInfo: {+ title: "系统信息",+ description: "查看当前应用版本、构建标识和运行环境。",+ version: "版本号",+ build: "构建",+ browser: "浏览器",+ os: "系统",+ language: "语言",+ timeZone: "时区",+ installMode: "运行模式",+ standalone: "已安装应用",+ browserMode: "浏览器",+ unknown: "未知",+ copy: "复制信息",+ },+ dataExport: {+ title: "导入与导出",+ description: "一份同时兼顾开放性与完整恢复的档案:笔记可直接以 Markdown 阅读,结构化数据、历史版本和附件可用于 EdgeEver 实例间迁移。",+ exportButton: "导出 EdgeEver ZIP",+ importButton: "导入 EdgeEver ZIP",+ working: "正在整理笔记和附件…",+ importing: "正在导入笔记和附件…",+ progress: "{{completed}} / {{total}}",+ complete: "导出完成,ZIP 文件已开始下载。",+ error: "导出失败,请检查网络连接后重试。",+ importComplete: "EdgeEver ZIP 导入完成。",+ importErrors: {+ invalidZip: "无法解压这个文件:它不是有效的 ZIP,或文件已经损坏。",+ missingManifest: "无法识别这个文件:压缩包中缺少 manifest.json。",+ unsupportedFormat: "不支持这个压缩包格式:请选择由 EdgeEver 导出的 ZIP。",+ unsupportedVersion: "当前版本无法导入这个 EdgeEver ZIP,请先升级 EdgeEver。",+ invalidManifest: "manifest.json 内容无效,无法确认压缩包的版本和完整性。",+ missingData: "压缩包缺少笔记本或笔记的结构化数据文件。",+ invalidData: "压缩包中的结构化数据格式无效,可能已被修改或损坏。",+ incompleteData: "压缩包中的笔记或历史版本不完整,与清单记录不一致。",+ incompleteResources: "压缩包中的图片或附件缺失、损坏,与清单记录不一致。",+ serverRejected: "服务器未能写入导入数据:{{message}}",+ network: "导入时无法连接 EdgeEver 服务,请检查网络连接后重试。",+ unknown: "导入失败,发生了无法识别的错误。请重新导出后再试。",+ },+ importConfirmTitle: "导入 EdgeEver ZIP",+ importConfirmDescription: "文件包含 {{memos}} 篇笔记和 {{resources}} 个资源。导入会保留当前实例中的其他数据,但会覆盖相同 EdgeEver ID 的内容。",+ confirmImport: "确认导入",+ },+ shortcuts: {+ title: "绑定快捷键",+ manage: "管理",+ description: "为常用笔记动作设置组合键。按 Esc 可取消当前录制。",+ recording: "输入组合键",+ reset: "恢复默认",+ requireModifier: "请按下包含 Ctrl、⌘ 或 Alt 的组合键。",+ conflict: "这个组合键已用于「{{label}}」。",+ actions: {+ createMemo: {+ label: "新建笔记",+ description: "在当前笔记本中创建一条新笔记。",+ },+ createNotebook: {+ label: "新建笔记本",+ description: "在当前层级创建一个新笔记本。",+ },+ focusSearch: {+ label: "搜索笔记",+ description: "打开搜索或聚焦笔记内搜索。",+ },+ focusReplace: {+ label: "替换文本",+ description: "在当前笔记中打开替换。",+ },+ },+ },+ options: {+ memoDensity: {+ preview: "预览列表",+ compact: "紧凑列表",+ },+ memoSort: {+ updatedDesc: "最近更新",+ createdDesc: "创建时间",+ titleAsc: "标题 A-Z",+ },+ notebookSort: {+ nameAsc: "名称",+ memoCountDesc: "笔记数量",+ updatedDesc: "更新日期",+ },+ memoFilter: {+ all: "全部",+ pinned: "置顶",+ tagged: "有标签",+ untagged: "无标签",+ },+ },+ mobileSheets: {+ selectionCount: "已选择 {{count}} 条",+ selectMemo: "选择笔记",+ listOptions: "列表选项",+ displayMode: "显示方式",+ sortMode: "排序方式",+ tags: "标签",+ assets: "附件",+ emptyTrash: "清空回收站",+ trash: "回收站",+ moveToNotebook: "移动到笔记本",+ searchNotebook: "搜索笔记本",+ noNotebookFound: "没有找到笔记本",+ currentTarget: "当前目标:{{name}}",+ moveTo: "移动到 {{name}}",+ bulkActions: "批量操作",+ mergeMemos: "合并笔记",+ clearSelection: "取消选择",+ more: "更多",+ },+ memoList: {+ selectionCount: "已选择 {{count}} 条",+ selectMemo: "选择笔记",+ selectedListNone: "全不选当前列表",+ selectedListAll: "全选当前列表",+ noSelectableInList: "当前列表没有可选择的笔记",+ chooseNotebook: "选择笔记本",+ move: "移动",+ mergeMemos: "合并笔记",+ permanentDelete: "永久删除",+ clearSelection: "取消选择",+ cancelSearch: "退出搜索",+ searchPlaceholder: "搜索笔记",+ clearSearch: "清空搜索",+ cancel: "取消",+ switchNotebook: "切换笔记本",+ bulkActions: "批量操作",+ listOptions: "列表选项",+ filterTitle: "筛选:{{label}}",+ sortTitle: "排序:{{label}}",+ previewList: "预览列表",+ compactList: "紧凑列表",+ emptyTrashTitle: "清空回收站,不可恢复",+ emptyTrash: "清空",+ more: "更多",+ moreActions: "列表更多操作",+ tags: "标签",+ assets: "附件",+ trash: "回收站",+ currentNotebook: "当前笔记本",+ allNotebooks: "所有笔记本",+ deletedMemos: "已删除笔记",+ allMemos: "全部笔记",+ memoCount: "{{count}} 条笔记",+ deletedCount: "{{count}} 条已删除",+ constrainedCount: "{{label}} · {{count}} 条",+ searchConstraint: "搜索「{{query}}」",+ searchActive: "正在搜索",+ searchResults: "{{count}} 条结果",+ filterConstraint: "筛选:{{label}}",+ reset: "重置",+ fetchingLatest: "正在拉取最新笔记",+ fetchEmptyTitle: "暂时没有拉到笔记",+ fetchEmptyDescription: "网络或 PWA 后台恢复可能短暂中断了同步。这里不会把它当作空笔记本。",+ retry: "重新拉取",+ trashEmptyTitle: "回收站为空",+ emptyTitle: "暂无笔记",+ noFilteredTitle: "没有符合筛选的笔记",+ trashEmptyDescription: "删除的笔记会显示在这里。",+ emptyDescription: "先创建一条笔记,之后可以在这里快速预览、搜索和批量整理。",+ noFilteredDescription: "试试切换筛选条件,或调整搜索关键词。",+ newMemo: "新建笔记",+ loadingMore: "正在加载更多笔记",+ openMemo: "打开笔记",+ unpin: "取消置顶",+ pinMemo: "置顶笔记",+ restoreMemo: "恢复笔记",+ moveToNotebook: "移动到笔记本",+ deleteMemo: "删除笔记",+ toggleOffFilter: "取消{{label}}",+ manualSync: "手动同步笔记",+ manualSyncing: "正在同步笔记",+ manualSyncOffline: "离线时无法同步笔记",+ },+ memoCard: {+ yesterday: "昨天",+ emptyMemo: "空笔记",+ select: "选择 {{title}}",+ unselect: "取消选择 {{title}}",+ dragMany: "移动 {{count}} 条笔记",+ dragOne: "移动「{{title}}」",+ interactionHint: "Ctrl/Cmd 点击切换选择,Shift 点击连续选择,可拖到左侧笔记本移动,移动端长按进入选择",+ moreActions: "更多操作",+ restoreMemo: "恢复笔记",+ deleteMemo: "删除笔记",+ },+ assets: {+ uploadNth: "正在上传第 {{current}}/{{total}} 个文件...",+ compressingFile: "正在压缩: {{filename}}",+ uploadingFile: "正在上传: {{filename}}",+ title: "附件管理",+ fileCount: "{{count}} 文件",+ imageCount: "{{count}} 图片",+ filters: {+ all: "全部",+ image: "图片",+ document: "文档",+ other: "其他",+ },+ searchPlaceholder: "搜索附件名或来源笔记...",+ gridView: "网格视图",+ listView: "列表视图",+ activeMemo: "当前关联笔记:《{{title}}》",+ unnamedMemo: "未命名笔记",+ unnamedShort: "未命名",+ uploadAttachment: "上传附件",+ processing: "处理中...",+ noActiveMemoHint: "提示:在右侧编辑器中打开一篇笔记,即可在此处拖放或上传新文件。",+ loading: "正在加载附件列表...",+ noMatches: "未找到匹配附件",+ empty: "暂无附件",+ noMatchesDescription: "请尝试更改搜索词或分类过滤器",+ emptyDescription: "拖拽文件到这里,或在上方上传文件",+ previewImage: "大图预览",+ downloadOpen: "下载/打开",+ deletedMemo: "已删除笔记",+ fromMemo: "来自:{{source}}",+ sourceMemo: "来源笔记:{{source}}",+ openInNewWindow: "在新窗口打开",+ dropTitle: "将文件释放于此",+ dropDescription: "文件将上传并附加到当前正在编辑的笔记:",+ uploadSuccess: "上传成功!",+ uploadError: "上传失败,请稍后重试",+ },+ tagsDialog: {+ title: "标签",+ count: "{{count}} tags",+ loading: "加载中",+ empty: "暂无标签",+ nameLabel: "标签名称",+ memoCount: "{{count}} 条笔记",+ renameTitle: "重命名标签",+ renameAria: "重命名标签 {{name}}",+ deleteTitle: "删除标签",+ deleteAria: "删除标签 {{name}}",+ deleteConfirmTitle: "删除标签 #{{name}}",+ deleteConfirmDescription: "将从 {{count}} 条笔记中移除这个标签,笔记内容不会被删除。",+ deleteConfirmLabel: "删除标签",+ },+ revisions: {+ emptyMemo: "空笔记",+ title: "版本历史",+ loading: "加载中",+ empty: "暂无历史版本",+ timeline: "历史记录",+ revisionName: "版本 {{revision}}",+ compareTitle: "版本 {{revision}} 与当前内容",+ changedLines: "{{count}} 行有变化",+ noRevisionSelected: "未选择历史版本",+ restoreVersion: "恢复该版本",+ historyVersion: "历史版本",+ currentContent: "当前内容",+ restoreConfirmTitle: "恢复到这个历史版本",+ restoreConfirmDescription: "当前内容会被这个历史版本替换,恢复后仍会产生新的历史记录。",+ restoreConfirmLabel: "恢复",+ },+ editor: {+ imageScale: "图片缩放",+ scaleTo: "缩放到 {{percent}}%",+ imageSizeSmall: "较小",+ imageSizeMedium: "适中",+ imageSizeLarge: "较大",+ imageSizeFull: "铺满",+ resizeImage: "拖拽调整图片宽度",+ currentNotebook: "所在笔记本",+ close: "关闭",+ searchNotebook: "搜索笔记本",+ noNotebookFound: "没有找到笔记本",+ currentNotebookAria: "当前所在笔记本:{{name}}",+ switchToNotebook: "切换到 {{name}}",+ attachmentInsertText: "附件:{{filename}} {{url}}",+ placeholder: "开始记录...",+ loading: "加载中",+ emptySelection: "选择或新建一条笔记",+ saveState: {+ saving: "保存中",+ saved: "已保存",+ queued: "待同步",+ conflict: "有冲突",+ error: "保存失败",+ unsaved: "未保存",+ },+ uploadState: {+ failed: "上传失败",+ compressing: "压缩中",+ uploading: "上传中",+ fileFailed: "文件上传失败",+ imageCompressing: "图片压缩中",+ fileUploading: "文件上传中",+ },+ notebookFallback: "笔记本",+ saveAndBack: "保存并返回列表",+ backToList: "返回列表",+ previousMemo: "上一条笔记",+ nextMemo: "下一条笔记",+ updatedAt: "更新于 {{time}}",+ done: "完成",+ uploadAttachment: "上传附件",+ collapseFormat: "收起格式",+ format: "格式",+ searchCurrentMemo: "搜索当前笔记",+ replaceCurrentMemo: "替换当前笔记",+ versionHistory: "版本历史",+ save: "保存",+ more: "更多",+ moreAria: "笔记更多操作",+ restoreMemo: "恢复笔记",+ deleteForever: "彻底删除",+ deleteMemo: "删除笔记",+ notebookPlaceholder: "所在笔记本",+ tagPlaceholder: "添加标签,用逗号分隔",+ searchPlaceholder: "在当前笔记内搜索",+ replacePlaceholder: "替换为",+ previousSearchResult: "上一个搜索结果",+ nextSearchResult: "下一个搜索结果",+ replaceAll: "全部替换",+ closeSearch: "关闭搜索",+ editMemo: "编辑笔记",+ },+ editorToolbar: {+ toolbar: "编辑器工具栏",+ paragraph: "正文",+ heading1: "标题 1",+ heading2: "标题 2",+ heading3: "标题 3",+ undo: "撤销",+ redo: "重做",+ bold: "加粗",+ italic: "斜体",+ strike: "删除线",+ inlineCode: "行内代码",+ bulletList: "无序列表",+ orderedList: "有序列表",+ quote: "引用",+ codeBlock: "代码块",+ codeLanguage: "代码语言",+ plainText: "纯文本",+ horizontalRule: "分割线",+ markdown: "切换到 Markdown 源码",+ richText: "切换到富文本编辑",+ markdownSource: "Markdown 源码",+ switchToMarkdown: "切换到 Markdown 模式",+ switchToRichText: "切换到富文本模式",+ },+ mobileNotebookPicker: {+ title: "切换笔记本",+ current: "当前:{{name}}",+ allMemos: "全部笔记",+ notebookFallback: "笔记本",+ searchPlaceholder: "搜索笔记本",+ clearSearch: "清空搜索",+ currentAll: "当前:全部笔记",+ switchAll: "切换到全部笔记",+ matchedNotebooks: "匹配的笔记本",+ notebooks: "笔记本",+ collapseAllAria: "收起全部笔记本",+ expandAllAria: "展开全部笔记本",+ collapseAll: "收起全部",+ expandAll: "展开全部",+ noSearchResult: "没有找到「{{query}}」",+ noNotebook: "没有找到笔记本",+ showAll: "显示全部笔记本",+ collapse: "收起 {{name}}",+ expand: "展开 {{name}}",+ currentNotebook: "当前:{{name}}",+ switchToNotebook: "切换到 {{name}}",+ },+ workspaceDialogs: {+ emptyTrashTitle: "清空回收站",+ emptyTrashDescription: "回收站中的全部笔记和仍关联的附件都会删除,这个操作不可恢复。",+ emptyTrashConfirm: "清空回收站",+ emptyTrashFailedTitle: "清空回收站失败",+ emptyTrashFailedDescription: "笔记已恢复到回收站,请稍后重试。",+ deleteNotebookTitle: "删除笔记本「{{name}}」",+ deleteNotebookDescription: "请先清空其中的笔记和子笔记本。删除后无法从这里恢复。",+ ok: "知道了",+ resizeMemoList: "调整笔记列表宽度",+ resizeMemoListHint: "拖拽调整列表栏宽度,双击恢复默认,方向键微调",+ },+ evernoteGuide: {+ title: "印象笔记迁移指引",+ subtitle: "AI Agent 驱动一键迁移,无损保留笔记本组结构",+ },+ evernoteImport: {+ title: "导入印象笔记",+ guide: "操作指引",+ openGuideAria: "在新标签页打开印象笔记迁移操作指引",+ description: "查看从印象笔记迁移到 EdgeEver 的步骤,推荐使用 MCP 与 AI Agent 批量导入。",+ },+ session: {+ loggingOut: "安全退出中...",+ logout: "退出登录",+ },+ users: {+ title: "成员管理",+ description: "为家人或团队成员创建独立的个人笔记空间。实例不开放公开注册。",+ loading: "正在加载账号...",+ create: "添加成员",+ creating: "正在创建...",+ createTitle: "添加新成员",+ createDescription: "新账号会获得完全独立的笔记、附件、回收站和 MCP Token。",+ username: "用户名",+ usernamePlaceholder: "例如:xiaoming",+ usernameExists: "这个登录账号已经存在,请换一个名称。",+ displayName: "显示名称",+ displayNamePlaceholder: "选填,例如:小明",+ password: "初始密码",+ passwordPlaceholder: "请输入至少 8 位密码",+ passwordHint: "成员首次登录后可以在个人中心修改密码。",+ newPassword: "新密码(至少 8 位)",+ resetPassword: "重置密码",+ resetTitle: "重置 {{username}} 的密码",+ resetDescription: "重置后,该账号在其他设备上的登录会话将失效。",+ enabled: "已启用",+ disabled: "已停用",+ failed: "账号操作失败,请检查输入后重试。",+ roles: { owner: "实例管理员", member: "成员" },+ },+ password: {+ title: "修改密码",+ description: "修改后会保留当前设备登录,并退出其他设备上的登录会话。",+ currentPassword: "当前密码",+ newPassword: "新密码",+ confirmPassword: "确认新密码",+ change: "修改密码",+ changing: "修改中...",+ changed: "密码已修改成功。",+ currentPasswordIncorrect: "当前密码不正确。",+ passwordMismatch: "两次输入的新密码不一致。",+ newPasswordTooShort: "新密码至少需要 8 个字符。",+ changeFailed: "密码修改失败,请稍后重试。",+ demoReadOnly: "Demo 环境使用固定登录凭据,无法修改登录密码。",+ },+ mcp: {+ createdTitle: "API Token 已成功生成",+ copyToken: "复制 Token",+ copyConfig: "复制完整 MCP 配置",+ securityWarning: "安全提醒:此 Token 属于高危凭证,请勿对外泄露。",+ bearerPlaceholder: "Bearer 我创建的token",+ title: "生成 MCP 配置",+ example: "使用示例",+ exampleTitle: "Remote MCP 示例",+ copyExample: "复制示例",+ scopeTitle: "Token 权限范围",+ selectedScopes: "已选择 {{selected}}/{{total}}",+ loadingTokens: "正在加载 Token 列表...",+ emptyTokens: "暂无 API Token",+ noScope: "无权限",+ lastUsedAt: "上次调用时间:{{time}}",+ neverUsed: "从未被调用",+ legacyTokenHint: "旧 Token 无法找回明文,请重新生成",+ legacyTokenCannotCopy: "旧 Token 无法复制",+ legacyConfigCannotCopy: "旧 Token 无法复制 MCP 配置",+ deleteToken: "删除 Token",+ description: "让 AI Agent 可以读取和整理你的笔记。",+ namePlaceholder: "Token 名称,例如:Codex 或 Claude Code",+ createToken: "生成 Token",+ activeTokens: "Token 列表",+ deleteConfirmTitle: "确定要删除 Token「{{name}}」吗?",+ deleteConfirmDescription: "删除操作不可逆。一旦删除,使用此 Token 进行 API 或 MCP 调用的一切客户端将立即失效并被拒绝访问。",+ deleteConfirmLabel: "确认删除",+ scopes: {+ "read:notebooks": "读取笔记本",+ "write:notebooks": "创建与修改笔记本",+ "read:memos": "读取笔记",+ "write:memos": "创建与修改笔记",+ "read:resources": "读取附件资源",+ "write:resources": "上传与修改附件",+ "read:tags": "读取标签",+ "write:tags": "创建与修改标签",+ },+ },+ advancedPlay: {+ title: "进阶玩法",+ description: "搭配 AI Agent 的进阶玩法。",+ copyPrompt: "复制 Prompt",+ prompts: {+ persona: {+ title: "人物画像",+ prompt: "请通过 EdgeEver MCP 读取我的笔记,基于真实笔记内容为我整理一份人物画像。请只根据笔记中的证据判断,不要做心理诊断,不要夸张定性。输出包括:长期关注的主题、做事偏好、能力线索、反复出现的问题、近期动向,并在每条结论后列出相关笔记标题或 memo id。",+ },+ knowledgeMap: {+ title: "知识图谱",+ prompt: "请通过 EdgeEver MCP 读取我的笔记,为我整理一份知识地图。请找出主要知识领域、每个领域下的关键概念、相关笔记、我已经掌握的部分和还需要补齐的问题。输出结构要适合后续继续学习和写作。",+ },+ tagAdvice: {+ title: "标签建议",+ prompt: "请通过 EdgeEver MCP 读取我的笔记和现有标签,帮我设计一套更清晰的标签体系。请指出重复、过细、过宽或命名不一致的标签,并给出合并、重命名和新增标签建议。先不要修改笔记,等我确认后再执行。",+ },+ },+ },+ templates: {+ title: "模板",+ description: "选择一个模板,直接创建新笔记。",+ unavailable: "当前无法创建笔记,请先选择可用笔记本。",+ items: {+ quickNote: {+ title: "速记",+ description: "适合临时记录想法、链接和灵感。",+ contentMarkdown: "## 速记\n\n- \n\n## 后续动作\n\n- [ ] ",+ },+ meeting: {+ title: "会议记录",+ description: "议题、结论和待办放在同一页。",+ contentMarkdown: "## 会议记录\n\n时间:\n参与人:\n\n## 议题\n\n- \n\n## 结论\n\n- \n\n## 待办\n\n- [ ] ",+ },+ checklist: {+ title: "清单",+ description: "快速列出待办、采购、项目检查项。",+ contentMarkdown: "## 清单\n\n- [ ] \n- [ ] \n- [ ] ",+ },+ reading: {+ title: "读书笔记",+ description: "摘录、观点和下一步阅读整理。",+ contentMarkdown: "## 读书笔记\n\n书名:\n作者:\n\n## 摘录\n\n> \n\n## 我的观点\n\n\n## 延伸问题\n\n- ",+ },+ daily: {+ title: "每日复盘",+ description: "记录今天完成了什么、卡在哪里。",+ contentMarkdown: "## 每日复盘\n\n## 今天完成\n\n- \n\n## 遇到的问题\n\n- \n\n## 明天优先级\n\n- [ ] ",+ },+ },+ },+ pwa: {+ checkingTitle: "发现新版本",+ checkingDescription: "正在应用更新,稍后会自动刷新。",+ appliedTitle: "EdgeEver 已更新",+ appliedDescription: "当前应用已是最新版本。",+ readyTitle: "新版本已就绪",+ readyDescription: "刷新后即可使用最新功能。",+ latestWithBuild: "当前应用已是最新版本({{buildLabel}})。",+ refreshNow: "立即刷新",+ closeNotice: "关闭更新通知",+ sidebarInstall: "安装桌面客户端",+ sidebarInstallTitle: "安装 EdgeEver 桌面端",+ iosPrompt: {+ title: "将 EdgeEver 安装到主屏幕",+ subtitle: "享受全屏独立窗口,体验如原生 App 般丝滑的印象笔记。",+ step1: "点击 Safari 浏览器底部的分享按钮",+ step2: "在菜单中找到并选择「添加到主屏幕」",+ dismiss: "我知道了",+ },+ },+} as const;