1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 13:07:58 +00:00

Added some boilerplate

This commit is contained in:
Romein van Buren 2023-01-10 20:24:38 +01:00
parent de36aa57dc
commit f4bf270a20
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
</script>
<div class="buttons">
<button class="btn">Get indexes</button>
<button class="btn" disabled={!indexes?.length}>Drop selected</button>
<button class="btn" on:click={getIndexes}>Get indexes</button>
<button class="btn danger" disabled={!indexes?.length}>Drop selected</button>
<button class="btn">Create&hellip;</button>
</div>

View File

@ -26,7 +26,7 @@
Success! {insertedIds.length} document{insertedIds.length > 1 ? 's' : ''} inserted
{/if}
</div>
<button type="submit" class="btn">Insert</button>
<button type="submit" class="btn" disabled={!input}>Insert</button>
</div>
</form>

View File

@ -6,10 +6,10 @@
let remove = '';
$: code = `db.${collection.key}.remove(${remove});`;
function insert() {}
function performRemove() {}
</script>
<form on:submit|preventDefault={insert}>
<form on:submit|preventDefault={performRemove}>
<CodeExample {code} />
<label class="field">
@ -18,7 +18,7 @@
<div class="flex">
<div></div>
<button type="submit" class="btn">Remove</button>
<button type="submit" class="btn" disabled={!remove}>Remove</button>
</div>
</form>