feat(04-02): global error handler + child-friendly error overlay

- Add error overlay HTML element in index.html before script tag
- Add window error + unhandledrejection listeners in main.ts
- Add error overlay CSS styles (fixed, z-index 9999, tree icon, reload button)
- Error message: "Oh, der Wald braucht kurz eine Pause..."
This commit is contained in:
2026-03-29 18:16:34 +02:00
parent 5396dc0e62
commit f3cb948878
3 changed files with 59 additions and 0 deletions
+8
View File
@@ -183,6 +183,14 @@
</div>
</section>
<div id="error-overlay" class="error-overlay" style="display:none">
<div class="error-overlay__content">
<p class="error-overlay__icon">&#x1F333;</p>
<p class="error-overlay__message">Oh, der Wald braucht kurz eine Pause...</p>
<button class="error-overlay__btn" onclick="location.reload()">Nochmal versuchen</button>
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>