mirror of
https://github.com/immich-app/immich.git
synced 2026-02-04 08:49:01 +03:00
* Added file selector * Extract metadata to upload files to the web * Added request for uploading * Generate jpeg/Webp thumbnail for asset uploaded without thumbnail data * Added generating thumbnail for video and WebSocket broadcast after thumbnail is generated * Added video length extraction * Added Uploading Panel * Added upload progress store and styling the uploaded asset * Added condition to only show upload panel when there is upload in progress * Remove asset from the upload list after successfully uploading * Added WebSocket to listen to upload event on the web * Added mechanism to check for existing assets before uploading on the web * Added test workflow * Update readme
46 lines
1.2 KiB
Svelte
46 lines
1.2 KiB
Svelte
<script context="module" lang="ts">
|
|
import type { Load } from '@sveltejs/kit';
|
|
import { checkAppVersion } from '$lib/utils/check-app-version';
|
|
import { browser } from '$app/env';
|
|
|
|
export const load: Load = async ({ url }) => {
|
|
if (browser) {
|
|
const { shouldShowAnnouncement, localVersion, remoteVersion } = await checkAppVersion();
|
|
|
|
return { props: { url, shouldShowAnnouncement, localVersion, remoteVersion } };
|
|
} else {
|
|
return {
|
|
props: { url },
|
|
};
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
import '../app.css';
|
|
|
|
import { blur } from 'svelte/transition';
|
|
|
|
import DownloadPanel from '$lib/components/asset-viewer/download-panel.svelte';
|
|
import AnnouncementBox from '$lib/components/shared/announcement-box.svelte';
|
|
import UploadPanel from '$lib/components/shared/upload-panel.svelte';
|
|
|
|
export let url: string;
|
|
export let shouldShowAnnouncement: boolean;
|
|
export let localVersion: string;
|
|
export let remoteVersion: string;
|
|
</script>
|
|
|
|
<main>
|
|
{#key url}
|
|
<div transition:blur={{ duration: 250 }}>
|
|
<slot />
|
|
<DownloadPanel />
|
|
<UploadPanel />
|
|
{#if shouldShowAnnouncement}
|
|
<AnnouncementBox {localVersion} {remoteVersion} on:close={() => (shouldShowAnnouncement = false)} />
|
|
{/if}
|
|
</div>
|
|
{/key}
|
|
</main>
|