FEAT: Reworked pop up notifications across all events

This commit is contained in:
valerio
2026-07-25 19:07:19 +02:00
parent 1cecec5a97
commit b1e3644e9d
9 changed files with 77 additions and 24 deletions
+10 -2
View File
@@ -18,6 +18,7 @@
import Popup from '$lib/components/Popup.svelte';
import Dialog from '$lib/components/Dialog.svelte';
import Splash from '$lib/components/Splash.svelte';
import { notification } from '$lib/notification.js';
// states
let fadeInSettings = { duration: 100 };
@@ -27,10 +28,17 @@
let installedVersions = $state([]);
let downloadTasks = $state([]);
let settings = $state();
let notificationPopup;
let initialized = $state(false);
let version = $state('');
let loadingState = $state('loading'); // load, update, initialized
notification.subscribe((n) => {
if (n) {
notificationPopup?.pop(n.message, n.timeout);
}
});
async function initStoresListeners() {
currentSettings.subscribe((value) => {
settings = value;
@@ -68,7 +76,7 @@
});
</script>
<Popup content="Are you sure you want to delete this file?" type="confirm" />
<Popup bind:this={notificationPopup} />
<Dialog />
<div id="main">
@@ -194,7 +202,7 @@
#tabcontent {
background-color: var(--light);
box-sizing: border-box;
height: calc(100vh - 5rem);
height: calc(100vh - 3rem);
padding: 1rem;
max-height: 100%;
}