Fix 8 critical/high resilience issues across camera, preview, logger, settings, and admin
This commit is contained in:
@@ -65,6 +65,7 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
const [countdown, setCountdown] = useState<string>(String(currentSettings.countdownDuration));
|
||||
const [printerIp, setPrinterIp] = useState<string>(currentSettings.printerIp);
|
||||
const [password, setPassword] = useState<string>(currentSettings.adminPassword);
|
||||
const [isTogglingKiosk, setIsTogglingKiosk] = useState<boolean>(false);
|
||||
const [logs, setLogs] = useState<string | null>(null);
|
||||
const scrollViewRef = useRef<ScrollView>(null);
|
||||
|
||||
@@ -98,7 +99,9 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
|
||||
const handleKioskToggle = (enable: boolean) => {
|
||||
const handleKioskToggle = async (enable: boolean) => {
|
||||
if (isTogglingKiosk) return;
|
||||
setIsTogglingKiosk(true);
|
||||
try {
|
||||
if (enable) {
|
||||
const success = KioskMode.startKiosk();
|
||||
@@ -124,6 +127,8 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
}
|
||||
} catch (e: any) {
|
||||
Alert.alert('Nativer Fehler', e.message || 'Fehler im Kiosk-Modul');
|
||||
} finally {
|
||||
setIsTogglingKiosk(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -298,6 +303,7 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
||||
placeholder="Standard: 1234"
|
||||
placeholderTextColor={THEME.colors.textMuted}
|
||||
secureTextEntry
|
||||
maxLength={20}
|
||||
value={password}
|
||||
onChangeText={setPassword}
|
||||
keyboardType="number-pad"
|
||||
|
||||
Reference in New Issue
Block a user