diff --git a/apps/mobile/src/screens/LoginScreen.tsx b/apps/mobile/src/screens/LoginScreen.tsx index b2988217..5427dc10 100644 --- a/apps/mobile/src/screens/LoginScreen.tsx +++ b/apps/mobile/src/screens/LoginScreen.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { ActivityIndicator, KeyboardAvoidingView, + Linking, Platform, Pressable, StyleSheet, @@ -10,8 +11,11 @@ import { View, } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; +import { ExternalLink } from "lucide-react-native"; import { useSession } from "../lib/session"; +const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever"; + export const LoginScreen = () => { const { signIn } = useSession(); const [baseUrl, setBaseUrl] = useState(""); @@ -41,6 +45,9 @@ export const LoginScreen = () => { return ( + Linking.openURL(GITHUB_REPOSITORY_URL)} style={styles.githubButton}> + + EdgeEver @@ -112,6 +119,20 @@ const styles = StyleSheet.create({ backgroundColor: "#f8fafc", flex: 1, }, + githubButton: { + alignItems: "center", + backgroundColor: "#ffffff", + borderColor: "#e2e8f0", + borderRadius: 999, + borderWidth: 1, + height: 42, + justifyContent: "center", + position: "absolute", + right: 18, + top: 18, + width: 42, + zIndex: 2, + }, keyboard: { flex: 1, justifyContent: "center", diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsx index 8192d2a0..3f220e79 100644 --- a/apps/mobile/src/screens/WorkspaceScreen.tsx +++ b/apps/mobile/src/screens/WorkspaceScreen.tsx @@ -107,6 +107,7 @@ import { const ALL_NOTES_ID = "all"; const DEFAULT_MEMO_TITLE = "无标题笔记"; const MOBILE_APP_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 实例中: @@ -1570,6 +1571,13 @@ const AccountView = ({ instance, userName, onSignOut }: { instance: string; user 账户 + Linking.openURL(GITHUB_REPOSITORY_URL)} style={[styles.panelRow, styles.panelLinkRow]}> + + GitHub 仓库 + tianma-if/edgeever + + + 退出登录 @@ -5612,6 +5620,16 @@ const styles = StyleSheet.create({ gap: 6, padding: 14, }, + panelLinkRow: { + alignItems: "center", + flexDirection: "row", + justifyContent: "space-between", + }, + panelLinkText: { + flex: 1, + gap: 6, + minWidth: 0, + }, panelLabel: { color: "#64748b", fontSize: 12,