File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
components/asset-viewer/actions Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import MenuOption from ' $lib/components/shared-components/context-menu/menu-option.svelte' ;
3
- import Portal from ' $lib/components/shared-components/portal/portal .svelte' ;
4
- import ProfileImageCropper from ' $lib/components/shared-components/profile-image-cropper .svelte' ;
3
+ import { modalManager } from ' $lib/managers/modal-manager .svelte' ;
4
+ import ProfileImageCropperModal from ' $lib/modals/ProfileImageCropperModal .svelte' ;
5
5
import type { AssetResponseDto } from ' @immich/sdk' ;
6
6
import { mdiAccountCircleOutline } from ' @mdi/js' ;
7
7
import { t } from ' svelte-i18n' ;
11
11
}
12
12
13
13
let { asset }: Props = $props ();
14
-
15
- let showProfileImageCrop = $state (false );
16
14
</script >
17
15
18
16
<MenuOption
19
17
icon ={mdiAccountCircleOutline }
20
- onClick ={() => ( showProfileImageCrop = true )}
18
+ onClick ={() => modalManager . show ( ProfileImageCropperModal , { asset } )}
21
19
text ={$t (' set_as_profile_picture' )}
22
20
/>
23
-
24
- {#if showProfileImageCrop }
25
- <Portal target =" body" >
26
- <ProfileImageCropper {asset } onClose ={() => (showProfileImageCrop = false )} />
27
- </Portal >
28
- {/if }
Original file line number Diff line number Diff line change 6
6
import domtoimage from ' dom-to-image' ;
7
7
import { onMount } from ' svelte' ;
8
8
import { t } from ' svelte-i18n' ;
9
- import PhotoViewer from ' ../asset-viewer/photo-viewer.svelte' ;
10
- import { NotificationType , notificationController } from ' ./notification/notification' ;
9
+ import PhotoViewer from ' ../components/ asset-viewer/photo-viewer.svelte' ;
10
+ import { NotificationType , notificationController } from ' ../components/shared-components /notification/notification' ;
11
11
12
12
interface Props {
13
13
asset: AssetResponseDto ;
You can’t perform that action at this time.
0 commit comments