Minor fixes.

This commit is contained in:
Alfred Jophy 2026-02-05 17:28:58 +05:30
commit 993b93bc30
2 changed files with 5 additions and 11 deletions

2
.gitignore vendored
View file

@ -8,6 +8,8 @@ node_modules
/.svelte-kit /.svelte-kit
/build /build
*.tar.gz
# OS # OS
.DS_Store .DS_Store
Thumbs.db Thumbs.db

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { browser, dev } from '$app/environment'; import { browser, dev } from '$app/environment';
import { onDestroy, onMount } from 'svelte'; import { onMount } from 'svelte';
const UMAMI_DISABLED_KEY = 'umami.disabled'; const UMAMI_DISABLED_KEY = 'umami.disabled';
@ -11,7 +11,7 @@
websiteId: string; websiteId: string;
tags?: string | string[]; tags?: string | string[];
async?: boolean; async?: boolean;
enable?: boolean; // enable?: boolean;
hostUrl?: string; hostUrl?: string;
autoTrack?: boolean; autoTrack?: boolean;
domains?: string | string[]; domains?: string | string[];
@ -76,20 +76,12 @@
onMount(() => { onMount(() => {
if (browser) { if (browser) {
if (dev && !rest.enable) { if (dev) {
//@ts-expect-error AS PER DOC //@ts-expect-error AS PER DOC
localStorage.setItem(UMAMI_DISABLED_KEY, 1); localStorage.setItem(UMAMI_DISABLED_KEY, 1);
} }
} }
}); });
onDestroy(() => {
if (browser) {
if (dev && !rest.enable) {
localStorage.removeItem(UMAMI_DISABLED_KEY);
}
}
});
</script> </script>
<svelte:head> <svelte:head>