Protect user role from deletion and use action sound asset
This commit is contained in:
@@ -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 R294";
|
||||
window.CHGRID_WEB_VERSION = "2026.02.27 R295";
|
||||
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||
|
||||
@@ -238,7 +238,7 @@ const SYSTEM_SOUND_URLS = {
|
||||
logout: withBase('sounds/logout.ogg'),
|
||||
notify: withBase('sounds/notify.ogg'),
|
||||
} as const;
|
||||
const ACTION_SOUND_URL = SYSTEM_SOUND_URLS.notify;
|
||||
const ACTION_SOUND_URL = withBase('sounds/action.ogg');
|
||||
const FOOTSTEP_SOUND_URLS = Array.from({ length: 11 }, (_, index) => withBase(`sounds/step-${index + 1}.ogg`));
|
||||
const FOOTSTEP_GAIN = 0.7;
|
||||
const TELEPORT_START_SOUND_URL = withBase('sounds/teleport_start.ogg');
|
||||
@@ -2803,8 +2803,8 @@ function handleAdminRolePermissionListModeInput(code: string, key: string): void
|
||||
if (control.type === 'select') {
|
||||
const value = entries[adminRolePermissionIndex];
|
||||
if (value === '__delete_role__') {
|
||||
if (role.name === 'admin') {
|
||||
updateStatus('Admin role cannot be deleted.');
|
||||
if (role.name === 'admin' || role.name === 'user') {
|
||||
updateStatus('Admin and user roles cannot be deleted.');
|
||||
audio.sfxUiCancel();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user