mirror of
https://github.com/immich-app/immich.git
synced 2025-12-09 08:53:46 +09:00
18 lines
681 B
TypeScript
18 lines
681 B
TypeScript
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;
|
|
|
|
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;
|
|
return Promise.all([initLayout(), initLanguage(), retrieveServerConfig()]);
|
|
}
|
|
|
|
export const init = memoize(_init, () => 'singlevalue');
|