Suppress redundant set-role success announcement

This commit is contained in:
Jage9
2026-02-27 04:16:37 -05:00
parent 84db109e63
commit c450806aed
2 changed files with 6 additions and 2 deletions

View File

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

View File

@@ -1640,7 +1640,11 @@ function handleAdminActionResult(message: Extract<IncomingMessage, { type: 'admi
if (message.action === 'role_update_permissions') { if (message.action === 'role_update_permissions') {
return; return;
} }
updateStatus(message.message); const suppressStatusMessage =
message.ok && message.action === 'user_set_role' && adminPendingUserMutation?.action === 'set_role';
if (!suppressStatusMessage) {
updateStatus(message.message);
}
if (!message.ok) { if (!message.ok) {
adminPendingUserMutation = null; adminPendingUserMutation = null;
audio.sfxUiCancel(); audio.sfxUiCancel();