Localize app to German, implement auto-save to gallery, always-on camera stream, fix expo-media-library and expo-file-system deprecation/compile errors
This commit is contained in:
+32
-32
@@ -53,42 +53,42 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
if (success) {
|
||||
setKioskActive(true);
|
||||
Alert.alert(
|
||||
'Kiosk Mode Started',
|
||||
'Kiosk-Modus gestartet',
|
||||
isDeviceOwner
|
||||
? 'True Kiosk Mode active. System navigation buttons are completely locked.'
|
||||
: 'Screen Pinning initiated. Accept the OS prompt to lock the screen.'
|
||||
? 'Echter Kiosk-Modus aktiv. Die System-Navigationsleiste ist vollständig gesperrt.'
|
||||
: 'Bildschirmheftung (Screen Pinning) gestartet. Bitte bestätige das Systemfenster, um den Bildschirm zu sperren.'
|
||||
);
|
||||
} else {
|
||||
Alert.alert('Error', 'Failed to start Kiosk Mode.');
|
||||
Alert.alert('Fehler', 'Kiosk-Modus konnte nicht gestartet werden.');
|
||||
}
|
||||
} else {
|
||||
const success = KioskMode.stopKiosk();
|
||||
if (success) {
|
||||
setKioskActive(false);
|
||||
Alert.alert('Kiosk Mode Stopped', 'System navigation buttons are unlocked.');
|
||||
Alert.alert('Kiosk-Modus beendet', 'Die Navigationstasten des Systems sind wieder freigegeben.');
|
||||
} else {
|
||||
Alert.alert('Error', 'Failed to stop Kiosk Mode.');
|
||||
Alert.alert('Fehler', 'Kiosk-Modus konnte nicht beendet werden.');
|
||||
}
|
||||
}
|
||||
} catch (e: any) {
|
||||
Alert.alert('Native Error', e.message || 'Kiosk module error');
|
||||
Alert.alert('Nativer Fehler', e.message || 'Fehler im Kiosk-Modul');
|
||||
}
|
||||
};
|
||||
|
||||
const handleSave = async () => {
|
||||
const duration = parseInt(countdown, 10);
|
||||
if (isNaN(duration) || duration < 1 || duration > 30) {
|
||||
Alert.alert('Invalid Input', 'Countdown duration must be a number between 1 and 30 seconds.');
|
||||
Alert.alert('Ungültige Eingabe', 'Die Countdown-Dauer muss eine Zahl zwischen 1 und 30 Sekunden sein.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!printerIp.trim()) {
|
||||
Alert.alert('Invalid Input', 'Printer IP address cannot be empty.');
|
||||
Alert.alert('Ungültige Eingabe', 'Die Drucker-IP-Adresse darf nicht leer sein.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!password.trim() || password.length < 4) {
|
||||
Alert.alert('Invalid Input', 'Admin password must be at least 4 digits.');
|
||||
Alert.alert('Ungültige Eingabe', 'Das Admin-Passwort muss mindestens 4 Ziffern lang sein.');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,33 +102,33 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
try {
|
||||
await saveSettings(updated);
|
||||
onSave(updated);
|
||||
Alert.alert('Success', 'Settings saved successfully!');
|
||||
Alert.alert('Erfolg', 'Einstellungen erfolgreich gespeichert!');
|
||||
} catch (e) {
|
||||
Alert.alert('Error', 'Failed to save settings to disk.');
|
||||
Alert.alert('Fehler', 'Einstellungen konnten nicht gespeichert werden.');
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.headerRow}>
|
||||
<Text style={styles.title}>SCHNAPPIX SETTINGS</Text>
|
||||
<Text style={styles.title}>SCHNAPPIX EINSTELLUNGEN</Text>
|
||||
<TouchableOpacity style={styles.closeBtn} onPress={onClose}>
|
||||
<Text style={styles.closeBtnText}>Back to Booth</Text>
|
||||
<Text style={styles.closeBtnText}>Zurück zur Fotobox</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
<ScrollView contentContainerStyle={styles.scrollContent}>
|
||||
{/* Printer Configurations */}
|
||||
<View style={styles.card}>
|
||||
<Text style={styles.cardTitle}>Printer Configuration</Text>
|
||||
<Text style={styles.cardTitle}>Drucker-Konfiguration</Text>
|
||||
<Text style={styles.cardDesc}>
|
||||
Configure the local IP address of your Wi-Fi connected Canon CP1300 printer.
|
||||
Konfiguriere die lokale IP-Adresse deines über WLAN verbundenen Canon CP1300 Druckers.
|
||||
</Text>
|
||||
<View style={styles.inputGroup}>
|
||||
<Text style={styles.label}>Printer IP Address</Text>
|
||||
<Text style={styles.label}>Drucker IP-Adresse</Text>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
placeholder="e.g. 192.168.1.100"
|
||||
placeholder="z.B. 192.168.1.100"
|
||||
placeholderTextColor={THEME.colors.textMuted}
|
||||
value={printerIp}
|
||||
onChangeText={setPrinterIp}
|
||||
@@ -139,12 +139,12 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
|
||||
{/* Booth Behavior */}
|
||||
<View style={styles.card}>
|
||||
<Text style={styles.cardTitle}>Photo Booth Behavior</Text>
|
||||
<Text style={styles.cardTitle}>Fotobox-Verhalten</Text>
|
||||
<View style={styles.inputGroup}>
|
||||
<Text style={styles.label}>Countdown Duration (seconds)</Text>
|
||||
<Text style={styles.label}>Countdown-Dauer (Sekunden)</Text>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
placeholder="Default: 3"
|
||||
placeholder="Standard: 3"
|
||||
placeholderTextColor={THEME.colors.textMuted}
|
||||
value={countdown}
|
||||
onChangeText={setCountdown}
|
||||
@@ -152,10 +152,10 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.inputGroup}>
|
||||
<Text style={styles.label}>Admin Panel Password</Text>
|
||||
<Text style={styles.label}>Admin-Passwort</Text>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
placeholder="Default: 1234"
|
||||
placeholder="Standard: 1234"
|
||||
placeholderTextColor={THEME.colors.textMuted}
|
||||
secureTextEntry
|
||||
value={password}
|
||||
@@ -167,33 +167,33 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
|
||||
{/* Security & Kiosk Mode */}
|
||||
<View style={styles.card}>
|
||||
<Text style={styles.cardTitle}>Kiosk Mode & Security</Text>
|
||||
<Text style={styles.cardTitle}>Kiosk-Modus & Sicherheit</Text>
|
||||
<Text style={styles.cardDesc}>
|
||||
Lock the screen to prevent guests from closing the app or opening system settings.
|
||||
Sperre den Bildschirm, um zu verhindern, dass Gäste die App schließen oder auf die Systemeinstellungen zugreifen.
|
||||
</Text>
|
||||
|
||||
<View style={styles.statusRow}>
|
||||
<Text style={styles.statusLabel}>Kiosk Mode State:</Text>
|
||||
<Text style={styles.statusLabel}>Kiosk-Modus Status:</Text>
|
||||
<Text style={[styles.statusValue, kioskActive ? styles.statusActive : styles.statusInactive]}>
|
||||
{kioskActive ? 'LOCKED 🔒' : 'UNLOCKED 🔓'}
|
||||
{kioskActive ? 'GESPERRT 🔒' : 'ENTSPERRT 🔓'}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View style={styles.statusRow}>
|
||||
<Text style={styles.statusLabel}>Device Owner Mode:</Text>
|
||||
<Text style={styles.statusLabel}>Device-Owner-Modus:</Text>
|
||||
<Text style={[styles.statusValue, isDeviceOwner ? styles.statusActive : styles.statusWarning]}>
|
||||
{isDeviceOwner ? 'ACTIVE (True Lock) ✅' : 'INACTIVE (Screen Pinning Fallback) ⚠️'}
|
||||
{isDeviceOwner ? 'AKTIV (Echte Sperre) ✅' : 'INAKTIV (Screen Pinning Fallback) ⚠️'}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{!isDeviceOwner && (
|
||||
<Text style={styles.kioskWarningText}>
|
||||
Note: To enable True Lock task mode without prompt bypasses, make the app device owner using ADB.
|
||||
Hinweis: Um den echten Lock-Task-Modus ohne Bestätigungsaufforderung zu aktivieren, mache die App mittels ADB zum Device Owner.
|
||||
</Text>
|
||||
)}
|
||||
|
||||
<View style={styles.toggleRow}>
|
||||
<Text style={styles.toggleLabel}>Lock Screen (Kiosk Mode)</Text>
|
||||
<Text style={styles.toggleLabel}>Bildschirm sperren (Kiosk-Modus)</Text>
|
||||
<Switch
|
||||
value={kioskActive}
|
||||
onValueChange={handleKioskToggle}
|
||||
@@ -204,7 +204,7 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
</View>
|
||||
|
||||
<TouchableOpacity style={styles.saveBtn} onPress={handleSave}>
|
||||
<Text style={styles.saveBtnText}>SAVE SETTINGS</Text>
|
||||
<Text style={styles.saveBtnText}>EINSTELLUNGEN SPEICHERN</Text>
|
||||
</TouchableOpacity>
|
||||
</ScrollView>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user