mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: setup rollup-plugin-visualizer and remove lodash (#6974)
* chore: setup rollup-plugin-visualizer * chore: remove lodash * format * remove lodash-es from build
This commit is contained in:
parent
abb6922c2b
commit
b273ea2ba4
6 changed files with 261 additions and 23 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
import { mdiCheck } from '@mdi/js';
|
||||
|
||||
import _ from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import LinkButton from './buttons/link-button.svelte';
|
||||
import { clickOutside } from '$lib/utils/click-outside';
|
||||
import { fly } from 'svelte/transition';
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
class="grid grid-cols-[20px,1fr] place-items-center p-2 transition-all hover:bg-gray-300 dark:hover:bg-gray-800"
|
||||
on:click={() => handleSelectOption(option)}
|
||||
>
|
||||
{#if _.isEqual(selectedOption, option)}
|
||||
{#if isEqual(selectedOption, option)}
|
||||
<div class="text-immich-primary dark:text-immich-dark-primary">
|
||||
<Icon path={mdiCheck} size="18" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { AssetResponseDto } from '@api';
|
||||
import lodash from 'lodash-es';
|
||||
import { chain } from 'lodash-es';
|
||||
import { DateTime, Interval } from 'luxon';
|
||||
|
||||
export const fromLocalDateTime = (localDateTime: string) => DateTime.fromISO(localDateTime, { zone: 'UTC' });
|
||||
|
|
@ -45,8 +45,7 @@ export function splitBucketIntoDateGroups(
|
|||
assets: AssetResponseDto[],
|
||||
locale: string | undefined,
|
||||
): AssetResponseDto[][] {
|
||||
return lodash
|
||||
.chain(assets)
|
||||
return chain(assets)
|
||||
.groupBy((asset) => fromLocalDateTime(asset.localDateTime).toLocaleString(groupDateFormat, { locale }))
|
||||
.sortBy((group) => assets.indexOf(group[0]))
|
||||
.value();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
import LibrarySettings from '$lib/components/admin-page/settings/library-settings/library-settings.svelte';
|
||||
import LoggingSettings from '$lib/components/admin-page/settings/logging-settings/logging-settings.svelte';
|
||||
import { mdiAlert, mdiContentCopy, mdiDownload } from '@mdi/js';
|
||||
import _ from 'lodash';
|
||||
import AdminSettings from '$lib/components/admin-page/settings/admin-settings.svelte';
|
||||
|
||||
export let data: PageData;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue