diff --git a/android/src/screens/SettingsScreen.tsx b/android/src/screens/SettingsScreen.tsx index a416c07..f151757 100644 --- a/android/src/screens/SettingsScreen.tsx +++ b/android/src/screens/SettingsScreen.tsx @@ -76,6 +76,18 @@ interface EventEntry { type LogTab = 'live' | 'events'; +// Settings-Sub-Screens. Reihenfolge im Hauptmenue. +const SETTINGS_SECTIONS = [ + { id: 'connection', icon: '🔌', label: 'Verbindung', desc: 'Server, Token, Status, Verbindungslog' }, + { id: 'general', icon: 'âš™ī¸', label: 'Allgemein', desc: 'Betriebsmodus, GPS-Standort' }, + { id: 'voice_input', icon: 'đŸŽ™ī¸', label: 'Spracheingabe', desc: 'Stille-Toleranz, Aufnahmedauer' }, + { id: 'wake_word', icon: '👂', label: 'Wake-Word', desc: 'Wake-Word-Auswahl' }, + { id: 'voice_output', icon: '🔊', label: 'Sprachausgabe', desc: 'Stimmen, Pre-Roll, Geschwindigkeit' }, + { id: 'storage', icon: '📁', label: 'Speicher', desc: 'Anhang-Speicherort, Auto-Download' }, + { id: 'protocol', icon: '📜', label: 'Protokoll', desc: 'Privatsphaere, Backup' }, + { id: 'about', icon: 'â„šī¸', label: 'Ueber', desc: 'App-Version, Update' }, +] as const; + // Container-Farben fuer Live-Logs const SOURCE_COLORS: Record = { 'aria-core': '#4A9EFF', // Blau @@ -116,6 +128,10 @@ const SettingsScreen: React.FC = () => { const [availableVoices, setAvailableVoices] = useState>([]); const [voiceCloneVisible, setVoiceCloneVisible] = useState(false); const [tempPath, setTempPath] = useState(''); + // Sub-Screen Navigation: null = Hauptmenue, sonst eine der Section-IDs. + // So bleibt aller geteilte State im selben Component-Closure und wir + // brauchen keine react-navigation-Stack-Setup. + const [currentSection, setCurrentSection] = useState(null); let logIdCounter = 0; @@ -493,7 +509,39 @@ const SettingsScreen: React.FC = () => { /> + {currentSection === null && ( + <> + {SETTINGS_SECTIONS.map(s => ( + setCurrentSection(s.id)} + > + {s.icon} + + {s.label} + {s.desc} + + â€ē + + ))} + + )} + + {currentSection !== null && ( + setCurrentSection(null)} + > + ‹ + + {SETTINGS_SECTIONS.find(s => s.id === currentSection)?.label || ''} + + + )} + {/* === Verbindung === */} + {currentSection === 'connection' && (<> Verbindung {/* Status-Anzeige */} @@ -590,8 +638,10 @@ const SettingsScreen: React.FC = () => { Log l{'\u00F6'}schen + )} {/* === Modus === */} + {currentSection === 'general' && (<> Betriebsmodus @@ -615,8 +665,10 @@ const SettingsScreen: React.FC = () => { /> + )} {/* === Spracheingabe (geraetelokal) === */} + {currentSection === 'voice_input' && (<> Spracheingabe Stille-Toleranz @@ -718,7 +770,10 @@ const SettingsScreen: React.FC = () => { + )} + {/* === Wake-Word (komplett on-device, openWakeWord) === */} + {currentSection === 'wake_word' && (<> Wake-Word @@ -774,8 +829,10 @@ const SettingsScreen: React.FC = () => { {wakeStatus} )} + )} {/* === Sprachausgabe (geraetelokal) === */} + {currentSection === 'voice_output' && (<> Sprachausgabe @@ -918,7 +975,10 @@ const SettingsScreen: React.FC = () => { )} + )} + {/* === Speicher === */} + {currentSection === 'storage' && (<> Anhang-Speicher @@ -993,7 +1053,10 @@ const SettingsScreen: React.FC = () => { )} + )} + {/* === Logs === */} + {currentSection === 'protocol' && (<> Protokoll {/* Tab-Umschalter */} @@ -1072,8 +1135,10 @@ const SettingsScreen: React.FC = () => { Protokoll l\u00F6schen + )} {/* === About === */} + {currentSection === 'about' && (<> {'\u00DC'}ber ARIA Cockpit @@ -1093,6 +1158,7 @@ const SettingsScreen: React.FC = () => { Auf Updates pr{'\u00FC'}fen + )} {/* Platz am Ende */} @@ -1121,6 +1187,58 @@ const styles = StyleSheet.create({ marginBottom: 8, marginLeft: 4, }, + menuItem: { + flexDirection: 'row', + alignItems: 'center', + backgroundColor: '#1E1E2E', + borderRadius: 10, + paddingVertical: 14, + paddingHorizontal: 14, + marginBottom: 8, + }, + menuItemIcon: { + fontSize: 22, + marginRight: 14, + width: 28, + textAlign: 'center', + }, + menuItemTextWrap: { + flex: 1, + }, + menuItemLabel: { + color: '#FFFFFF', + fontSize: 16, + fontWeight: '600', + }, + menuItemDesc: { + color: '#8888AA', + fontSize: 12, + marginTop: 2, + }, + menuItemChevron: { + color: '#8888AA', + fontSize: 24, + fontWeight: '300', + marginLeft: 8, + }, + subScreenHeader: { + flexDirection: 'row', + alignItems: 'center', + paddingVertical: 8, + marginBottom: 8, + }, + subScreenBack: { + color: '#0096FF', + fontSize: 32, + fontWeight: '300', + marginRight: 12, + lineHeight: 36, + }, + subScreenTitle: { + color: '#FFFFFF', + fontSize: 20, + fontWeight: '700', + }, card: { backgroundColor: '#12122A', borderRadius: 14,