Skip to content

Commit 236a403

Browse files
committed
feat: implement native SOCDOF Update Center
- Introduce native update management with background checks and auto-restart capability. - Add non-intrusive push notifications for version updates. - Remove legacy manual desktop setup modals. - Strengthen security policies regarding secret isolation and app branding. - Bump version to 24.10.4.
1 parent da0b5bc commit 236a403

23 files changed

Lines changed: 844 additions & 1317 deletions

‎CHANGELOG.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ Format guidelines:
77
- Avoid exhaustive UI/visual layout breakdowns.
88
-->
99

10+
### v24.10.4 — Native SOCDOF Update Center, Push Notifications & Strict Secret Isolation
11+
12+
🚀 **Neu / What's New**:
13+
- **Integriertes SOCDOF Update-Center**: Neuer dedizierter Bereich „Updates & System“ in den Einstellungen (`SettingsModule.tsx`) zum Prüfen auf neue Versionen, Einsehen der installierten Version (`APP_VERSION`) und Starten der Aktualisierung.
14+
- **Transparenter Download- & Neustart-Hinweis**: Der Update-Assistent erläutert transparent die Dauer (ca. 1 Minute für den Download) und den anschließenden automatischen System-Neustart zur Installation.
15+
- **Dezente Push-Benachrichtigungen (Unten Rechts)**: Unaufdringliche Benachrichtigungs-Toasts in der unteren rechten Bildschirmecke informieren über bereitstehende Versionen mit Sofort-Aktionen („Später“ / „Jetzt herunterladen“).
16+
17+
🔄 **Geändert / Improved**:
18+
- **Vollständige 4-Sprachen-Lokalisierung**: Alle Update-Dialoge, Statusanzeigen, Buttons und Hinweistexte sind in Deutsch (`de`), Englisch (`en`), Französisch (`fr`) und Spanisch (`es`) in `src/lib/i18n.ts` hinterlegt.
19+
- **Eigenständige Markenidentität**: In `INSTRUCTIONS.md` verankert, dass SOCDOF eine eigenständige Suite ist und Funktionen nativ gestaltet werden, ohne als bloße Drittsystem-Kopien deklariert zu werden.
20+
- **Bereinigte Desktop-Einstellungen**: Öffentliche GitHub-Download-Links wurden aus den App-Einstellungen entfernt; die Aktualisierung erfolgt nativ und sicher über das interne Update-Center.
21+
22+
🛠️ **Behoben / Fixed**:
23+
- **Entfernung des veralteten Desktop-Setup-Modals**: Das Skript- und Installer-Auswahlfenster (`WindowsDesktopManagerModal` mit .cmd, .bat, .ps1 und .EXE Releases) sowie der zugehörige Button „Windows Starter & Scripts“ in den Einstellungen wurden restlos entfernt. Die Systemaktualisierung läuft ab sofort ausschließlich transparent und nativ über das neue interne SOCDOF Update-Center.
24+
- **Sicherheits-Fix & Entfernung von UI-Token-Buttons**: Bot-Token-Eingaben und Konfigurations-Buttons wurden vollständig aus der Benutzeroberfläche (Reports-App und Einstellungen) entfernt. Das Discord-Bot-Token wird ab sofort strikt aus der git-ignorierten `.env`-Datei (`VITE_DISCORD_BOT_TOKEN`) bezogen und kann nicht mehr im Browser oder von Endnutzern/Bauleitern eingesehen oder manipuliert werden.
25+
- **Update-Toast Datenübergabe**: Behoben, dass beim Klick auf „Jetzt herunterladen“ in der Toast-Benachrichtigung die Update-Informationen versehentlich zurückgesetzt wurden.
26+
- **Dark Mode Hover Kontrast & Hydration**: Bereinigung der Textkontraste (`dark:hover:text-white`), verschachtelter Buttons und HTML-Hydration-Warnungen.
27+
28+
---
29+
1030
### v24.10.2 — Obsidian Squircle Icon, Gradient Action Button & Structured Installer Layout
1131

1232
🚀 **Neu / What's New**:

‎INSTRUCTIONS.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ This document defines the core operational standards, versioning protocols, and
6666

6767
## 5. Publisher & Desktop Branding Identity
6868

69+
- **Independent Product Identity (No Copying / "Nicht nachmachen")**: SOCDOF is an independent offline ERP and productivity suite with its own distinct, native identity. Never brand features or UI elements as mere "clones" or "copies" of external operating systems (avoid framing features as "nachgemacht" or "Windows-Klon" in user-facing labels or documentation). All dialogs, update mechanisms, push notifications, and settings are first-class native SOCDOF components.
70+
- **Strict Secret Isolation & No Public UI Token Configuration**:
71+
- Sensitive developer credentials such as Discord Bot Tokens, administrative webhook URLs, and internal distribution parameters must NEVER be exposed or editable inside end-user UI screens (such as Bug Reports, feedback dialogs, or user settings) where end-users, customers, or site managers (Bauleiter) could see or manipulate them.
72+
- All secrets and tokens are loaded strictly from git-ignored local environment configuration (`.env` via `VITE_DISCORD_BOT_TOKEN`), preventing unauthorized access or accidental token leakage in public repositories.
6973
- **Publisher / Author**: The official publisher and author name for Windows binaries, packages, and certificates is strictly **`Yuri / Strudel`** (Organization: `Strudelcode`).
7074
- **Code Signing**: Binaries in `release/` are signed with the developer Authenticode certificate for `CN=Yuri / Strudel, O=Strudelcode` so that Windows SmartScreen and installer dialogs accurately present the publisher as **Yuri / Strudel**.
7175
- **No Intrusive Web Popups**: The web preview must remain clean and unobtrusive. Never attach aggressive auto-triggering mouseleave/exit-intent popups.

‎electron/main.cjs‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,27 +1326,36 @@ ipcMain.handle('socdof:download-and-install-update', async (_event, payload) =>
13261326
mainWindow.webContents.send('socdof:update-download-progress', { percent: 100, isFinished: true });
13271327
}
13281328

1329-
// Launch installer detached with silent in-place update flags (/S --force-run)
1330-
// This updates the existing installation directory without prompting for paths and relaunches the app automatically
1329+
// Launch installer detached with silent in-place update flags (/S --auto --update)
1330+
// We launch via a lightweight PowerShell runner that waits for the current Electron PID to exit,
1331+
// guaranteeing zero Windows file locks on SOCDOF.exe before the installer touches any files.
13311332
setTimeout(() => {
1332-
let child = null;
1333+
const currentPid = process.pid;
1334+
const safeEscapedPath = installerPath.replace(/"/g, '`"');
1335+
const launcherCmd = `Wait-Process -Id ${currentPid} -Timeout 5 -ErrorAction SilentlyContinue; Start-Process -FilePath "${safeEscapedPath}" -ArgumentList "/S", "--auto", "--update"`;
1336+
13331337
try {
1334-
child = spawn(installerPath, ['/S', '--force-run'], {
1338+
const child = spawn('powershell.exe', [
1339+
'-NoProfile',
1340+
'-WindowStyle', 'Hidden',
1341+
'-ExecutionPolicy', 'Bypass',
1342+
'-Command', launcherCmd
1343+
], {
13351344
detached: true,
13361345
stdio: 'ignore'
13371346
});
13381347
child.unref();
13391348
} catch (spawnErr) {
1340-
console.error('Failed to spawn installer, opening with shell:', spawnErr);
1349+
console.error('Failed to spawn installer via launcher:', spawnErr);
13411350
shell.openPath(installerPath);
13421351
}
13431352

13441353
// Show native Windows "Updating to Version..." splash window while installer runs
1345-
spawnWindowsUpdatingSplash(safeVersion, child ? child.pid : 0);
1354+
spawnWindowsUpdatingSplash(safeVersion, 0);
13461355

1347-
// Exit app cleanly to allow the installer to overwrite files
1356+
// Exit app cleanly so all file locks on SOCDOF.exe are released immediately
13481357
app.exit(0);
1349-
}, 1200);
1358+
}, 400);
13501359

13511360
return { success: true };
13521361
} catch (err) {

0 commit comments

Comments
 (0)