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 account and token interactions
tianma-ifb3c6bbb25b1e
diff --git a/apps/mobile/src/screens/AccountSecurityModal.tsx b/apps/mobile/src/screens/AccountSecurityModal.tsxindex 29eebc5d..fd712050 100644--- a/apps/mobile/src/screens/AccountSecurityModal.tsx+++ b/apps/mobile/src/screens/AccountSecurityModal.tsx@@ -10,7 +10,7 @@ import {Switch,View,} from "react-native";-import { Alert, Pressable, Text, TextInput } from "../components/LocalizedText";+import { Pressable, Text, TextInput } from "../components/LocalizedText";import { resolveMobileThemeStyles, useMobileTheme, type MobileResolvedTheme } from "../lib/mobile-theme";import { useSession } from "../lib/session";@@ -59,7 +59,6 @@ export const AccountSecurityPanel = ({setCurrentPassword("");setNewPassword("");setConfirmPassword("");- Alert.alert("密码已更新", "下次登录请使用新密码。");},});@@ -126,8 +125,9 @@ export const AccountSecurityPanel = ({<Field label="新密码" onChangeText={setNewPassword} value={newPassword} /><Field label="确认新密码" onChangeText={setConfirmPassword} value={confirmPassword} />{passwordMutation.error ? <Text style={styles.error}>{errorMessage(passwordMutation.error)}</Text> : null}+ {passwordMutation.isSuccess ? <Text accessibilityLiveRegion="polite" style={styles.success}>密码已修改成功。</Text> : null}<PrimaryButton- disabled={passwordMutation.isPending || !currentPassword || !newPassword || !confirmPassword}+ disabled={passwordMutation.isPending}label={passwordMutation.isPending ? "正在修改…" : "修改密码"}onPress={() => passwordMutation.mutate()}/>@@ -254,6 +254,7 @@ const baseAccountSecurityStyles = StyleSheet.create({primaryButtonText: { color: "#ffffff", fontSize: 14, fontWeight: "800" },disabled: { opacity: 0.45 },error: { color: "#be123c", fontSize: 13, lineHeight: 19 },+ success: { color: "#15803d", fontSize: 13, fontWeight: "700", lineHeight: 19 },addButton: { alignItems: "center", backgroundColor: "#15803d", borderRadius: 9, flexDirection: "row", gap: 6, paddingHorizontal: 12, paddingVertical: 9 },addButtonText: { color: "#ffffff", fontSize: 13, fontWeight: "800" },userCard: { alignItems: "center", backgroundColor: "#ffffff", borderColor: "#dce7dd", borderRadius: 14, borderWidth: 1, flexDirection: "row", gap: 12, padding: 14 },diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsxindex d5c37273..bc6937c1 100644--- a/apps/mobile/src/screens/WorkspaceScreen.tsx+++ b/apps/mobile/src/screens/WorkspaceScreen.tsx@@ -1842,10 +1842,12 @@ const SettingsView = ({<View style={styles.settingsGroup}><AccountSecurityPanel active currentUser={currentUser} section="password" /></View>- <Pressable onPress={onSignOut} style={styles.settingsLogoutButton}>- <LogOut color="#ffffff" size={17} />- <Text style={styles.settingsLogoutText}>退出登录</Text>- </Pressable>+ <View style={styles.settingsLogoutCard}>+ <Pressable onPress={onSignOut} style={styles.settingsLogoutButton}>+ <LogOut color="#ffffff" size={17} />+ <Text style={styles.settingsLogoutText}>退出登录</Text>+ </Pressable>+ </View></View>);};@@ -2698,7 +2700,7 @@ const ApiTokensContent = ({ active, baseUrl, embedded = false }: { active: boole<ActionButton label={copiedValue === "created-token" ? "已复制" : "复制 Token"} onPress={() => copyText(createdToken, "created-token")}><Copy color="#0f172a" size={16} /></ActionButton>- <ActionButton label={copiedValue === "created-config" ? "已复制" : "复制 MCP 配置"} onPress={() => copyText(buildMcpRemoteConfig(baseUrl, createdToken), "created-config")}>+ <ActionButton label={copiedValue === "created-config" ? "已复制" : "复制完整 MCP 配置"} onPress={() => copyText(buildMcpRemoteConfig(baseUrl, createdToken), "created-config")}><KeyRound color="#0f172a" size={16} /></ActionButton></View>@@ -6049,6 +6051,13 @@ const baseWorkspaceStyles = StyleSheet.create({minHeight: 40,paddingHorizontal: 14,},+ settingsLogoutCard: {+ backgroundColor: "#fff1f2",+ borderColor: "#fecaca",+ borderRadius: 8,+ borderWidth: 1,+ padding: 16,+ },settingsLogoutText: {color: "#ffffff",fontSize: 14,