mirror of
https://github.com/LukeHagar/OpenAPI.gg.git
synced 2025-12-06 04:20:29 +00:00
Update +page.svelte
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import CreateNewButton from '$lib/components/FileManagement/CreateNewButton.svelte';
|
import CreateNewButton from '$lib/components/FileManagement/CreateNewButton.svelte';
|
||||||
import DeleteButton from '$lib/components/FileManagement/DeleteButton.svelte';
|
import DeleteButton from '$lib/components/FileManagement/DeleteButton.svelte';
|
||||||
|
import SaveButton from '$lib/components/FileManagement/SaveButton.svelte';
|
||||||
import Upload from '$lib/components/FileManagement/Upload.svelte';
|
import Upload from '$lib/components/FileManagement/Upload.svelte';
|
||||||
import { db, selectedSpec } from '$lib/db';
|
import { db, selectedSpec } from '$lib/db';
|
||||||
import { liveQuery } from 'dexie';
|
import { liveQuery } from 'dexie';
|
||||||
@@ -10,19 +11,39 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="grid place-content-center h-full gap-2 px-1">
|
<div class="grid place-content-center h-full gap-2 px-1">
|
||||||
<label class="flex flex-col text-xs">
|
<table class="table">
|
||||||
<span>Select an API</span>
|
<thead>
|
||||||
<select bind:value={$selectedSpec} class="select w-64">
|
<tr>
|
||||||
|
<th class="text-left">ID</th>
|
||||||
|
<th class="text-left">Name</th>
|
||||||
|
<th class="text-left">Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{#if $apiSpecs}
|
{#if $apiSpecs}
|
||||||
{#each $apiSpecs as spec (spec.id)}
|
{#each $apiSpecs as spec (spec.id)}
|
||||||
<option value={spec}>{spec.name}</option>
|
<tr>
|
||||||
|
<td>{spec.id}</td>
|
||||||
|
<td>{spec.name}</td>
|
||||||
|
<td>
|
||||||
|
<DeleteButton {spec} />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
</select>
|
</tbody>
|
||||||
</label>
|
</table>
|
||||||
|
{#if $selectedSpec?.name}
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
bind:value={$selectedSpec.name}
|
||||||
|
type="text"
|
||||||
|
placeholder="Enter the name for the API Spec"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
<SaveButton />
|
||||||
<CreateNewButton />
|
<CreateNewButton />
|
||||||
<Upload />
|
<Upload />
|
||||||
<DeleteButton />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="w-full h-full flex flex-col items-center justify-center grow">
|
<!-- <div class="w-full h-full flex flex-col items-center justify-center grow">
|
||||||
<h1 class="h1">
|
<h1 class="h1">
|
||||||
|
|||||||
Reference in New Issue
Block a user