File tree Expand file tree Collapse file tree
src/components/widget/secrets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ fn find_sops_declaration_file(base: &Path) -> anyhow::Result<PathBuf> {
527527 }
528528}
529529
530- /// Declares a SOPS secret in the nix-darwin module, creating the module if it does not exist .
530+ /// Declares a SOPS secret in the existing nix-darwin module identified by `declaration_file` .
531531fn declare_sops_secret (
532532 base : & Path ,
533533 declaration_file : & Path ,
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export function SecretDetailView({
9898 } ;
9999
100100 const onDelete = async ( ) => {
101- if ( isDeleting ) return ;
101+ if ( capability === "unavailable" || isDeleting ) return ;
102102 setIsDeleting ( true ) ;
103103 setDeleteError ( null ) ;
104104 try {
@@ -282,6 +282,7 @@ export function SecretDetailView({
282282 variant = "ghost"
283283 size = "sm"
284284 className = "text-destructive"
285+ disabled = { capability === "unavailable" || isDeleting }
285286 onClick = { ( ) => {
286287 setDeleteError ( null ) ;
287288 setDeleteOpen ( true ) ;
@@ -314,7 +315,7 @@ export function SecretDetailView({
314315 < AlertDialogFooter >
315316 < AlertDialogCancel disabled = { isDeleting } > Cancel</ AlertDialogCancel >
316317 < AlertDialogAction
317- disabled = { isDeleting }
318+ disabled = { capability === "unavailable" || isDeleting }
318319 onClick = { ( event ) => {
319320 event . preventDefault ( ) ;
320321 void onDelete ( ) ;
You can’t perform that action at this time.
0 commit comments