Fix printer IP to 192.168.0.1
This commit is contained in:
@@ -213,7 +213,11 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS
|
|||||||
|
|
||||||
const ipTrimmed = printerIp.trim();
|
const ipTrimmed = printerIp.trim();
|
||||||
const ipRegex = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/;
|
const ipRegex = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/;
|
||||||
if (ipTrimmed !== '' && ipTrimmed !== '192.168.' && !ipRegex.test(ipTrimmed)) {
|
if (!ipTrimmed) {
|
||||||
|
Alert.alert('Ungültige Eingabe', 'Die Drucker-IP-Adresse darf nicht leer sein.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!ipRegex.test(ipTrimmed)) {
|
||||||
Alert.alert('Ungültige Eingabe', 'Bitte gib eine gültige IP-Adresse ein (z.B. 192.168.1.100).');
|
Alert.alert('Ungültige Eingabe', 'Bitte gib eine gültige IP-Adresse ein (z.B. 192.168.1.100).');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const settingsFile = new File(Paths.document, 'settings.json');
|
|||||||
const DEFAULT_SETTINGS: AppSettings = {
|
const DEFAULT_SETTINGS: AppSettings = {
|
||||||
appLastUpdate: null,
|
appLastUpdate: null,
|
||||||
countdownDuration: 3,
|
countdownDuration: 3,
|
||||||
printerIp: '192.168.',
|
printerIp: '192.168.0.1',
|
||||||
adminPassword: '1234',
|
adminPassword: '1234',
|
||||||
kioskModeEnabled: false,
|
kioskModeEnabled: false,
|
||||||
frameMode: 'available',
|
frameMode: 'available',
|
||||||
|
|||||||
Reference in New Issue
Block a user