fix: update admin page for passwordless authentication
- Remove handleResetPassword function (no longer needed with Magic Links) - Change password reset button to send Magic Link instead - Update button icon from KeyRound to Mail - Update button tooltip to reflect new Magic Link flow - Remove unused KeyRound import
This commit is contained in:
parent
2016767dcb
commit
fe4907ee46
|
|
@ -22,7 +22,6 @@ import {
|
|||
Shield,
|
||||
ShieldOff,
|
||||
Trash2,
|
||||
KeyRound,
|
||||
Mail,
|
||||
RefreshCw,
|
||||
LogOut,
|
||||
|
|
@ -156,20 +155,6 @@ export default function AdminPage() {
|
|||
setActionLoading(null);
|
||||
};
|
||||
|
||||
const handleResetPassword = async (userId: number) => {
|
||||
if (!confirm("Passwort zuruecksetzen? Der User erhaelt eine Email mit dem neuen Passwort.")) {
|
||||
return;
|
||||
}
|
||||
setActionLoading(userId);
|
||||
const { data, error } = await adminApi.resetPassword(userId);
|
||||
if (error) {
|
||||
setError(error);
|
||||
} else {
|
||||
showSuccess(data?.message || "Passwort zurueckgesetzt");
|
||||
}
|
||||
setActionLoading(null);
|
||||
};
|
||||
|
||||
const handleResendVerification = async (userId: number) => {
|
||||
setActionLoading(userId);
|
||||
const { data, error } = await adminApi.resendVerification(userId);
|
||||
|
|
@ -488,14 +473,14 @@ export default function AdminPage() {
|
|||
</Button>
|
||||
)}
|
||||
|
||||
{/* Passwort zuruecksetzen */}
|
||||
{/* Login-Link erneut senden */}
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => handleResetPassword(u.id)}
|
||||
title="Passwort zuruecksetzen"
|
||||
onClick={() => handleResendVerification(u.id)}
|
||||
title="Login-Link erneut senden"
|
||||
>
|
||||
<KeyRound className="h-4 w-4" />
|
||||
<Mail className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
{/* Container loeschen */}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user