Make filesystem list view columns sortable
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { formatDate } from "util/Formatting";
|
||||
import Modal from "util/Modal.svelte"
|
||||
import SortButton from "./SortButton.svelte";
|
||||
import SortButton from "layout/SortButton.svelte";
|
||||
import { flip } from "svelte/animate";
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import { flip } from "svelte/animate";
|
||||
import { formatDataVolume } from "util/Formatting";
|
||||
import SortButton from "./SortButton.svelte";
|
||||
import SortButton from "layout/SortButton.svelte";
|
||||
|
||||
export let peers = [];
|
||||
$: update_peers(peers)
|
||||
|
@@ -1,27 +0,0 @@
|
||||
<script>
|
||||
export let field = ""
|
||||
export let active_field = ""
|
||||
export let asc = true
|
||||
export let sort_func
|
||||
</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>
|
@@ -2,7 +2,7 @@
|
||||
import { onMount } from "svelte";
|
||||
import LoadingIndicator from "util/LoadingIndicator.svelte";
|
||||
import { formatDataVolume, formatDate } from "util/Formatting";
|
||||
import SortButton from "admin_panel/SortButton.svelte";
|
||||
import SortButton from "layout/SortButton.svelte";
|
||||
|
||||
export let user_id = ""
|
||||
let files = []
|
||||
|
Reference in New Issue
Block a user