feat(web): close #358 invites RowActionsMenu wiring

The mobile-responsive design called for all 4 admin tables to use
RowActionsMenu. Requests + Quarantine + Users users-section landed
in earlier commits; the invites section in the same users page was
still rendering inline Copy/Revoke buttons. Now uses RowActionsMenu
with primary Copy + secondary Revoke (danger).

Extend expiry from the design's secondary list deferred — no
server endpoint exists yet (lib/api/admin.ts has no
extendInviteExpiry).

Closes the in-code portion of #358. Real-device verification
walkthrough at 375/414/768 + grid/safe-area checks remain
operator-side.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 17:14:18 -04:00
parent 308202a1df
commit 1daf0b7fdf
+19 -18
View File
@@ -20,7 +20,7 @@
import { pushToast } from '$lib/stores/toast.svelte'; import { pushToast } from '$lib/stores/toast.svelte';
import Modal from '$lib/components/Modal.svelte'; import Modal from '$lib/components/Modal.svelte';
import RowActionsMenu, { type RowAction } from '$lib/components/RowActionsMenu.svelte'; import RowActionsMenu, { type RowAction } from '$lib/components/RowActionsMenu.svelte';
import { Shield, ShieldOff, CheckCircle2, XCircle, KeyRound, Trash2 } from 'lucide-svelte'; import { Shield, ShieldOff, CheckCircle2, XCircle, KeyRound, Trash2, Copy } from 'lucide-svelte';
const client = useQueryClient(); const client = useQueryClient();
@@ -329,23 +329,24 @@
<span class="shrink-0 text-xs text-text-secondary"> <span class="shrink-0 text-xs text-text-secondary">
expires {formatDate(inv.expires_at)} expires {formatDate(inv.expires_at)}
</span> </span>
<button <RowActionsMenu
type="button" primary={{
aria-label={`Copy token for invite ${inv.token}`} icon: Copy,
class="inline-flex items-center gap-1 rounded-md border border-border bg-transparent px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary" label: 'Copy',
onclick={() => copyToken(inv.token)} ariaLabel: `Copy token for invite ${inv.token}`,
> onclick: () => copyToken(inv.token)
Copy }}
</button> secondary={[
<button {
type="button" icon: Trash2,
disabled={saving} label: 'Revoke',
aria-label={`Revoke invite ${inv.token}`} ariaLabel: `Revoke invite ${inv.token}`,
class="inline-flex items-center gap-1 rounded-md border border-border bg-transparent px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50" onclick: () => onRevokeInvite(inv),
onclick={() => onRevokeInvite(inv)} danger: true,
> disabled: saving
Revoke }
</button> ]}
/>
</li> </li>
{/each} {/each}
</ul> </ul>