Skip to content

Commit

Permalink
chore: improve confirm app dialog copy
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Nov 9, 2024
1 parent 1a1549e commit f077b2a
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions frontend/src/screens/apps/ShowApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,19 +294,29 @@ function AppInternal({ app, refetchApp, capabilities }: AppInternalProps) {
Cancel
</Button>

{app.isolated && !permissions.isolated ? (
{(app.isolated && !permissions.isolated) ||
(!app.scopes.includes("pay_invoice") &&
permissions.scopes.includes("pay_invoice")) ? (
<AlertDialog>
<AlertDialogTrigger asChild>
<Button type="button">Save</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogTitle>Update App</AlertDialogTitle>
<AlertDialogTitle>
Confirm Update App
</AlertDialogTitle>
<AlertDialogDescription>
<b>
Are you sure you wish to remove isolation
status from this app? this could cause loss of
funds.
</b>
{app.isolated && !permissions.isolated ? (
<b>
Are you sure you wish to remove the isolated
status from this connection?
</b>
) : (
<b>
Are you sure you wish to give this
connection pay permissions?
</b>
)}
</AlertDialogDescription>
<AlertDialogFooter className="mt-5">
<AlertDialogCancel
Expand Down

0 comments on commit f077b2a

Please sign in to comment.