Revert "Refactor OTA update handling and improve error reporting."

This reverts commit 7c128a27eb.
This commit is contained in:
2026-03-17 22:17:32 +01:00
parent 07cf97fffb
commit ce981232f0

View File

@@ -3,7 +3,7 @@ class ToastService {
private stylesInjected = false; private stylesInjected = false;
constructor() { constructor() {
this.container = document.getElementById('toast-container') as HTMLElement; this.container = this.ensureContainer();
this.injectStyles(); this.injectStyles();
} }
@@ -41,6 +41,16 @@ class ToastService {
return div; 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() { private injectStyles() {
if (this.stylesInjected) return; if (this.stylesInjected) return;
const style = document.createElement('style'); const style = document.createElement('style');