Improve type
This commit is contained in:
parent
c460501b05
commit
26933dc247
|
@ -15,7 +15,7 @@
|
||||||
const modalContext = getContext(Context.Modal)
|
const modalContext = getContext(Context.Modal)
|
||||||
|
|
||||||
export let save: any
|
export let save: any
|
||||||
export let row: any
|
export let row: { name: string } | undefined = undefined
|
||||||
|
|
||||||
let deleteDialog: ConfirmDialog
|
let deleteDialog: ConfirmDialog
|
||||||
let name = row?.name || ""
|
let name = row?.name || ""
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
title={!row ? "Add new environment variable" : "Edit environment variable"}
|
title={!row ? "Add new environment variable" : "Edit environment variable"}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
disabled={row}
|
disabled={!!row}
|
||||||
label="Name"
|
label="Name"
|
||||||
bind:value={name}
|
bind:value={name}
|
||||||
error={HasSpacesRegex.test(name) ? "Must not include spaces" : undefined}
|
error={HasSpacesRegex.test(name) ? "Must not include spaces" : undefined}
|
||||||
|
@ -100,12 +100,12 @@
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={deleteDialog}
|
bind:this={deleteDialog}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
deleteVariable(row.name)
|
deleteVariable(name)
|
||||||
}}
|
}}
|
||||||
okText="Delete Environment Variable"
|
okText="Delete Environment Variable"
|
||||||
title="Confirm Deletion"
|
title="Confirm Deletion"
|
||||||
>
|
>
|
||||||
Are you sure you wish to delete the environment variable
|
Are you sure you wish to delete the environment variable
|
||||||
<i>{row.name}?</i>
|
<i>{name}?</i>
|
||||||
This action cannot be undone.
|
This action cannot be undone.
|
||||||
</ConfirmDialog>
|
</ConfirmDialog>
|
||||||
|
|
Loading…
Reference in New Issue