mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-07 07:04:22 +08:00
fixed enter key handling in the "create target" form
This commit is contained in:
parent
53971dc8ed
commit
d465586683
1 changed files with 19 additions and 4 deletions
|
@ -85,24 +85,39 @@
|
|||
create()
|
||||
e.preventDefault()
|
||||
}}>
|
||||
<!-- Defualt button for key handling -->
|
||||
<Button class="d-none" type="submit"></Button>
|
||||
|
||||
<!-- svelte-ignore a11y_label_has_associated_control -->
|
||||
<label class="mb-2">Type</label>
|
||||
<ButtonGroup class="w-100 mb-3">
|
||||
<Button
|
||||
active={type === TargetKind.Ssh}
|
||||
on:click={() => type = TargetKind.Ssh}
|
||||
on:click={e => {
|
||||
type = TargetKind.Ssh
|
||||
e.preventDefault()
|
||||
}}
|
||||
>SSH</Button>
|
||||
<Button
|
||||
active={type === TargetKind.Http}
|
||||
on:click={() => type = TargetKind.Http}
|
||||
on:click={e => {
|
||||
type = TargetKind.Http
|
||||
e.preventDefault()
|
||||
}}
|
||||
>HTTP</Button>
|
||||
<Button
|
||||
active={type === TargetKind.MySql}
|
||||
on:click={() => type = TargetKind.MySql}
|
||||
on:click={e => {
|
||||
type = TargetKind.MySql
|
||||
e.preventDefault()
|
||||
}}
|
||||
>MySQL</Button>
|
||||
<Button
|
||||
active={type === TargetKind.Postgres}
|
||||
on:click={() => type = TargetKind.Postgres}
|
||||
on:click={e => {
|
||||
type = TargetKind.Postgres
|
||||
e.preventDefault()
|
||||
}}
|
||||
>PostgreSQL</Button>
|
||||
</ButtonGroup>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue