feat(web): wasm justified layout (#19150)

* wasm justified layout

* fix tests

* redundant layout generation

* raw position
This commit is contained in:
Mert
2025-06-17 10:20:14 -04:00
committed by GitHub
parent 8038ae1e7a
commit bc062da11b
13 changed files with 106 additions and 145 deletions

View File

@@ -1,17 +1,17 @@
import { retrieveServerConfig } from '$lib/stores/server-config.store';
import { initLanguage } from '$lib/utils';
import { init as initLayout } from '@immich/justified-layout-wasm';
import { defaults } from '@immich/sdk';
import { memoize } from 'lodash-es';
type Fetch = typeof fetch;
async function _init(fetch: Fetch) {
function _init(fetch: Fetch) {
// set event.fetch on the fetch-client used by @immich/sdk
// https://kit.svelte.dev/docs/load#making-fetch-requests
// https://github.com/oazapfts/oazapfts/blob/main/README.md#fetch-options
defaults.fetch = fetch;
await initLanguage();
await retrieveServerConfig();
return Promise.all([initLayout(), initLanguage(), retrieveServerConfig()]);
}
export const init = memoize(_init, () => 'singlevalue');