Make temp password click-to-copy in reset password flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-02-27 23:35:18 +08:00
parent 8582b41b03
commit c68fd69cdf

View File

@ -177,7 +177,14 @@ export default function UserActionsMenu({ user, currentUsername }: UserActionsMe
{tempPassword ? (
<div className="px-3 py-2 space-y-1.5">
<p className="text-[11px] text-muted-foreground">Temporary password:</p>
<code className="block px-2 py-1.5 bg-card-elevated rounded text-xs font-mono text-accent select-all break-all">
<code
className="block px-2 py-1.5 bg-card-elevated rounded text-xs font-mono text-accent select-all break-all cursor-pointer hover:bg-card-elevated/80 transition-colors"
title="Click to copy"
onClick={() => {
navigator.clipboard.writeText(tempPassword);
toast.success('Password copied to clipboard');
}}
>
{tempPassword}
</code>
<button