mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
fix(web): cancel uploads on logout (#21760)
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { eventManager } from '$lib/managers/event-manager.svelte';
|
||||
import { uploadAssetsStore } from '$lib/stores/upload';
|
||||
import { getSupportedMediaTypes, type ServerMediaTypesResponseDto } from '@immich/sdk';
|
||||
|
||||
class UploadManager {
|
||||
mediaTypes = $state<ServerMediaTypesResponseDto>({ image: [], sidecar: [], video: [] });
|
||||
|
||||
constructor() {
|
||||
eventManager.on('app.init', () => void this.#loadExtensions());
|
||||
eventManager.on('app.init', () => void this.#loadExtensions()).on('auth.logout', () => void this.reset());
|
||||
}
|
||||
|
||||
reset() {
|
||||
uploadAssetsStore.reset();
|
||||
}
|
||||
|
||||
async #loadExtensions() {
|
||||
|
||||
Reference in New Issue
Block a user