Compare commits

..

No commits in common. "4dffc731b6b75f2a7f804db4424941e8f36aaeaf" and "bd57812964a072a167fae257eb3341f650c6a684" have entirely different histories.

4 changed files with 47 additions and 16 deletions

View file

@ -1,10 +1,11 @@
<script lang="ts">
import BottomAppBar from '$lib/components/BottomAppBar.svelte';
import Toast from '$lib/components/Toast.svelte';
import { onMount } from 'svelte';
// import Toast from '$lib/components/Toast.svelte';
// import { onMount } from 'svelte';
let node: HTMLElement;
let node;
/**
onMount(() => {
if(import.meta.env.DEV) return;
@ -16,30 +17,22 @@
if (BroadcastChannel) {
const channel = new BroadcastChannel('sw-messages');
channel.addEventListener('message', (event) => {
console.log(event.data);
new Toast({ target: node });
});
} else {
navigator.serviceWorker.addEventListener('message', (evt) => {
console.log(evt.data);
new Toast({ target: node });
});
}
navigator.serviceWorker.ready.then((registration) => {
registration?.active?.postMessage('Save client');
registration.active.postMessage('Save client');
});
}
});
onNavigate((navigation: { complete: any; }) => {
if (!(document.startViewTransition)) return;
return new Promise<void>((resolve) => {
document?.startViewTransition(async () => {
resolve();
await navigation.complete;
});
});
});
*/
</script>
<div bind:this={node}></div>

View file

@ -1,9 +1,22 @@
<script lang="ts">
import Path from '$lib/components/Path.svelte';
import Splash from '$lib/components/Splash.svelte';
import { onNavigate } from '$app/navigation';
export let data;
let categories = data.categories;
onNavigate((navigation) => {
if (!document.startViewTransition) return;
return new Promise((resolve) => {
document.startViewTransition(async () => {
resolve();
await navigation.complete;
});
});
});
</script>
<Splash />

View file

@ -1,7 +1,19 @@
<script lang="ts">
import Route from '$lib/components/Route.svelte';
import HomeHeader from '$lib/components/HomeHeader.svelte';
import { onNavigate } from '$app/navigation';
onNavigate((navigation) => {
if (!document.startViewTransition) return;
return new Promise((resolve) => {
document.startViewTransition(async () => {
resolve();
await navigation.complete;
});
});
});
export let data;
</script>

View file

@ -1,9 +1,22 @@
<script lang="ts">
import Header from '$lib/components/Header.svelte';
import Tabs from '$lib/components/Tabs.svelte';
import { onNavigate } from '$app/navigation';
export let data: App.Route;
onNavigate((navigation) => {
if (!document.startViewTransition) return;
return new Promise((resolve) => {
document.startViewTransition(async () => {
resolve();
await navigation.complete;
});
});
});
let divider;
const mapClick = () => {};