diff --git a/mise.toml b/mise.toml index 47acb66b21..ff9fa3895d 100644 --- a/mise.toml +++ b/mise.toml @@ -300,7 +300,7 @@ run = "tsc --noEmit" depends = "web:svelte-kit-sync" env._.path = "web/node_modules/.bin" dir = "web" -run = "svelte-check --no-tsconfig --fail-on-warnings --compiler-warnings 'reactive_declaration_non_reactive_property:ignore' --ignore src/lib/components/photos-page/asset-grid.svelte" +run = "svelte-check --no-tsconfig --fail-on-warnings --compiler-warnings 'reactive_declaration_non_reactive_property:ignore' --ignore src/lib/components/timeline/Timeline.svelte" [tasks."web:checklist"] run = [ diff --git a/web/package.json b/web/package.json index 68de904f91..1e903d2bcd 100644 --- a/web/package.json +++ b/web/package.json @@ -9,7 +9,7 @@ "build:stats": "BUILD_STATS=true vite build", "package": "svelte-kit package", "preview": "vite preview", - "check:svelte": "svelte-check --no-tsconfig --fail-on-warnings --compiler-warnings 'reactive_declaration_non_reactive_property:ignore' --ignore src/lib/components/photos-page/asset-grid.svelte", + "check:svelte": "svelte-check --no-tsconfig --fail-on-warnings --compiler-warnings 'reactive_declaration_non_reactive_property:ignore' --ignore src/lib/components/timeline/Timeline.svelte", "check:typescript": "tsc --noEmit", "check:watch": "npm run check:svelte -- --watch", "check:code": "npm run format && npm run lint:p && npm run check:svelte && npm run check:typescript", diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index 8c91d29a34..46fbec0bed 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -4,6 +4,7 @@ import AlbumMap from '$lib/components/album-page/album-map.svelte'; import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import { AssetInteraction } from '$lib/stores/asset-interaction.svelte'; import { assetViewingStore } from '$lib/stores/asset-viewing.store'; @@ -18,7 +19,6 @@ import { onDestroy } from 'svelte'; import { t } from 'svelte-i18n'; import DownloadAction from '../photos-page/actions/download-action.svelte'; - import AssetGrid from '../photos-page/asset-grid.svelte'; import ControlAppBar from '../shared-components/control-app-bar.svelte'; import ImmichLogoSmallLink from '../shared-components/immich-logo-small-link.svelte'; import ThemeButton from '../shared-components/theme-button.svelte'; @@ -61,7 +61,7 @@ />
- +

{/if}

-
+
diff --git a/web/src/lib/components/photos-page/asset-grid.svelte b/web/src/lib/components/timeline/Timeline.svelte similarity index 98% rename from web/src/lib/components/photos-page/asset-grid.svelte rename to web/src/lib/components/timeline/Timeline.svelte index 0142b823fa..7a178bb331 100644 --- a/web/src/lib/components/photos-page/asset-grid.svelte +++ b/web/src/lib/components/timeline/Timeline.svelte @@ -37,16 +37,16 @@ import { DateTime } from 'luxon'; import { onMount, type Snippet } from 'svelte'; import type { UpdatePayload } from 'vite'; + import AssetDateGroup from '../photos-page/asset-date-group.svelte'; + import DeleteAssetDialog from '../photos-page/delete-asset-dialog.svelte'; import Portal from '../shared-components/portal/portal.svelte'; - import AssetDateGroup from './asset-date-group.svelte'; - import DeleteAssetDialog from './delete-asset-dialog.svelte'; interface Props { isSelectionMode?: boolean; singleSelect?: boolean; /** `true` if this asset grid is responds to navigation events; if `true`, then look at the `AssetViewingStore.gridScrollTarget` and load and scroll to the asset specified, and - additionally, update the page location/url with the asset as the asset-grid is scrolled */ + additionally, update the page location/url with the asset as the timeline is scrolled */ enableRouting: boolean; timelineManager: TimelineManager; assetInteraction: AssetInteraction; @@ -225,14 +225,14 @@ const hmrSupport = () => { // when hmr happens, skeleton is initialized to true by default - // normally, loading asset-grid is part of a navigation event, and the completion of + // normally, loading timeline is part of a navigation event, and the completion of // that event triggers a scroll-to-asset, if necessary, when then clears the skeleton. // this handler will run the navigation/scroll-to-asset handler when hmr is performed, // preventing skeleton from showing after hmr if (import.meta && import.meta.hot) { const afterApdate = (payload: UpdatePayload) => { const assetGridUpdate = payload.updates.some( - (update) => update.path.endsWith('asset-grid.svelte') || update.path.endsWith('assets-store.ts'), + (update) => update.path.endsWith('Timeline.svelte') || update.path.endsWith('assets-store.ts'), ); if (assetGridUpdate) { @@ -253,7 +253,7 @@ }; import.meta.hot?.on('vite:afterUpdate', afterApdate); import.meta.hot?.on('vite:beforeUpdate', (payload) => { - const assetGridUpdate = payload.updates.some((update) => update.path.endsWith('asset-grid.svelte')); + const assetGridUpdate = payload.updates.some((update) => update.path.endsWith('Timeline.svelte')); if (assetGridUpdate) { timelineManager.destroy(); } diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte index 3565a33f21..13f0e6923d 100644 --- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -22,7 +22,6 @@ import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte'; import TagAction from '$lib/components/photos-page/actions/tag-action.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte'; @@ -32,6 +31,7 @@ notificationController, } from '$lib/components/shared-components/notification/notification'; import UserAvatar from '$lib/components/shared-components/user-avatar.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AlbumPageViewMode, AppRoute } from '$lib/constants'; import { activityManager } from '$lib/managers/activity-manager.svelte'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; @@ -443,7 +443,7 @@
- {/if} {/if} - + {#if showActivityStatus && !activityManager.isLoading}
diff --git a/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte index 5481224057..c13d219559 100644 --- a/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -7,10 +7,10 @@ import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; import FavoriteAction from '$lib/components/photos-page/actions/favorite-action.svelte'; import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AssetAction } from '$lib/constants'; import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte'; @@ -47,7 +47,7 @@ - {/snippet} - + {#if assetInteraction.selectionActive} diff --git a/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte index ae24a82da7..8cb15dc508 100644 --- a/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -12,10 +12,10 @@ import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte'; import TagAction from '$lib/components/photos-page/actions/tag-action.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AssetAction } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import { AssetInteraction } from '$lib/stores/asset-interaction.svelte'; @@ -51,7 +51,7 @@ - {/snippet} - + diff --git a/web/src/routes/(user)/locked/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/locked/[[photos=photos]]/[[assetId=id]]/+page.svelte index 733e93db71..9fdce5fcc3 100644 --- a/web/src/routes/(user)/locked/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/locked/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -7,10 +7,10 @@ import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AppRoute, AssetAction } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import { AssetInteraction } from '$lib/stores/asset-interaction.svelte'; @@ -58,7 +58,7 @@ {/snippet} - {/snippet} - + diff --git a/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.svelte index 83962c5a90..54afe075b9 100644 --- a/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -3,10 +3,10 @@ import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte'; import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import ControlAppBar from '$lib/components/shared-components/control-app-bar.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AppRoute } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import { AssetInteraction } from '$lib/stores/asset-interaction.svelte'; @@ -43,7 +43,7 @@
- +
{#if assetInteraction.selectionActive} diff --git a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte index 807819b585..569e5a9b08 100644 --- a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -20,7 +20,6 @@ import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte'; import TagAction from '$lib/components/photos-page/actions/tag-action.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte'; @@ -30,6 +29,7 @@ NotificationType, notificationController, } from '$lib/components/shared-components/notification/notification'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AppRoute, PersonPageViewMode, QueryParameter, SessionStorageKey } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import type { TimelineAsset } from '$lib/managers/timeline-manager/types'; @@ -386,7 +386,7 @@ }} > {#key person.id} - {/if} - + {/key}
diff --git a/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte index 0098667873..60013fce98 100644 --- a/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte @@ -16,11 +16,11 @@ import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte'; import StackAction from '$lib/components/photos-page/actions/stack-action.svelte'; import TagAction from '$lib/components/photos-page/actions/tag-action.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import MemoryLane from '$lib/components/photos-page/memory-lane.svelte'; import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AssetAction } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import { AssetInteraction } from '$lib/stores/asset-interaction.svelte'; @@ -89,7 +89,7 @@ - openFileUploadDialog()} /> {/snippet} - + {#if assetInteraction.selectionActive} diff --git a/web/src/routes/(user)/tags/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/tags/[[photos=photos]]/[[assetId=id]]/+page.svelte index a25dc5643c..c114497d43 100644 --- a/web/src/routes/(user)/tags/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/tags/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -2,11 +2,11 @@ import { goto } from '$app/navigation'; import SkipLink from '$lib/components/elements/buttons/skip-link.svelte'; import UserPageLayout, { headerId } from '$lib/components/layouts/user-page-layout.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import Breadcrumbs from '$lib/components/shared-components/tree/breadcrumbs.svelte'; import TreeItemThumbnails from '$lib/components/shared-components/tree/tree-item-thumbnails.svelte'; import TreeItems from '$lib/components/shared-components/tree/tree-items.svelte'; import Sidebar from '$lib/components/sidebar/sidebar.svelte'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AppRoute, AssetAction, QueryParameter } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import TagCreateModal from '$lib/modals/TagCreateModal.svelte'; @@ -117,11 +117,11 @@
{#if tag.hasAssets} - + {#snippet empty()} {/snippet} - + {:else} {/if} diff --git a/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte index 2989a78a13..74b5c252a4 100644 --- a/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -5,13 +5,13 @@ import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import RestoreAssets from '$lib/components/photos-page/actions/restore-assets.svelte'; import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; - import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; import { notificationController, NotificationType, } from '$lib/components/shared-components/notification/notification'; + import Timeline from '$lib/components/timeline/Timeline.svelte'; import { AppRoute } from '$lib/constants'; import { TimelineManager } from '$lib/managers/timeline-manager/timeline-manager.svelte'; import { AssetInteraction } from '$lib/stores/asset-interaction.svelte'; @@ -116,14 +116,14 @@ {/snippet} - +

{$t('trashed_items_will_be_permanently_deleted_after', { values: { days: $serverConfig.trashDays } })}

{#snippet empty()} {/snippet} -
+ {/if} diff --git a/web/src/routes/(user)/utilities/geolocation/+page.svelte b/web/src/routes/(user)/utilities/geolocation/+page.svelte index ab0a59f3ef..5441257df4 100644 --- a/web/src/routes/(user)/utilities/geolocation/+page.svelte +++ b/web/src/routes/(user)/utilities/geolocation/+page.svelte @@ -1,8 +1,8 @@