Files
FEDEO/mobile/app/(tabs)/explore.tsx

152 lines
3.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { router } from 'expo-router';
const ITEMS = [
{
key: 'account',
title: 'Konto',
subtitle: 'Session, Tenant-Wechsel, Logout',
href: '/more/account',
},
{
key: 'settings',
title: 'Einstellungen',
subtitle: 'Server-Instanz verwalten',
href: '/more/settings',
},
{
key: 'wiki',
title: 'Wiki',
subtitle: 'Wissen und Dokumentation',
href: '/more/wiki',
},
{
key: 'customers',
title: 'Kunden',
subtitle: '',
href: '/more/customers',
},
{
key: 'plants',
title: 'Objekte',
subtitle: '',
href: '/more/plants',
},
{
key: 'events',
title: 'Termine',
subtitle: 'Termine anzeigen und eintragen',
href: '/more/events',
},
{
key: 'calendar',
title: 'Kalender',
subtitle: 'Monatsübersicht und Tagesplanung',
href: '/more/calendar',
},
{
key: 'inventory',
title: 'Kundeninventar',
subtitle: 'Inventar und Scanner',
href: '/more/inventory',
},
{
key: 'nimbot',
title: 'Nimbot M2',
subtitle: 'Drucker verbinden',
href: '/more/nimbot',
},
];
export default function MoreScreen() {
return (
<View style={styles.screen}>
<ScrollView style={styles.list} contentContainerStyle={styles.listContent}>
<View style={styles.section}>
<Text style={styles.sectionTitle}>Funktionen</Text>
<Text style={styles.sectionSubtitle}>Weitere Bereiche und Einstellungen.</Text>
</View>
{ITEMS.map((item, index) => (
<Pressable key={item.key} style={styles.row} onPress={() => router.push(item.href as any)}>
<View style={styles.rowMain}>
<Text style={styles.rowTitle}>{item.title}</Text>
<Text style={styles.rowSubtitle}>{item.subtitle}</Text>
</View>
<Text style={styles.rowArrow}></Text>
{index < ITEMS.length - 1 ? <View style={styles.rowDivider} /> : null}
</Pressable>
))}
</ScrollView>
</View>
);
}
const styles = StyleSheet.create({
screen: {
flex: 1,
backgroundColor: '#ffffff',
},
list: {
flex: 1,
backgroundColor: '#ffffff',
},
listContent: {
paddingBottom: 24,
},
section: {
paddingHorizontal: 16,
paddingTop: 14,
paddingBottom: 10,
borderBottomWidth: 1,
borderBottomColor: '#e5e7eb',
},
sectionTitle: {
color: '#111827',
fontSize: 17,
fontWeight: '700',
},
sectionSubtitle: {
color: '#6b7280',
fontSize: 13,
marginTop: 3,
},
row: {
paddingHorizontal: 16,
paddingVertical: 14,
backgroundColor: '#ffffff',
position: 'relative',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
gap: 10,
},
rowMain: {
flex: 1,
minWidth: 0,
},
rowTitle: {
color: '#111827',
fontSize: 15,
fontWeight: '600',
},
rowSubtitle: {
color: '#6b7280',
fontSize: 13,
marginTop: 2,
},
rowArrow: {
color: '#9ca3af',
fontSize: 24,
lineHeight: 24,
},
rowDivider: {
position: 'absolute',
left: 16,
right: 16,
bottom: 0,
height: 1,
backgroundColor: '#e5e7eb',
},
});