mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	* AFixed overlay issue of modal * Added modal with existing user * Added custom scrollbar to all pages * Fixed Document is not define when access document DOM node in browswer * Added context menu * Added api to remove user from album * Handle user leave album * Added share button to non-shared album * Added padding to album viewer: * Fixed margin top of asset selection page * Fixed issue cannot push to dockerhub
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Svelte
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Svelte
		
	
	
	
	
	
| <script context="module" lang="ts">
 | |
| 	import type { Load } from '@sveltejs/kit';
 | |
| 	import { checkAppVersion } from '$lib/utils/check-app-version';
 | |
| 
 | |
| 	export const load: Load = async ({ url, session }) => {
 | |
| 		if (session.user) {
 | |
| 			api.setAccessToken(session.user.accessToken);
 | |
| 		}
 | |
| 
 | |
| 		return {
 | |
| 			props: { url }
 | |
| 		};
 | |
| 	};
 | |
| </script>
 | |
| 
 | |
| <script lang="ts">
 | |
| 	import '../app.css';
 | |
| 
 | |
| 	import { fade } from 'svelte/transition';
 | |
| 
 | |
| 	import DownloadPanel from '$lib/components/asset-viewer/download-panel.svelte';
 | |
| 	import AnnouncementBox from '$lib/components/shared-components/announcement-box.svelte';
 | |
| 	import UploadPanel from '$lib/components/shared-components/upload-panel.svelte';
 | |
| 	import { onMount } from 'svelte';
 | |
| 	import { api } from '@api';
 | |
| 
 | |
| 	export let url: string;
 | |
| 	let shouldShowAnnouncement: boolean;
 | |
| 	let localVersion: string;
 | |
| 	let remoteVersion: string;
 | |
| 
 | |
| 	onMount(async () => {
 | |
| 		const res = await checkAppVersion();
 | |
| 
 | |
| 		shouldShowAnnouncement = res.shouldShowAnnouncement;
 | |
| 		localVersion = res.localVersion ?? 'unknown';
 | |
| 		remoteVersion = res.remoteVersion ?? 'unknown';
 | |
| 	});
 | |
| </script>
 | |
| 
 | |
| <main>
 | |
| 	{#key url}
 | |
| 		<div in:fade={{ duration: 100 }}>
 | |
| 			<slot />
 | |
| 			<DownloadPanel />
 | |
| 			<UploadPanel />
 | |
| 			{#if shouldShowAnnouncement}
 | |
| 				<AnnouncementBox
 | |
| 					{localVersion}
 | |
| 					{remoteVersion}
 | |
| 					on:close={() => (shouldShowAnnouncement = false)}
 | |
| 				/>
 | |
| 			{/if}
 | |
| 		</div>
 | |
| 	{/key}
 | |
| </main>
 |