From 7f8455f1af9c5c1afd1123e5e666e22539583b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sun, 23 Aug 2026 05:10:17 +0000 Subject: [PATCH] user management keyed (267 -> 214) Accounts, permissions and the create-user form. The confirm dialogs for removing an account and resetting a password were multi-line JSX the scanner cannot see, so they were converted on sight rather than from its list. Cancel comes from ui.button.cancel in all four places it appears here. --- .../UserManagement/CreateUserForm.tsx | 59 ++++++++------- .../UserManagement/PermissionsSection.tsx | 26 ++++--- .../Settings/UserManagement/UsersSection.tsx | 75 +++++++++---------- src/apps/officer-web/locales/en-GB.json | 51 +++++++++++++ src/apps/officer-web/locales/pt-PT.json | 51 +++++++++++++ 5 files changed, 185 insertions(+), 77 deletions(-) diff --git a/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/CreateUserForm.tsx b/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/CreateUserForm.tsx index 0d503a82..d823baa1 100644 --- a/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/CreateUserForm.tsx +++ b/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/CreateUserForm.tsx @@ -9,6 +9,7 @@ import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { copyToClipboard } from 'helpers/clipboard'; +import { useTranslation } from '@/lib/i18n'; // The owner creating an account. Until this existed the only way to add one was an INSERT in Postgres. // @@ -65,6 +66,7 @@ type CreatedAccount = { }; export const CreateUserForm = ({ roles, usersKey }: CreateUserFormProps) => { + const { t, tUi } = useTranslation(); const client = useClient(); const queryClient = useQueryClient(); const [open, setOpen] = useState(false); @@ -118,16 +120,19 @@ export const CreateUserForm = ({ roles, usersKey }: CreateUserFormProps) => {

{created.email} created

-

- Copy what you need before closing — none of it can be shown again. -

+

{t('settings.users.copyBeforeClosing')}

- +
-
@@ -139,14 +144,14 @@ export const CreateUserForm = ({ roles, usersKey }: CreateUserFormProps) => { {created.osUser && (
- +
)} {created.osSshPublicKey && (
- +