Skip to content

Commit d911ea1

Browse files
committed
about
1 parent df0da9b commit d911ea1

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

app/about.tsx

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { useSystem } from "@/context";
2+
import * as Application from "expo-application";
3+
import * as Device from "expo-device";
24
import { StyleSheet, Text, View } from "react-native";
35

46
function About() {
@@ -11,16 +13,55 @@ function About() {
1113
backgroundColor: colorScheme.surface,
1214
paddingHorizontal: 16,
1315
paddingVertical: 8,
14-
}
16+
gap: 16
17+
},
18+
row: {
19+
flexDirection: "row",
20+
alignItems: "center",
21+
justifyContent: "space-between",
22+
},
23+
label: {
24+
color: colorScheme.onSurface,
25+
fontSize: 14,
26+
},
27+
value: {
28+
color: colorScheme.outline,
29+
fontSize: 14,
30+
},
1531
});
1632

1733
return (
1834
<View
1935
style={styles.view}
2036
>
21-
<Text>
22-
About
23-
</Text>
37+
<View style={styles.row}>
38+
<Text style={styles.label}>App Version</Text>
39+
<Text style={styles.value}>{Application.nativeApplicationVersion}</Text>
40+
</View>
41+
<View style={styles.row}>
42+
<Text style={styles.label}>App Build</Text>
43+
<Text style={styles.value}>{Application.nativeBuildVersion}</Text>
44+
</View>
45+
<View style={styles.row}>
46+
<Text style={styles.label}>Device Name</Text>
47+
<Text style={styles.value}>{Device.modelName}</Text>
48+
</View>
49+
<View style={styles.row}>
50+
<Text style={styles.label}>RAM</Text>
51+
<Text style={styles.value}>{((Device.totalMemory ?? 0) / (1024 * 1024 * 1024)).toFixed(2)} GB</Text>
52+
</View>
53+
<View style={styles.row}>
54+
<Text style={styles.label}>CPU</Text>
55+
<Text style={styles.value}>{Device.supportedCpuArchitectures?.join(", ")}</Text>
56+
</View>
57+
<View style={styles.row}>
58+
<Text style={styles.label}>OS Version</Text>
59+
<Text style={styles.value}>{Device.osVersion}</Text>
60+
</View>
61+
<View style={styles.row}>
62+
<Text style={styles.label}>OS Build</Text>
63+
<Text style={styles.value}>{Device.osBuildId}</Text>
64+
</View>
2465
</View>
2566
);
2667
}

0 commit comments

Comments
 (0)