1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 21:17:59 +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> </script>
<div class="buttons"> <div class="buttons">
<button class="btn">Get indexes</button> <button class="btn" on:click={getIndexes}>Get indexes</button>
<button class="btn" disabled={!indexes?.length}>Drop selected</button> <button class="btn danger" disabled={!indexes?.length}>Drop selected</button>
<button class="btn">Create&hellip;</button> <button class="btn">Create&hellip;</button>
</div> </div>

View File

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

View File

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