mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Allow updating of secret variables
This commit is contained in:
@@ -69,7 +69,6 @@
|
||||
|
||||
async function handleVariableCreated(event: CustomEvent<Models.Variable[]>) {
|
||||
const variables = event.detail;
|
||||
console.log(variables);
|
||||
try {
|
||||
const promises = variables.map((variable) =>
|
||||
sdkCreateVariable(variable.key, variable.value, variable?.secret || false)
|
||||
@@ -369,16 +368,16 @@
|
||||
</Button>
|
||||
<svelte:fragment slot="tooltip" let:toggle>
|
||||
<ActionMenu.Root>
|
||||
<ActionMenu.Item.Button
|
||||
trailingIcon={IconPencil}
|
||||
on:click={(e) => {
|
||||
selectedVar = variable;
|
||||
showUpdate = true;
|
||||
toggle(e);
|
||||
}}>
|
||||
Update
|
||||
</ActionMenu.Item.Button>
|
||||
{#if !variable.secret}
|
||||
<ActionMenu.Item.Button
|
||||
trailingIcon={IconPencil}
|
||||
on:click={(e) => {
|
||||
selectedVar = variable;
|
||||
showUpdate = true;
|
||||
toggle(e);
|
||||
}}>
|
||||
Update
|
||||
</ActionMenu.Item.Button>
|
||||
<ActionMenu.Item.Button
|
||||
trailingIcon={IconEyeOff}
|
||||
on:click={(e) => {
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<Selector.Checkbox
|
||||
id="secret"
|
||||
label="Secret"
|
||||
disabled={selectedVar.secret}
|
||||
bind:checked={pair.secret}
|
||||
description="If selected, you and your team won't be able to read the values after creation." />
|
||||
</Layout.Stack>
|
||||
|
||||
Reference in New Issue
Block a user