mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat(web): map timeline sidepanel (#26532)
* feat(web): map timeline panel * update openapi * remove #key * add index on lat/lng
This commit is contained in:
@@ -196,6 +196,11 @@ export class MonthGroup {
|
||||
timelineAsset.latitude = bucketAssets.latitude?.[i];
|
||||
timelineAsset.longitude = bucketAssets.longitude?.[i];
|
||||
}
|
||||
|
||||
if (this.timelineManager.isExcluded(timelineAsset)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
this.addTimelineAsset(timelineAsset, addContext);
|
||||
}
|
||||
if (preSorted) {
|
||||
|
||||
@@ -258,10 +258,16 @@ export class TimelineManager extends VirtualScrollManager {
|
||||
if (this.#options !== TimelineManager.#INIT_OPTIONS && isEqual(this.#options, options)) {
|
||||
return;
|
||||
}
|
||||
await this.initTask.reset();
|
||||
await this.#init(options);
|
||||
this.updateViewportGeometry(false);
|
||||
this.#createScrubberMonths();
|
||||
|
||||
this.suspendTransitions = true;
|
||||
try {
|
||||
await this.initTask.reset();
|
||||
await this.#init(options);
|
||||
this.updateViewportGeometry(false);
|
||||
this.#createScrubberMonths();
|
||||
} finally {
|
||||
this.suspendTransitions = false;
|
||||
}
|
||||
}
|
||||
|
||||
async #init(options: TimelineManagerOptions) {
|
||||
@@ -589,7 +595,8 @@ export class TimelineManager extends VirtualScrollManager {
|
||||
return (
|
||||
isMismatched(this.#options.visibility, asset.visibility) ||
|
||||
isMismatched(this.#options.isFavorite, asset.isFavorite) ||
|
||||
isMismatched(this.#options.isTrashed, asset.isTrashed)
|
||||
isMismatched(this.#options.isTrashed, asset.isTrashed) ||
|
||||
(this.#options.assetFilter !== undefined && !this.#options.assetFilter.has(asset.id))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ export type AssetApiGetTimeBucketsRequest = Parameters<typeof import('@immich/sd
|
||||
export type TimelineManagerOptions = Omit<AssetApiGetTimeBucketsRequest, 'size'> & {
|
||||
timelineAlbumId?: string;
|
||||
deferInit?: boolean;
|
||||
assetFilter?: Set<string>;
|
||||
};
|
||||
|
||||
export type AssetDescriptor = { id: string };
|
||||
|
||||
Reference in New Issue
Block a user