mirror of
https://github.com/immich-app/immich.git
synced 2026-04-16 07:31:55 -04:00
* Squash - feature complete * remove need to init assetstore * More optimizations. No need to init. Fix tests * lint * add missing selector for e2e * e2e selectors again * Update: fully reactive store, some transitions, bugfixes * merge fallout * Test fallout * safari quirk * security * lint * lint * Bug fixes * lint/format * accidental commit * lock * null check, more throttle * revert long duration * Fix intersection bounds * Fix bugs in intersection calculation * lint, tweak scrubber ui a tiny bit * bugfix - deselecting asset doesnt work * fix not loading bucket, scroll off-by-1 error, jsdoc, naming
28 lines
888 B
TypeScript
28 lines
888 B
TypeScript
function getBoolean(string: string | null, fallback: boolean) {
|
|
if (string === null) {
|
|
return fallback;
|
|
}
|
|
return 'true' === string;
|
|
}
|
|
function getNumber(string: string | null, fallback: number) {
|
|
if (string === null) {
|
|
return fallback;
|
|
}
|
|
return Number.parseInt(string);
|
|
}
|
|
export const TUNABLES = {
|
|
LAYOUT: {
|
|
WASM: getBoolean(localStorage.getItem('LAYOUT.WASM'), false),
|
|
},
|
|
TIMELINE: {
|
|
INTERSECTION_EXPAND_TOP: getNumber(localStorage.getItem('TIMELINE_INTERSECTION_EXPAND_TOP'), 500),
|
|
INTERSECTION_EXPAND_BOTTOM: getNumber(localStorage.getItem('TIMELINE_INTERSECTION_EXPAND_BOTTOM'), 500),
|
|
},
|
|
ASSET_GRID: {
|
|
NAVIGATE_ON_ASSET_IN_VIEW: getBoolean(localStorage.getItem('ASSET_GRID.NAVIGATE_ON_ASSET_IN_VIEW'), false),
|
|
},
|
|
IMAGE_THUMBNAIL: {
|
|
THUMBHASH_FADE_DURATION: getNumber(localStorage.getItem('THUMBHASH_FADE_DURATION'), 150),
|
|
},
|
|
};
|