diff --git a/ui/src/accounts/PersonalTokensCard.vue b/ui/src/accounts/PersonalTokensCard.vue index ee97d1048..9ebc4e5e1 100644 --- a/ui/src/accounts/PersonalTokensCard.vue +++ b/ui/src/accounts/PersonalTokensCard.vue @@ -65,12 +65,18 @@ const create = () => const copy = () => navigator.clipboard.writeText(created.value); +// The token is kept until the next Revoke: Reka closes the dialog before the +// action's click runs, so clearing it on close would drop the revoke. const pending = ref(null); +const dialogOpen = ref(false); const revoke = (id: string) => run(async () => { await api.revokeToken(id); await load(); }); +const confirmRevoke = () => { + if (pending.value) revoke(pending.value.id); +}; onMounted(load); @@ -106,11 +112,11 @@ onMounted(load); Created Expires Last used - + - + Revoke token? @@ -118,7 +124,7 @@ onMounted(load); Cancel - Revoke token + Revoke token