mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: app init event (#17937)
This commit is contained in:
parent
895b2bf5cd
commit
7f69abbf0d
19 changed files with 81 additions and 75 deletions
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { shouldIgnoreEvent } from '$lib/actions/shortcut';
|
||||
import { authManager } from '$lib/managers/auth-manager.svelte';
|
||||
import { dragAndDropFilesStore } from '$lib/stores/drag-and-drop-files.store';
|
||||
import { fileUploadHandler } from '$lib/utils/file-uploader';
|
||||
import { isAlbumsRoute, isSharedLinkRoute } from '$lib/utils/navigation';
|
||||
import { isAlbumsRoute } from '$lib/utils/navigation';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { fade } from 'svelte/transition';
|
||||
import ImmichLogo from './immich-logo.svelte';
|
||||
|
||||
let albumId = $derived(isAlbumsRoute(page.route?.id) ? page.params.albumId : undefined);
|
||||
let isShare = $derived(isSharedLinkRoute(page.route?.id));
|
||||
|
||||
let dragStartTarget: EventTarget | null = $state(null);
|
||||
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
}
|
||||
|
||||
const filesArray: File[] = Array.from<File>(files);
|
||||
if (isShare) {
|
||||
if (authManager.key) {
|
||||
dragAndDropFilesStore.set({ isDragging: true, files: filesArray });
|
||||
} else {
|
||||
await fileUploadHandler(filesArray, albumId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue