+
Users
View and manage user accounts on this instance.
@@ -140,37 +154,6 @@ export function UsersPanel() {
{error}
)}
- {/* Temp password banner */}
- {tempPassword && (
-
-
-
- Temporary password for {data?.users.find(u => u.id === tempPassword.userId)?.username ?? 'user'}:
-
-
-
-
-
- {tempPassword.password}
-
-
-
-
- This password is shown once. The user has been disconnected and must log in again.
-
-
- )}
-
{/* Loading */}
{loading && !data && (
Loading users...
@@ -187,102 +170,135 @@ export function UsersPanel() {
const isFederated = !!user.homeInstance;
const isDeleted = user.isDeleted;
+ const hasTempPassword = tempPassword?.userId === user.id;
+
return (
-
- {/* Avatar */}
-
-
- {/* Info */}
-
-
-
- {user.username}
-
- {user.displayName && !isDeleted && (
-
{user.displayName}
- )}
+
+
+ {/* Avatar */}
+
-
- {user.isAdmin && (
-
- Admin
-
- )}
- {isFederated && (
-
- {user.homeInstance}
-
- )}
- {isDeleted && (
-
- Deleted
-
- )}
-
- {formatDate(user.createdAt)}
-
-
-
- {/* Actions */}
- {!isDeleted && (
-
- {/* Toggle admin */}
-
- {/* Delete user */}
-
handleDeleteUser(user)}
- disabled={isSelf}
- title={isSelf ? 'Use account settings to delete your own account' : 'Delete user'}
- className={`p-1.5 rounded transition-colors ${
- isSelf
- ? 'text-txt-tertiary/30 cursor-not-allowed'
- : 'text-txt-tertiary hover:text-accent-rose hover:bg-accent-rose/10'
- }`}
- >
-
-
+ {/* Inline temp password display */}
+ {hasTempPassword && (
+
+
+
Temporary password:
+
setTempPassword(null)}
+ className="text-txt-tertiary hover:text-txt-secondary text-xs"
+ >
+ Dismiss
+
+
+
+
+ {tempPassword.password}
+
+ navigator.clipboard.writeText(tempPassword.password)}
+ className="px-2 py-1 bg-white/[0.06] hover:bg-white/[0.1] text-txt-secondary text-xs rounded transition-colors"
+ >
+ Copy
+
+
+
+ Shown once. User has been disconnected and must log in again.
+
)}
@@ -315,6 +331,16 @@ export function UsersPanel() {
)}
{/* Confirm dialogs */}
+
setResetConfirmUser(null)}
+ onConfirm={handleResetConfirm}
+ title="Reset Password"
+ description={<>Reset the password for {resetConfirmUser?.username}? They will be disconnected immediately and must log in with the new temporary password.>}
+ confirmLabel="Reset Password"
+ variant="warning"
+ loading={resetLoading}
+ />
setConfirmAction(null)}