mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): cancel uploads on logout (#21760)
This commit is contained in:
parent
00c88b2636
commit
e52cc259d5
2 changed files with 12 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue