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:
2026-05-25 21:39:15 +02:00
parent 99634bb480
commit d8e397eac1
9 changed files with 474 additions and 135 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import ipp from 'ipp-encoder';
import { Buffer } from 'buffer';
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';
export interface PrintOptions {
ipAddress: string;
@@ -19,7 +19,7 @@ export async function printImageLocal(imageUri: string, options: PrintOptions):
const { ipAddress, jobName = 'Schnappix Photo', username = 'Schnappix Kiosk' } = options;
if (!ipAddress) {
throw new Error('Printer IP address is required.');
throw new Error('Drucker-IP-Adresse ist erforderlich.');
}
// 1. Read the image file from local storage as Base64 and convert to binary Buffer
@@ -69,7 +69,7 @@ export async function printImageLocal(imageUri: string, options: PrintOptions):
});
if (!response.ok) {
throw new Error(`Printer responded with HTTP status ${response.status}: ${response.statusText}`);
throw new Error(`Drucker antwortete mit HTTP-Status ${response.status}: ${response.statusText}`);
}
// 6. Read and decode the response from the printer to verify success
@@ -82,7 +82,7 @@ export async function printImageLocal(imageUri: string, options: PrintOptions):
// IPP success status is 0x0000 (successful-ok)
if (statusCode !== 0x0000) {
throw new Error(`Printer returned IPP error code: 0x${statusCode.toString(16)}`);
throw new Error(`Drucker lieferte IPP-Fehlercode: 0x${statusCode.toString(16)}`);
}
console.log('Silent print job accepted successfully!');
} catch (e: any) {
+1 -1
View File
@@ -1,4 +1,4 @@
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';
export interface AppSettings {
countdownDuration: number; // in seconds
+1 -1
View File
@@ -1,4 +1,4 @@
import * as MediaLibrary from 'expo-media-library';
import * as MediaLibrary from 'expo-media-library/legacy';
import { Platform } from 'react-native';
const ALBUM_NAME = 'Schnappix';