mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
* fix: album sort options * fix: don't load assets * pr feedback * fix: albumStub * fix(web): album shared without assets * fix: tests --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
30 lines
721 B
Svelte
30 lines
721 B
Svelte
<script lang="ts">
|
|
import type { Sort } from '../../../routes/(user)/albums/+page.svelte';
|
|
|
|
export let albumViewSettings: string;
|
|
export let option: Sort;
|
|
|
|
const handleSort = () => {
|
|
if (albumViewSettings === option.title) {
|
|
option.sortDesc = !option.sortDesc;
|
|
} else {
|
|
albumViewSettings = option.title;
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<th class="{option.widthClass} text-sm font-medium"
|
|
><button
|
|
class="rounded-lg p-2 hover:bg-immich-dark-primary hover:dark:bg-immich-dark-primary/50"
|
|
on:click={() => handleSort()}
|
|
>
|
|
{#if albumViewSettings === option.title}
|
|
{#if option.sortDesc}
|
|
↓
|
|
{:else}
|
|
↑
|
|
{/if}
|
|
{/if}{option.title}</button
|
|
></th
|
|
>
|