mirror of
https://github.com/immich-app/immich.git
synced 2025-11-26 18:49:44 +09:00
fix(web): dynamically import wasm module (#16261)
* dynamically import wasm module * remove unused import
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { AssetBucket } from '$lib/stores/assets.store';
|
||||
import { locale } from '$lib/stores/preferences.store';
|
||||
import { JustifiedLayout } from '@immich/justified-layout-wasm';
|
||||
import type { JustifiedLayout } from '@immich/justified-layout-wasm';
|
||||
import type { AssetResponseDto } from '@immich/sdk';
|
||||
import { groupBy, memoize, sortBy } from 'lodash-es';
|
||||
import { DateTime } from 'luxon';
|
||||
@@ -13,7 +13,7 @@ export type DateGroup = {
|
||||
height: number;
|
||||
heightActual: boolean;
|
||||
intersecting: boolean;
|
||||
geometry: JustifiedLayout;
|
||||
geometry: JustifiedLayout | null;
|
||||
bucket: AssetBucket;
|
||||
};
|
||||
export type ScrubberListener = (
|
||||
@@ -80,13 +80,6 @@ export function formatGroupTitle(_date: DateTime): string {
|
||||
return date.toLocaleString(groupDateFormat);
|
||||
}
|
||||
|
||||
const emptyGeometry = new JustifiedLayout(Float32Array.from([]), {
|
||||
rowHeight: 1,
|
||||
heightTolerance: 0,
|
||||
rowWidth: 1,
|
||||
spacing: 0,
|
||||
});
|
||||
|
||||
const formatDateGroupTitle = memoize(formatGroupTitle);
|
||||
|
||||
export function splitBucketIntoDateGroups(bucket: AssetBucket, locale: string | undefined): DateGroup[] {
|
||||
@@ -104,7 +97,7 @@ export function splitBucketIntoDateGroups(bucket: AssetBucket, locale: string |
|
||||
height: 0,
|
||||
heightActual: false,
|
||||
intersecting: false,
|
||||
geometry: emptyGeometry,
|
||||
geometry: null,
|
||||
bucket,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user