feat: add ability to add special actions to chord inputs

resolves #10
This commit is contained in:
2023-12-21 19:19:47 +01:00
parent 81af9f2e82
commit 03dd528465
5 changed files with 101 additions and 47 deletions

View File

@@ -116,7 +116,10 @@
<section bind:this={results}>
<table>
{#if page === 0}
<tr><th><ChordActionEdit on:submit={({detail}) => insertChord(detail)} /></th><td /><td /></tr>
<tr
><th class="new-chord"><ChordActionEdit on:submit={({detail}) => insertChord(detail)} /></th><td /><td
/></tr
>
{/if}
{#if $lastPage !== -1}
{#each $items.slice(page * $pageSize - (page === 0 ? 0 : 1), (page + 1) * $pageSize - 1) as [chord] (JSON.stringify(chord.id))}
@@ -144,6 +147,10 @@
min-width: 8ch;
}
.new-chord :global(.add) {
visibility: hidden;
}
textarea {
transition: border-color 250ms ease;
background: none;