1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-27 05:11:11 +02:00

refactor(web): albums list (1) (#7660)

* refactor: albums list

* fix: rename filename

* chore: fix merge

* pr feedback

* chore: fix merge

* pr feedback

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
martin
2024-03-14 20:05:57 +01:00
committed by GitHub
parent 2080aeee4d
commit c04dfdf38b
6 changed files with 447 additions and 471 deletions

View File

@ -1,29 +0,0 @@
<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}
&#8595;
{:else}
&#8593;
{/if}
{/if}{option.title}</button
></th
>