2022-05-21 02:23:55 -05:00
|
|
|
<script lang="ts">
|
2022-06-03 11:04:30 -05:00
|
|
|
import '../app.css';
|
|
|
|
|
|
2022-12-30 04:07:18 +02:00
|
|
|
import { page } from '$app/stores';
|
2022-08-25 13:02:36 -07:00
|
|
|
import { afterNavigate, beforeNavigate } from '$app/navigation';
|
|
|
|
|
import NavigationLoadingBar from '$lib/components/shared-components/navigation-loading-bar.svelte';
|
2023-02-27 04:23:43 +01:00
|
|
|
import DownloadPanel from '$lib/components/asset-viewer/download-panel.svelte';
|
|
|
|
|
import UploadPanel from '$lib/components/shared-components/upload-panel.svelte';
|
2022-08-25 23:04:23 -07:00
|
|
|
import NotificationList from '$lib/components/shared-components/notification/notification-list.svelte';
|
2023-02-28 00:13:39 +01:00
|
|
|
import VersionAnnouncementBox from '$lib/components/shared-components/version-announcement-box.svelte';
|
2023-02-10 23:01:35 +01:00
|
|
|
import faviconUrl from '$lib/assets/favicon.png';
|
2023-02-28 00:13:39 +01:00
|
|
|
import type { LayoutData } from './$types';
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-08-25 13:02:36 -07:00
|
|
|
let showNavigationLoadingBar = false;
|
|
|
|
|
|
|
|
|
|
beforeNavigate(() => {
|
|
|
|
|
showNavigationLoadingBar = true;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
afterNavigate(() => {
|
|
|
|
|
showNavigationLoadingBar = false;
|
|
|
|
|
});
|
2023-02-28 00:13:39 +01:00
|
|
|
|
|
|
|
|
export let data: LayoutData;
|
2022-05-21 02:23:55 -05:00
|
|
|
</script>
|
|
|
|
|
|
2023-01-10 22:36:50 -05:00
|
|
|
<svelte:head>
|
2023-01-13 17:04:59 -05:00
|
|
|
<title>{$page.data.meta?.title || 'Web'} - Immich</title>
|
2023-02-27 04:23:43 +01:00
|
|
|
<link rel="icon" href={faviconUrl} />
|
|
|
|
|
|
2023-01-10 22:36:50 -05:00
|
|
|
{#if $page.data.meta}
|
|
|
|
|
<meta name="description" content={$page.data.meta.description} />
|
|
|
|
|
|
|
|
|
|
<!-- Facebook Meta Tags -->
|
|
|
|
|
<meta property="og:type" content="website" />
|
|
|
|
|
<meta property="og:title" content={$page.data.meta.title} />
|
|
|
|
|
<meta property="og:description" content={$page.data.meta.description} />
|
|
|
|
|
<meta property="og:image" content={$page.data.meta.imageUrl} />
|
|
|
|
|
|
|
|
|
|
<!-- Twitter Meta Tags -->
|
|
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
|
|
|
<meta name="twitter:title" content={$page.data.meta.title} />
|
|
|
|
|
<meta name="twitter:description" content={$page.data.meta.description} />
|
|
|
|
|
<meta name="twitter:image" content={$page.data.meta.imageUrl} />
|
|
|
|
|
{/if}
|
|
|
|
|
</svelte:head>
|
|
|
|
|
|
2023-02-27 04:23:43 +01:00
|
|
|
{#if showNavigationLoadingBar}
|
|
|
|
|
<NavigationLoadingBar />
|
|
|
|
|
{/if}
|
2023-02-22 18:53:08 +01:00
|
|
|
|
2023-02-27 04:23:43 +01:00
|
|
|
<slot />
|
2023-02-22 18:53:08 +01:00
|
|
|
|
2023-02-27 04:23:43 +01:00
|
|
|
<DownloadPanel />
|
|
|
|
|
<UploadPanel />
|
|
|
|
|
<NotificationList />
|
2023-02-28 00:13:39 +01:00
|
|
|
|
|
|
|
|
{#if data.user?.isAdmin}
|
|
|
|
|
<VersionAnnouncementBox serverVersion={data.serverVersion} />
|
|
|
|
|
{/if}
|