mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Refactor web app code and add background color setting
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import type { Snippet } from "svelte";
|
||||
import { navigating } from "$app/stores";
|
||||
import LoadingSpinner from "$lib/components/LoadingSpinner.svelte";
|
||||
import { LOADING_DELAY } from "$lib/utils";
|
||||
|
||||
const { data, children }: { data: LayoutServerData; children: Snippet } = $props();
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
$effect(() => {
|
||||
if ($navigating && ["link", "goto"].includes($navigating.type)) {
|
||||
loadingDelay = window.setTimeout(() => (loading = true), 500);
|
||||
loadingDelay = window.setTimeout(() => (loading = true), LOADING_DELAY);
|
||||
} else {
|
||||
window.clearTimeout(loadingDelay);
|
||||
loading = false;
|
||||
|
||||
Reference in New Issue
Block a user