Refactor OTA update handling and improve error reporting.

Added a CRC check to firmware uploads, streamlined OTA partition management, and replaced detailed slot states with a single unified state representation. Improved consistency in variable formatting, error handling, and code readability across multiple modules.
This commit is contained in:
2026-03-17 22:16:31 +01:00
parent a069888341
commit 7c128a27eb

View File

@@ -3,7 +3,7 @@ class ToastService {
private stylesInjected = false;
constructor() {
this.container = this.ensureContainer();
this.container = document.getElementById('toast-container') as HTMLElement;
this.injectStyles();
}
@@ -41,16 +41,6 @@ class ToastService {
return div;
}
private ensureContainer(): HTMLElement {
let container = document.getElementById('toast-container');
if (!container) {
container = document.createElement('div');
container.id = 'toast-container';
document.body.appendChild(container);
}
return container;
}
private injectStyles() {
if (this.stylesInjected) return;
const style = document.createElement('style');