Add mobile GitHub repository links
This commit is contained in:
1 parent
e930ae1113
commit
0b7d10d1b8
2 files changed
+39
No files matched your search
@@ -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 (
|
||||
<SafeAreaView style={styles.safeArea}>
|
||||
<Pressable accessibilityLabel="GitHub 仓库" accessibilityRole="link" onPress={() => Linking.openURL(GITHUB_REPOSITORY_URL)} style={styles.githubButton}>
|
||||
<ExternalLink color="#475569" size={20} />
|
||||
</Pressable>
|
||||
<KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : undefined} style={styles.keyboard}>
|
||||
<View style={styles.header}>
|
||||
<Text style={styles.title}>EdgeEver</Text>
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
<Text style={styles.sectionTitle}>账户</Text>
|
||||
<PanelRow label="当前用户" value={userName} />
|
||||
<PanelRow label="实例地址" value={instance} />
|
||||
<Pressable accessibilityRole="link" onPress={() => Linking.openURL(GITHUB_REPOSITORY_URL)} style={[styles.panelRow, styles.panelLinkRow]}>
|
||||
<View style={styles.panelLinkText}>
|
||||
<Text style={styles.panelLabel}>GitHub 仓库</Text>
|
||||
<Text style={styles.panelValue}>tianma-if/edgeever</Text>
|
||||
</View>
|
||||
<ExternalLink color="#0f172a" size={18} />
|
||||
</Pressable>
|
||||
<Pressable onPress={onSignOut} style={styles.dangerButton}>
|
||||
<LogOut color="#b91c1c" size={18} />
|
||||
<Text style={styles.dangerButtonText}>退出登录</Text>
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user