DRY pass #3: one one-time secret reveal (#5373)

AccountView's device-token reveal was OneTimeLink's markup and copy handler
again. OneTimeLink becomes OneTimeSecret (value, note, noun = link | token),
and the account page shows a new token through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 15:13:18 -04:00
co-authored by Claude Opus 5.5
parent a0249564e2
commit 498b23789c
4 changed files with 36 additions and 56 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import { errorMessage } from "../api/errors";
import { appLink } from "../router/links";
import BaseButton from "./BaseButton.vue";
import BaseInput from "./BaseInput.vue";
import OneTimeLink from "./OneTimeLink.vue";
import OneTimeSecret from "./OneTimeSecret.vue";
import { toastOnFailure, useLoad } from "../composables/useAction";
// Admin: invite one person to register while registration stays closed (#5172).
@@ -97,9 +97,9 @@ onMounted(() => {
<section class="flex flex-col gap-5">
<h2 class="section-label">Invites</h2>
<OneTimeLink
<OneTimeSecret
v-if="freshLink"
:link="freshLink"
:value="freshLink"
note="Send this to the person you're inviting."
@done="freshLink = ''"
/>