mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): copy to clipboard on safari (#22217)
This commit is contained in:
parent
1e0b4fac04
commit
de57fecb69
3 changed files with 26 additions and 8 deletions
|
|
@ -97,12 +97,15 @@
|
|||
}
|
||||
|
||||
try {
|
||||
await copyImageToClipboard($photoViewerImgElement ?? assetFileUrl);
|
||||
notificationController.show({
|
||||
type: NotificationType.Info,
|
||||
message: $t('copied_image_to_clipboard'),
|
||||
timeout: 3000,
|
||||
});
|
||||
const result = await copyImageToClipboard($photoViewerImgElement ?? assetFileUrl);
|
||||
if (result.success) {
|
||||
notificationController.show({ type: NotificationType.Info, message: $t('copied_image_to_clipboard') });
|
||||
} else {
|
||||
notificationController.show({
|
||||
type: NotificationType.Error,
|
||||
message: $t('errors.clipboard_unsupported_mime_type', { values: { mimeType: result.mimeType } }),
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
handleError(error, $t('copy_error'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue