version 0.0.04
This commit is contained in:
parent
afcd45d32f
commit
b5f1bf6d2c
|
|
@ -43,6 +43,11 @@ Alle Änderungen am Projekt. Format: [Keep a Changelog](https://keepachangelog.c
|
||||||
- `build.sh` schreibt `org.gradle.java.home` dynamisch in `gradle.properties` — verhindert dass Gradle kaputte JVM-Pfade findet (`/usr/lib/jvm/openjdk-17` ohne bin/java)
|
- `build.sh` schreibt `org.gradle.java.home` dynamisch in `gradle.properties` — verhindert dass Gradle kaputte JVM-Pfade findet (`/usr/lib/jvm/openjdk-17` ohne bin/java)
|
||||||
- `minSdkVersion` 21 → 23 — `react-native-camera-kit` braucht mindestens API 23
|
- `minSdkVersion` 21 → 23 — `react-native-camera-kit` braucht mindestens API 23
|
||||||
|
|
||||||
|
**Android App — Credentials Persistenz**
|
||||||
|
- Verbindungsdaten (Host, Port, Token) werden nach QR-Scan in AsyncStorage gespeichert
|
||||||
|
- Beim App-Start automatisch geladen und verbunden — einmal scannen, nie wieder
|
||||||
|
- Neue Dependency: `@react-native-async-storage/async-storage`
|
||||||
|
|
||||||
**Docker & Infrastruktur**
|
**Docker & Infrastruktur**
|
||||||
- OpenClaw Image fix: `openclaw/openclaw:latest` → `ghcr.io/openclaw/openclaw:latest`
|
- OpenClaw Image fix: `openclaw/openclaw:latest` → `ghcr.io/openclaw/openclaw:latest`
|
||||||
- `libportaudio2` in Bridge Dockerfile hinzugefügt — `sounddevice` braucht PortAudio
|
- `libportaudio2` in Bridge Dockerfile hinzugefügt — `sounddevice` braucht PortAudio
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@
|
||||||
"@react-native-community/geolocation": "^3.2.1",
|
"@react-native-community/geolocation": "^3.2.1",
|
||||||
"react-native-image-picker": "^7.1.0",
|
"react-native-image-picker": "^7.1.0",
|
||||||
"react-native-permissions": "^4.1.4",
|
"react-native-permissions": "^4.1.4",
|
||||||
"react-native-camera-kit": "^13.0.0"
|
"react-native-camera-kit": "^13.0.0",
|
||||||
|
"@react-native-async-storage/async-storage": "^1.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
* typisierte Nachrichten.
|
* typisierte Nachrichten.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
|
|
||||||
// --- Typen ---
|
// --- Typen ---
|
||||||
|
|
||||||
export type ConnectionState = 'connecting' | 'connected' | 'disconnected';
|
export type ConnectionState = 'connecting' | 'connected' | 'disconnected';
|
||||||
|
|
@ -232,12 +234,13 @@ class RVSConnection {
|
||||||
this.messageListeners.forEach(cb => cb(message));
|
this.messageListeners.forEach(cb => cb(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Persistenz (AsyncStorage Wrapper) ---
|
// --- Persistenz ---
|
||||||
|
|
||||||
|
private static readonly STORAGE_KEY = 'rvs_config';
|
||||||
|
|
||||||
private async saveConfig(config: ConnectionConfig): Promise<void> {
|
private async saveConfig(config: ConnectionConfig): Promise<void> {
|
||||||
try {
|
try {
|
||||||
// In Produktion: AsyncStorage verwenden
|
await AsyncStorage.setItem(RVSConnection.STORAGE_KEY, JSON.stringify(config));
|
||||||
// await AsyncStorage.setItem('rvs_config', JSON.stringify(config));
|
|
||||||
console.log('[RVS] Konfiguration gespeichert');
|
console.log('[RVS] Konfiguration gespeichert');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('[RVS] Fehler beim Speichern:', err);
|
console.error('[RVS] Fehler beim Speichern:', err);
|
||||||
|
|
@ -246,9 +249,12 @@ class RVSConnection {
|
||||||
|
|
||||||
async loadConfig(): Promise<ConnectionConfig | null> {
|
async loadConfig(): Promise<ConnectionConfig | null> {
|
||||||
try {
|
try {
|
||||||
// In Produktion: AsyncStorage verwenden
|
const data = await AsyncStorage.getItem(RVSConnection.STORAGE_KEY);
|
||||||
// const data = await AsyncStorage.getItem('rvs_config');
|
if (data) {
|
||||||
// if (data) { this.config = JSON.parse(data); return this.config; }
|
this.config = JSON.parse(data);
|
||||||
|
console.log('[RVS] Konfiguration geladen');
|
||||||
|
return this.config;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('[RVS] Fehler beim Laden:', err);
|
console.error('[RVS] Fehler beim Laden:', err);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue