feat(frontend): implement trash view with restore and permanent delete
- New /files/trash page: same grid as files view, deleted files only
- Tap selects (no detail page for deleted files), long-press drag-selects
- Trash selection bar: Restore (bulk) and Delete permanently (bulk, confirmed)
- Trash icon added to files header, navigates to /files/trash
- Mock: MOCK_TRASH with 6 pre-seeded files; bulk/delete now moves to trash;
handlers for POST /files/{id}/restore and DELETE /files/{id}/permanent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
onOrderToggle: () => void;
|
||||
onFilterToggle: () => void;
|
||||
onUpload?: () => void;
|
||||
onTrash?: () => void;
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -22,6 +23,7 @@
|
||||
onOrderToggle,
|
||||
onFilterToggle,
|
||||
onUpload,
|
||||
onTrash,
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
@@ -43,6 +45,14 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if onTrash}
|
||||
<button class="icon-btn trash-btn" onclick={onTrash} title="Trash">
|
||||
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true">
|
||||
<path d="M2 4h11M5 4V2.5h5V4M5.5 7v4.5M9.5 7v4.5M3 4l.8 9h7.4l.8-9" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<div class="controls">
|
||||
<select
|
||||
class="sort-select"
|
||||
|
||||
Reference in New Issue
Block a user