diff --git a/server/src/domain/job/job.service.ts b/server/src/domain/job/job.service.ts index 7ebffcc693..adc62614a1 100644 --- a/server/src/domain/job/job.service.ts +++ b/server/src/domain/job/job.service.ts @@ -215,6 +215,14 @@ export class JobService { this.communicationRepository.send(CommunicationEvent.UPLOAD_SUCCESS, asset.ownerId, mapAsset(asset)); } } + + case JobName.SIDECAR_WRITE: { + const [asset] = await this.assetRepository.getByIds([item.data.id]); + if (asset) { + this.communicationRepository.send(CommunicationEvent.ASSET_UPDATE, asset.ownerId, mapAsset(asset)); + } + break; + } } // In addition to the above jobs, all of these should queue `SEARCH_INDEX_ASSET` diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte index ee9eafb5f7..b59bd5e452 100644 --- a/web/src/lib/components/asset-viewer/detail-panel.svelte +++ b/web/src/lib/components/asset-viewer/detail-panel.svelte @@ -125,7 +125,6 @@ longitude: gps.lng, }, }); - notificationController.show({ message: 'Metadata updated please reload to apply', type: NotificationType.Info }); } catch (error) { handleError(error, 'Unable to change location'); } diff --git a/web/src/lib/components/photos-page/actions/change-date.svelte b/web/src/lib/components/photos-page/actions/change-date-action.svelte similarity index 91% rename from web/src/lib/components/photos-page/actions/change-date.svelte rename to web/src/lib/components/photos-page/actions/change-date-action.svelte index b9e2eb4dc5..df630ed430 100644 --- a/web/src/lib/components/photos-page/actions/change-date.svelte +++ b/web/src/lib/components/photos-page/actions/change-date-action.svelte @@ -24,7 +24,7 @@ await api.assetApi.updateAssets({ assetBulkUpdateDto: { ids, dateTimeOriginal }, }); - notificationController.show({ message: 'Metadata updated please reload to apply', type: NotificationType.Info }); + notificationController.show({ message: 'Updating date please wait', type: NotificationType.Info }); } catch (error) { handleError(error, 'Unable to change date'); } diff --git a/web/src/lib/components/photos-page/actions/change-location.svelte b/web/src/lib/components/photos-page/actions/change-location-action.svelte similarity index 92% rename from web/src/lib/components/photos-page/actions/change-location.svelte rename to web/src/lib/components/photos-page/actions/change-location-action.svelte index 35c60152f1..057f16720e 100644 --- a/web/src/lib/components/photos-page/actions/change-location.svelte +++ b/web/src/lib/components/photos-page/actions/change-location-action.svelte @@ -29,7 +29,7 @@ longitude: point.lng, }, }); - notificationController.show({ message: 'Metadata updated please reload to apply', type: NotificationType.Info }); + notificationController.show({ message: 'Updating location please wait', type: NotificationType.Info }); } catch (error) { handleError(error, 'Unable to update location'); } diff --git a/web/src/lib/components/shared-components/update-panel.svelte b/web/src/lib/components/shared-components/update-panel.svelte new file mode 100644 index 0000000000..8720946c11 --- /dev/null +++ b/web/src/lib/components/shared-components/update-panel.svelte @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/web/src/lib/stores/websocket.ts b/web/src/lib/stores/websocket.ts index 3371359177..3bfa199cfd 100644 --- a/web/src/lib/stores/websocket.ts +++ b/web/src/lib/stores/websocket.ts @@ -14,6 +14,7 @@ export const websocketStore = { onUploadSuccess: writable(), onAssetDelete: writable(), onAssetTrash: writable(), + onAssetUpdate: writable(), onPersonThumbnail: writable(), serverVersion: writable(), connected: writable(false), @@ -41,6 +42,7 @@ export const openWebsocketConnection = () => { // .on('on_upload_success', (data) => websocketStore.onUploadSuccess.set(data)) .on('on_asset_delete', (data) => websocketStore.onAssetDelete.set(data)) .on('on_asset_trash', (data) => websocketStore.onAssetTrash.set(data)) + .on('on_asset_update', (data) => websocketStore.onAssetUpdate.set(data)) .on('on_person_thumbnail', (data) => websocketStore.onPersonThumbnail.set(data)) .on('on_server_version', (data) => websocketStore.serverVersion.set(data)) .on('on_config_update', () => loadConfig()) diff --git a/web/src/routes/(user)/albums/[albumId]/+page.svelte b/web/src/routes/(user)/albums/[albumId]/+page.svelte index d999c9b577..585de03e78 100644 --- a/web/src/routes/(user)/albums/[albumId]/+page.svelte +++ b/web/src/routes/(user)/albums/[albumId]/+page.svelte @@ -11,8 +11,8 @@ import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; import FavoriteAction from '$lib/components/photos-page/actions/favorite-action.svelte'; - import ChangeDate from '$lib/components/photos-page/actions/change-date.svelte'; - import ChangeLocation from '$lib/components/photos-page/actions/change-location.svelte'; + import ChangeDate from '$lib/components/photos-page/actions/change-date-action.svelte'; + import ChangeLocation from '$lib/components/photos-page/actions/change-location-action.svelte'; import RemoveFromAlbum from '$lib/components/photos-page/actions/remove-from-album.svelte'; import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; diff --git a/web/src/routes/(user)/favorites/+page.svelte b/web/src/routes/(user)/favorites/+page.svelte index 52da7c8d3b..d335fe67c6 100644 --- a/web/src/routes/(user)/favorites/+page.svelte +++ b/web/src/routes/(user)/favorites/+page.svelte @@ -2,8 +2,8 @@ import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte'; import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte'; import ArchiveAction from '$lib/components/photos-page/actions/archive-action.svelte'; - import ChangeDate from '$lib/components/photos-page/actions/change-date.svelte'; - import ChangeLocation from '$lib/components/photos-page/actions/change-location.svelte'; + import ChangeDate from '$lib/components/photos-page/actions/change-date-action.svelte'; + import ChangeLocation from '$lib/components/photos-page/actions/change-location-action.svelte'; import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte'; import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; diff --git a/web/src/routes/(user)/people/[personId]/+page.svelte b/web/src/routes/(user)/people/[personId]/+page.svelte index 1d0e655b6f..c396fbe13b 100644 --- a/web/src/routes/(user)/people/[personId]/+page.svelte +++ b/web/src/routes/(user)/people/[personId]/+page.svelte @@ -8,8 +8,8 @@ import SetBirthDateModal from '$lib/components/faces-page/set-birth-date-modal.svelte'; import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte'; import ArchiveAction from '$lib/components/photos-page/actions/archive-action.svelte'; - import ChangeDate from '$lib/components/photos-page/actions/change-date.svelte'; - import ChangeLocation from '$lib/components/photos-page/actions/change-location.svelte'; + import ChangeDate from '$lib/components/photos-page/actions/change-date-action.svelte'; + import ChangeLocation from '$lib/components/photos-page/actions/change-location-action.svelte'; import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte'; import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; diff --git a/web/src/routes/(user)/photos/+page.svelte b/web/src/routes/(user)/photos/+page.svelte index 51905429ed..dace52cb86 100644 --- a/web/src/routes/(user)/photos/+page.svelte +++ b/web/src/routes/(user)/photos/+page.svelte @@ -2,8 +2,8 @@ import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte'; import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte'; import ArchiveAction from '$lib/components/photos-page/actions/archive-action.svelte'; - import ChangeDate from '$lib/components/photos-page/actions/change-date.svelte'; - import ChangeLocation from '$lib/components/photos-page/actions/change-location.svelte'; + import ChangeDate from '$lib/components/photos-page/actions/change-date-action.svelte'; + import ChangeLocation from '$lib/components/photos-page/actions/change-location-action.svelte'; import AssetJobActions from '$lib/components/photos-page/actions/asset-job-actions.svelte'; import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte'; import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; diff --git a/web/src/routes/(user)/search/+page.svelte b/web/src/routes/(user)/search/+page.svelte index 557707b0de..58bcd7f745 100644 --- a/web/src/routes/(user)/search/+page.svelte +++ b/web/src/routes/(user)/search/+page.svelte @@ -3,8 +3,8 @@ import { page } from '$app/stores'; import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte'; import ArchiveAction from '$lib/components/photos-page/actions/archive-action.svelte'; - import ChangeDate from '$lib/components/photos-page/actions/change-date.svelte'; - import ChangeLocation from '$lib/components/photos-page/actions/change-location.svelte'; + import ChangeDate from '$lib/components/photos-page/actions/change-location-action.svelte'; + import ChangeLocation from '$lib/components/photos-page/actions/change-datetion-action.svelte'; import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte'; import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 928164bb67..93e3547c1d 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -5,6 +5,7 @@ import NavigationLoadingBar from '$lib/components/shared-components/navigation-loading-bar.svelte'; import DownloadPanel from '$lib/components/asset-viewer/download-panel.svelte'; import UploadPanel from '$lib/components/shared-components/upload-panel.svelte'; + import UpdatePanel from '$lib/components/shared-components/update-panel.svelte'; import NotificationList from '$lib/components/shared-components/notification/notification-list.svelte'; import VersionAnnouncementBox from '$lib/components/shared-components/version-announcement-box.svelte'; import type { LayoutData } from './$types'; @@ -120,6 +121,7 @@ + {#if data.user?.isAdmin}