Make filesystem list view columns sortable

This commit is contained in:
2025-04-02 15:12:38 +02:00
parent 1d72179672
commit 4b297fec46
11 changed files with 106 additions and 50 deletions

View File

@@ -0,0 +1,23 @@
<script lang="ts">
export let field = ""
export let active_field = ""
export let asc = true
export let sort_func: (field: string) => void
</script>
<button class:button_highlight={active_field === field} on:click={() => sort_func(field)}>
{#if active_field === field}
{#if asc}{:else}{/if}
{/if}
<slot></slot>
</button>
<style>
button {
display: block;
margin: 0;
line-height: 1em;
width: 100%;
text-align: center;
}
</style>