2022-05-21 02:23:55 -05:00
|
|
|
<script lang="ts">
|
2022-05-21 23:36:58 -05:00
|
|
|
// import { getRequest } from '$lib/api';
|
|
|
|
|
// import { onDestroy } from 'svelte';
|
|
|
|
|
// import { fade } from 'svelte/transition';
|
2022-05-21 02:23:55 -05:00
|
|
|
import '../app.css';
|
2022-05-21 23:36:58 -05:00
|
|
|
// import { serverEndpoint } from '../lib/constants';
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-05-21 23:36:58 -05:00
|
|
|
// let endpoint = serverEndpoint;
|
|
|
|
|
// let isServerOk = true;
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-05-21 23:36:58 -05:00
|
|
|
// const pingServerInterval = setInterval(async () => {
|
|
|
|
|
// const response = await getRequest('server-info/ping', '');
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-05-21 23:36:58 -05:00
|
|
|
// if (response.res === 'pong') isServerOk = true;
|
|
|
|
|
// if (response.statusCode === 404) isServerOk = false;
|
|
|
|
|
// }, 10000);
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-05-21 23:36:58 -05:00
|
|
|
// onDestroy(() => clearInterval(pingServerInterval));
|
2022-05-21 02:23:55 -05:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<main>
|
|
|
|
|
<slot />
|
|
|
|
|
</main>
|
|
|
|
|
|
2022-05-21 23:36:58 -05:00
|
|
|
<!-- <footer
|
2022-05-21 16:50:56 -05:00
|
|
|
class="text-sm fixed bottom-0 h-8 flex place-items-center place-content-center bg-gray-50 w-screen font-mono gap-8 px-4 font-medium"
|
2022-05-21 02:23:55 -05:00
|
|
|
>
|
|
|
|
|
<p class="">
|
|
|
|
|
Server URL <span class="text-immich-primary font-bold">{endpoint}</span>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="">
|
|
|
|
|
Server Status
|
|
|
|
|
{#if isServerOk}
|
|
|
|
|
<span class="text-immich-primary font-bold">OK</span>
|
|
|
|
|
{:else}
|
|
|
|
|
<span class="text-red-500 font-bold">OFFLINE</span>
|
|
|
|
|
{/if}
|
|
|
|
|
</p>
|
2022-05-21 23:36:58 -05:00
|
|
|
</footer> -->
|