parent
f8d6afa95e
commit
d7e7654686
10 changed files with 19 additions and 35 deletions
src/routes
|
@ -3,7 +3,6 @@
|
|||
<script>
|
||||
import '../app.pcss';
|
||||
import Header from './Header.svelte';
|
||||
import { socketStore } from '$lib/stores/socketStore';
|
||||
import { beforeNavigate } from '$app/navigation';
|
||||
import Footer from './Footer.svelte';
|
||||
|
||||
|
@ -13,9 +12,6 @@
|
|||
navigation.to.url.pathname === '/servers' || navigation.from.url.pathname === '/servers';
|
||||
const services =
|
||||
navigation.to.url.pathname === '/services' || navigation.from.url.pathname === '/services';
|
||||
if (!(servers && services)) {
|
||||
$socketStore.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import type { Server } from '$lib/types/data-types';
|
||||
import { io } from 'socket.io-client';
|
||||
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
|
||||
import ServerCard from '$lib/components/ServerCard.svelte';
|
||||
import { socketStore } from '$lib/stores/socketStore';
|
||||
import { uptimeStore } from '$lib/stores/uptimeStore';
|
||||
|
||||
let servers: readonly Server[] = $state.frozen([]);
|
||||
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
import ServiceCard from '$lib/components/ServiceCard.svelte';
|
||||
import type { Service } from '$lib/types/data-types';
|
||||
import { io } from 'socket.io-client';
|
||||
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
|
||||
import { socketStore } from '$lib/stores/socketStore';
|
||||
import { onDestroy } from 'svelte';
|
||||
import { uptimeStore } from '$lib/stores/uptimeStore';
|
||||
|
||||
let services: readonly Service[] = $state.frozen([]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue