fix: add Update button for locked environment variable comments

Removed instantSave from comment field and added a proper Update button with Delete modal for locked environment variables. This ensures users can explicitly save their comment changes on locked variables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-11-18 15:13:55 +01:00
parent 4623853c99
commit c8558b5f78

View file

@ -23,7 +23,7 @@
</div>
@can('update', $this->env)
<div class="w-full">
<x-forms.input instantSave id="comment" label="Comment (Optional)"
<x-forms.input id="comment" label="Comment (Optional)"
helper="Add a note to document what this environment variable is used for." maxlength="256" />
</div>
<div class="flex flex-col w-full gap-3">
@ -71,6 +71,17 @@
@endif
</div>
</div>
<div class="flex w-full justify-end gap-2">
<x-forms.button type="submit">Update</x-forms.button>
@can('delete', $this->env)
<x-modal-confirmation title="Confirm Environment Variable Deletion?" isErrorButton
buttonTitle="Delete" submitAction="delete" :actions="['The selected environment variable will be permanently deleted.']"
confirmationText="{{ $env->key }}" buttonFullWidth="true"
confirmationLabel="Please confirm the execution of the actions by entering the Environment Variable Name below"
shortConfirmationLabel="Environment Variable Name" :confirmWithPassword="false"
step2ButtonText="Permanently Delete" />
@endcan
</div>
@else
<div class="flex flex-col w-full gap-3">
<div class="flex flex-wrap w-full items-center gap-4">