mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(web): sorting options for albums (#5233)
* fix: albums * pr feedback * fix: current behavior * rename * fix: album metadatas * fix: tests * fix: e2e test * simplify * fix: cover shared links * rename function * merge main * merge main --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
c04340c63e
commit
3aa2927dae
9 changed files with 223 additions and 81 deletions
|
|
@ -5,10 +5,10 @@
|
|||
export let option: Sort;
|
||||
|
||||
const handleSort = () => {
|
||||
if (albumViewSettings === option.sortTitle) {
|
||||
if (albumViewSettings === option.title) {
|
||||
option.sortDesc = !option.sortDesc;
|
||||
} else {
|
||||
albumViewSettings = option.sortTitle;
|
||||
albumViewSettings = option.title;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -18,12 +18,12 @@
|
|||
class="rounded-lg p-2 hover:bg-immich-dark-primary hover:dark:bg-immich-dark-primary/50"
|
||||
on:click={() => handleSort()}
|
||||
>
|
||||
{#if albumViewSettings === option.sortTitle}
|
||||
{#if albumViewSettings === option.title}
|
||||
{#if option.sortDesc}
|
||||
↓
|
||||
{:else}
|
||||
↑
|
||||
{/if}
|
||||
{/if}{option.table}</button
|
||||
{/if}{option.title}</button
|
||||
></th
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue