mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-20 21:39:37 +02:00
collections v3
This commit is contained in:
parent
e533dda328
commit
7e5e4edd4d
9 changed files with 266 additions and 158 deletions
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
import Calendar from '~icons/mdi/calendar';
|
||||
import MapMarker from '~icons/mdi/map-marker';
|
||||
import Launch from '~icons/mdi/launch';
|
||||
import TrashCanOutline from '~icons/mdi/trash-can-outline';
|
||||
|
||||
import FileDocumentEdit from '~icons/mdi/file-document-edit';
|
||||
|
||||
import { goto } from '$app/navigation';
|
||||
import type { Collection } from '$lib/types';
|
||||
import { addToast } from '$lib/toasts';
|
||||
|
@ -13,6 +13,10 @@
|
|||
|
||||
// export let type: String;
|
||||
|
||||
function editAdventure() {
|
||||
dispatch('edit', collection);
|
||||
}
|
||||
|
||||
export let collection: Collection;
|
||||
|
||||
async function deleteCollection() {
|
||||
|
@ -42,6 +46,9 @@
|
|||
<button on:click={deleteCollection} class="btn btn-secondary"
|
||||
><TrashCanOutline class="w-5 h-5 mr-1" /></button
|
||||
>
|
||||
<button class="btn btn-primary" on:click={editAdventure}>
|
||||
<FileDocumentEdit class="w-6 h-6" />
|
||||
</button>
|
||||
<button class="btn btn-primary" on:click={() => goto(`/collections/${collection.id}`)}
|
||||
><Launch class="w-5 h-5 mr-1" /></button
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue