Handle database
This commit is contained in:
@@ -1,18 +1,25 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { db } from '$lib/catalog/db';
|
||||
import { catalog } from '$lib/catalog/test';
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
import Catalog from '$lib/components/Catalog.svelte';
|
||||
import Modal from '$lib/components/Modal.svelte';
|
||||
import { showSnackbar } from '$lib/util/snackbar';
|
||||
|
||||
function onClick() {
|
||||
goto('/upload');
|
||||
}
|
||||
|
||||
function clear() {
|
||||
db.catalog.clear();
|
||||
}
|
||||
|
||||
let modal: HTMLDialogElement;
|
||||
</script>
|
||||
|
||||
<Button variant="secondary" on:click={onClick}>Upload</Button>
|
||||
<Button variant="danger" on:click={clear}>Clear</Button>
|
||||
|
||||
<Modal bind:modal>
|
||||
<div slot="title">Title</div>
|
||||
<div slot="content">
|
||||
|
||||
Reference in New Issue
Block a user