Refine admin role menus and editor default pickup permission

This commit is contained in:
Jage9
2026-02-27 03:52:02 -05:00
parent aba319751b
commit 181ab22a80
3 changed files with 15 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
// Maintainer-controlled web client version.
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
window.CHGRID_WEB_VERSION = "2026.02.27 R287";
window.CHGRID_WEB_VERSION = "2026.02.27 R288";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -1588,7 +1588,7 @@ function handleAdminRolesList(message: Extract<IncomingMessage, { type: 'admin_r
adminRoleIndex = 0;
const first = adminRoles[0];
if (first) {
updateStatus(`Set ${adminSelectedUsername} role. ${first.name}.`);
updateStatus(first.name);
audio.sfxUiBlip();
} else {
updateStatus('No roles available.');
@@ -1629,6 +1629,9 @@ function handleAdminUsersList(message: Extract<IncomingMessage, { type: 'admin_u
/** Handles structured admin action result packets. */
function handleAdminActionResult(message: Extract<IncomingMessage, { type: 'admin_action_result' }>): void {
if (message.action === 'role_update_permissions') {
return;
}
updateStatus(message.message);
if (message.ok) {
audio.sfxUiConfirm();
@@ -2409,8 +2412,8 @@ function handleEffectSelectModeInput(code: string, key: string): void {
}
if (control.type === 'cancel') {
state.mode = 'normal';
updateStatus('Cancelled.');
state.mode = 'adminMenu';
updateStatus('Admin menu.');
audio.sfxUiCancel();
}
}
@@ -2872,7 +2875,7 @@ function handleAdminUserRoleSelectModeInput(code: string, key: string): void {
const control = handleListControlKey(code, key, adminRoles, adminRoleIndex, (entry) => entry.name);
if (control.type === 'move') {
adminRoleIndex = control.index;
updateStatus(`${adminSelectedUsername}: ${adminRoles[adminRoleIndex].name}.`);
updateStatus(adminRoles[adminRoleIndex].name);
audio.sfxUiBlip();
return;
}