mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(web): move BaseModal to callback pattern (#8696)
* chore(web): move BaseModal to callback to close * chore: add question mark
This commit is contained in:
parent
8c9a092561
commit
37eea2d353
16 changed files with 37 additions and 45 deletions
|
|
@ -3,17 +3,15 @@
|
|||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { createProfileImage, type AssetResponseDto } from '@immich/sdk';
|
||||
import domtoimage from 'dom-to-image';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import PhotoViewer from '../asset-viewer/photo-viewer.svelte';
|
||||
import Button from '../elements/buttons/button.svelte';
|
||||
import BaseModal from './base-modal.svelte';
|
||||
import { NotificationType, notificationController } from './notification/notification';
|
||||
|
||||
export let asset: AssetResponseDto;
|
||||
export let onClose: () => void;
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
close: void;
|
||||
}>();
|
||||
let imgElement: HTMLDivElement;
|
||||
|
||||
onMount(() => {
|
||||
|
|
@ -67,11 +65,11 @@
|
|||
} catch (error) {
|
||||
handleError(error, 'Error setting profile picture.');
|
||||
}
|
||||
dispatch('close');
|
||||
onClose();
|
||||
};
|
||||
</script>
|
||||
|
||||
<BaseModal id="profile-image-cropper" title="Set profile picture" on:close>
|
||||
<BaseModal id="profile-image-cropper" title="Set profile picture" {onClose}>
|
||||
<div class="flex place-items-center items-center justify-center">
|
||||
<div
|
||||
class="relative flex aspect-square w-1/2 overflow-hidden rounded-full border-4 border-immich-primary bg-immich-dark-primary dark:border-immich-dark-primary dark:bg-immich-primary"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue