mirror of
https://github.com/LukeHagar/OpenAPI.gg.git
synced 2025-12-06 04:20:29 +00:00
13 lines
335 B
Svelte
13 lines
335 B
Svelte
<script lang="ts">
|
|
import { db, selectedSpec } from '$lib/db';
|
|
|
|
function onSave(e: Event): void {
|
|
console.log('Save button clicked');
|
|
const newSpec = structuredClone($selectedSpec);
|
|
newSpec.id = undefined;
|
|
db.apiSpecs.put(newSpec);
|
|
}
|
|
</script>
|
|
|
|
<button class="btn variant-ghost-success" on:click={onSave}> Save As </button>
|