Skip to content

Commit

Permalink
feat(web): remove library type column (#16254)
Browse files Browse the repository at this point in the history
  • Loading branch information
etnoy authored Feb 21, 2025
1 parent d350022 commit 9c2c85c
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions web/src/routes/admin/library-management/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import Icon from '$lib/components/elements/icon.svelte';
import LibraryImportPathsForm from '$lib/components/forms/library-import-paths-form.svelte';
import LibraryRenameForm from '$lib/components/forms/library-rename-form.svelte';
import LibraryScanSettingsForm from '$lib/components/forms/library-scan-settings-form.svelte';
Expand Down Expand Up @@ -30,7 +29,7 @@
type UserResponseDto,
} from '@immich/sdk';
import { Button, Text } from '@immich/ui';
import { mdiDatabase, mdiDotsVertical, mdiPlusBoxOutline, mdiSync } from '@mdi/js';
import { mdiDotsVertical, mdiPlusBoxOutline, mdiSync } from '@mdi/js';
import { onMount } from 'svelte';
import { t } from 'svelte-i18n';
import { fade, slide } from 'svelte/transition';
Expand All @@ -47,8 +46,8 @@
let stats: LibraryStatsResponseDto[] = [];
let owner: UserResponseDto[] = $state([]);
let photos: number[] = [];
let videos: number[] = [];
let photos: number[] = $state([]);
let videos: number[] = $state([]);
let totalCount: number[] = $state([]);
let diskUsage: number[] = $state([]);
let diskUsageUnit: ByteUnit[] = $state([]);
Expand Down Expand Up @@ -286,10 +285,10 @@
class="mb-4 flex h-12 w-full rounded-md border bg-gray-50 text-immich-primary dark:border-immich-dark-gray dark:bg-immich-dark-gray dark:text-immich-dark-primary"
>
<tr class="grid grid-cols-6 w-full place-items-center">
<th class="text-center text-sm font-medium">{$t('type')}</th>
<th class="text-center text-sm font-medium">{$t('name')}</th>
<th class="text-center text-sm font-medium">{$t('owner')}</th>
<th class="text-center text-sm font-medium">{$t('assets')}</th>
<th class="text-center text-sm font-medium">{$t('photos')}</th>
<th class="text-center text-sm font-medium">{$t('videos')}</th>
<th class="text-center text-sm font-medium">{$t('size')}</th>
<th class="text-center text-sm font-medium"></th>
</tr>
Expand All @@ -303,28 +302,27 @@
: 'bg-immich-bg dark:bg-immich-dark-gray/50'
}`}
>
<td class=" px-10 text-sm">
<Icon
path={mdiDatabase}
size="40"
title={$t('admin.external_library_created_at', { values: { date: library.createdAt } })}
/>
</td>

<td class=" text-ellipsis px-4 text-sm">{library.name}</td>
<td class=" text-ellipsis px-4 text-sm">
<td class="text-ellipsis px-4 text-sm">{library.name}</td>
<td class="text-ellipsis px-4 text-sm">
{#if owner[index] == undefined}
<LoadingSpinner size="40" />
{:else}{owner[index].name}{/if}
</td>
<td class=" text-ellipsis px-4 text-sm">
{#if totalCount[index] == undefined}
<td class="text-ellipsis px-4 text-sm">
{#if photos[index] == undefined}
<LoadingSpinner size="40" />
{:else}
{photos[index].toLocaleString($locale)}
{/if}
</td>
<td class="text-ellipsis px-4 text-sm">
{#if videos[index] == undefined}
<LoadingSpinner size="40" />
{:else}
{totalCount[index].toLocaleString($locale)}
{videos[index].toLocaleString($locale)}
{/if}
</td>
<td class=" text-ellipsis px-4 text-sm">
<td class="text-ellipsis px-4 text-sm">
{#if diskUsage[index] == undefined}
<LoadingSpinner size="40" />
{:else}
Expand All @@ -333,7 +331,7 @@
{/if}
</td>

<td class=" text-ellipsis px-4 text-sm">
<td class="text-ellipsis px-4 text-sm">
<ButtonContextMenu
align="top-right"
direction="left"
Expand Down

0 comments on commit 9c2c85c

Please sign in to comment.