Allow updating of secret variables

This commit is contained in:
Torsten Dittmann
2025-05-19 00:41:18 +02:00
parent e58e8ae675
commit 9d5675ed62
2 changed files with 10 additions and 10 deletions
@@ -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>