FEAT: Reworked pop up notifications across all events
This commit is contained in:
+10
-2
@@ -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%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user