diff --git a/app/web/admin.css b/app/web/admin.css index 819261a..f1ddb8a 100644 --- a/app/web/admin.css +++ b/app/web/admin.css @@ -2740,6 +2740,12 @@ margin-bottom: 0.65rem; } + .modal-head-actions { + display: inline-flex; + align-items: center; + gap: 0.45rem; + } + .modal-head h3 { margin: 0; font-family: "Prata", serif; diff --git a/app/web/admin.jsx b/app/web/admin.jsx index 4deb61b..ec16e06 100644 --- a/app/web/admin.jsx +++ b/app/web/admin.jsx @@ -594,6 +594,8 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__"; profileLoading, saveLoading, form, + currentEmail, + currentRoleLabel, totpStatus, onFieldChange, onClose, @@ -601,6 +603,7 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__"; onSetupTotp, onRegenerateBackupCodes, onDisableTotp, + onLogout, }) { if (!open) return null; return ( @@ -613,14 +616,31 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__"; Профиль и безопасность аккаунта.

- +
+ + +
{profileLoading ? (

Загрузка профиля...

) : (
+
+ Пользователь: {currentEmail || "-"} +
+ Роль: {currentRoleLabel || "-"} +
+ 2FA: {totpStatus.enabled ? "Включена" : "Выключена"} +
@@ -3469,26 +3489,10 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__"; ) : null} -
- {token && role ? ( - <> - Пользователь: {email} -
- Роль: {roleLabel(role)} -
- 2FA: {totpStatus.enabled ? "Включена" : "Выключена"} - - ) : ( - "Не авторизован" - )} -
-
@@ -3912,6 +3916,8 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__"; profileLoading={accountModal.loading} saveLoading={accountModal.saving} form={accountModal.form} + currentEmail={email} + currentRoleLabel={roleLabel(role)} totpStatus={totpStatus} onFieldChange={updateAccountField} onClose={closeAccountModal} @@ -3919,6 +3925,7 @@ const NEW_REQUEST_CLIENT_OPTION = "__new_client__"; onSetupTotp={setupTotp} onRegenerateBackupCodes={regenerateTotpBackupCodes} onDisableTotp={disableTotp} + onLogout={logout} /> {!token || !role ? : null}