's'
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { View, Text, ScrollView, StyleSheet, RefreshControl } from 'react-native'
|
||||
import { View, Text, ScrollView, StyleSheet, RefreshControl, Pressable } from 'react-native'
|
||||
import { SafeAreaView } from 'react-native-safe-area-context'
|
||||
|
||||
import { UserAgreementModal } from '@/components/UserAgreementModal'
|
||||
import { useBind } from '@/context/BindContext'
|
||||
import { apiFetch } from '@/lib/api'
|
||||
import type { SystemMetricsPayload } from '@/lib/pcTypes'
|
||||
@@ -20,6 +21,7 @@ export default function SystemScreen() {
|
||||
const [data, setData] = useState<SystemMetricsPayload | null>(null)
|
||||
const [err, setErr] = useState<string | null>(null)
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
const [agreementOpen, setAgreementOpen] = useState(false)
|
||||
|
||||
const load = useCallback(async () => {
|
||||
if (!bind) {
|
||||
@@ -147,8 +149,12 @@ export default function SystemScreen() {
|
||||
<View style={styles.cardMuted}>
|
||||
<Text style={styles.cardTitle}>客户端与系统集成</Text>
|
||||
<Text style={styles.muted}>开机启动、路径与 Electron 集成仅在桌面客户端可用。</Text>
|
||||
<Pressable style={styles.agreementRow} onPress={() => setAgreementOpen(true)} hitSlop={8}>
|
||||
<Text style={styles.agreementLink}>用户协议</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<UserAgreementModal visible={agreementOpen} onClose={() => setAgreementOpen(false)} />
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -205,4 +211,6 @@ const styles = StyleSheet.create({
|
||||
ffSec: { marginTop: 12 },
|
||||
ffLine: { fontSize: 12, color: theme.muted, marginBottom: 4, fontFamily: 'monospace' },
|
||||
muted: { fontSize: 13, color: theme.muted, lineHeight: 20 },
|
||||
agreementRow: { marginTop: 10, alignSelf: 'flex-start' },
|
||||
agreementLink: { fontSize: 12, color: theme.accent, textDecorationLine: 'underline' },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user