Skip to content

Commit 08b9cbb

Browse files
committed
UI fixes
1 parent 3ff2962 commit 08b9cbb

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

coderd/users.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212
"github.com/google/uuid"
1313
"golang.org/x/xerrors"
1414

15+
"cdr.dev/slog"
16+
1517
"github.com/coder/coder/coderd/audit"
1618
"github.com/coder/coder/coderd/database"
1719
"github.com/coder/coder/coderd/database/db2sdk"
@@ -713,6 +715,12 @@ func (api *API) putUserStatus(status database.UserStatus) func(rw http.ResponseW
713715
return
714716
}
715717

718+
err = api.Pubsub.Publish("licenses", []byte("add")) // FIXME PubsubEventLicenses
719+
if err != nil {
720+
api.Logger.Error(context.Background(), "failed to publish license add", slog.Error(err))
721+
// don't fail the HTTP request, since we did write it successfully to the database
722+
}
723+
716724
httpapi.Write(ctx, rw, http.StatusOK, db2sdk.User(suspendedUser, organizations))
717725
}
718726
}

site/src/i18n/en/usersPage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"deleteMenuItem": "Delete",
66
"listWorkspacesMenuItem": "View workspaces",
77
"activateMenuItem": "Activate",
8-
"markUserDormantMenuItem": "Mark user as dormant",
8+
"markUserDormantMenuItem": "Mark as dormant",
99
"resetPasswordMenuItem": "Reset password",
1010
"editUserRolesTooltip": "Edit user roles",
1111
"fieldSetRolesTooltip": "Available roles",

site/src/pages/UsersPage/UsersPage.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export const Language = {
2929
activateDialogTitle: "Activate user",
3030
activateDialogAction: "Activate",
3131
activateDialogMessagePrefix: "Do you want to activate the user",
32-
markUserDormantDialogTitle: "Mark user dormant",
33-
markUserDormantDialogAction: "Mark dormant",
32+
markUserDormantDialogTitle: "Mark user as dormant",
33+
markUserDormantDialogAction: "Mark as dormant",
3434
markUserDormantDialogMessagePrefix:
35-
"Do you want to mark the user account dormant",
35+
"Do you want to mark the user account as dormant",
3636
}
3737

3838
const getSelectedUser = (id: string, users?: User[]) =>
@@ -262,8 +262,8 @@ export const UsersPage: FC<{ children?: ReactNode }> = () => {
262262
usersState.matches("markingUserDormant")
263263
}
264264
confirmLoading={usersState.matches("markingUserDormant")}
265-
title={Language.markUserDormantDialogTitle}
266-
confirmText={Language.markUserDormantDialogAction}
265+
title="Mark user as dormant"
266+
confirmText="Mark as dormant"
267267
onConfirm={() => {
268268
usersSend("CONFIRM_USER_DORMANT")
269269
}}
@@ -272,9 +272,8 @@ export const UsersPage: FC<{ children?: ReactNode }> = () => {
272272
}}
273273
description={
274274
<>
275-
{Language.markUserDormantDialogMessagePrefix}
276-
{usernameToMarkDormant && " "}
277-
<strong>{usernameToMarkDormant ?? ""}</strong>?
275+
Do you want to mark the user {" "}
276+
<strong>{usernameToMarkDormant ?? ""}</strong> as dormant?
278277
</>
279278
}
280279
/>

0 commit comments

Comments
 (0)