mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): dynamically import wasm module (#16261)
* dynamically import wasm module * remove unused import
This commit is contained in:
parent
e4b6efc1f5
commit
4376fd72b7
7 changed files with 77 additions and 77 deletions
|
|
@ -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,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue