Extend title-first announcements across list menus
This commit is contained in:
@@ -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.03.01 R326";
|
window.CHGRID_WEB_VERSION = "2026.03.01 R327";
|
||||||
// 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";
|
||||||
|
|||||||
@@ -1054,8 +1054,7 @@ function beginItemSelection(
|
|||||||
state.selectionContext = context;
|
state.selectionContext = context;
|
||||||
state.selectedItemIds = items.map((item) => item.id);
|
state.selectedItemIds = items.map((item) => item.id);
|
||||||
state.selectedItemIndex = 0;
|
state.selectedItemIndex = 0;
|
||||||
updateStatus(`Select item: ${itemLabel(items[0])}.`);
|
announceMenuEntry('Select item', itemLabel(items[0]));
|
||||||
audio.sfxUiBlip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns whether the local user can delete the provided item. */
|
/** Returns whether the local user can delete the provided item. */
|
||||||
@@ -1760,8 +1759,7 @@ function handleAdminRolesList(message: Extract<IncomingMessage, { type: 'admin_r
|
|||||||
adminRoleIndex = currentRoleIndex >= 0 ? currentRoleIndex : 0;
|
adminRoleIndex = currentRoleIndex >= 0 ? currentRoleIndex : 0;
|
||||||
const first = adminRoles[0];
|
const first = adminRoles[0];
|
||||||
if (first && adminRoles[adminRoleIndex]) {
|
if (first && adminRoles[adminRoleIndex]) {
|
||||||
updateStatus(adminRoles[adminRoleIndex].name);
|
announceMenuEntry('Roles', adminRoles[adminRoleIndex].name);
|
||||||
audio.sfxUiBlip();
|
|
||||||
} else {
|
} else {
|
||||||
updateStatus('No roles available.');
|
updateStatus('No roles available.');
|
||||||
audio.sfxUiCancel();
|
audio.sfxUiCancel();
|
||||||
@@ -1775,11 +1773,11 @@ function handleAdminRolesList(message: Extract<IncomingMessage, { type: 'admin_r
|
|||||||
adminRoleIndex = 0;
|
adminRoleIndex = 0;
|
||||||
const first = adminRoles[0];
|
const first = adminRoles[0];
|
||||||
if (first) {
|
if (first) {
|
||||||
updateStatus(`${first.name}, ${first.userCount}.`);
|
announceMenuEntry('Roles', `${first.name}, ${first.userCount}`);
|
||||||
} else {
|
} else {
|
||||||
updateStatus('No roles found.');
|
updateStatus('No roles found.');
|
||||||
|
audio.sfxUiCancel();
|
||||||
}
|
}
|
||||||
audio.sfxUiBlip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handles server user-list response for admin menu flows. */
|
/** Handles server user-list response for admin menu flows. */
|
||||||
@@ -1795,8 +1793,7 @@ function handleAdminUsersList(message: Extract<IncomingMessage, { type: 'admin_u
|
|||||||
state.mode = 'adminUserList';
|
state.mode = 'adminUserList';
|
||||||
adminUserIndex = 0;
|
adminUserIndex = 0;
|
||||||
const first = adminUsers[0];
|
const first = adminUsers[0];
|
||||||
updateStatus(`${first.username}, ${first.role}, ${first.status}.`);
|
announceMenuEntry('Users', `${first.username}, ${first.role}, ${first.status}`);
|
||||||
audio.sfxUiBlip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handles server transfer-target list response for item-management transfer flow. */
|
/** Handles server transfer-target list response for item-management transfer flow. */
|
||||||
@@ -1813,8 +1810,7 @@ function handleItemTransferTargets(message: Extract<IncomingMessage, { type: 'it
|
|||||||
}
|
}
|
||||||
itemManagementTargetUserIndex = 0;
|
itemManagementTargetUserIndex = 0;
|
||||||
state.mode = 'itemManageTransferUser';
|
state.mode = 'itemManageTransferUser';
|
||||||
updateStatus(transferTargetLabel(itemManagementTransferTargets[0]));
|
announceMenuEntry('Users', transferTargetLabel(itemManagementTransferTargets[0]));
|
||||||
audio.sfxUiBlip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handles structured admin action result packets. */
|
/** Handles structured admin action result packets. */
|
||||||
@@ -2346,11 +2342,13 @@ function handleNormalModeInput(code: string, shiftKey: boolean): void {
|
|||||||
if (first) {
|
if (first) {
|
||||||
const itemCount = state.sortedItemIds.length;
|
const itemCount = state.sortedItemIds.length;
|
||||||
const itemLabelText = itemCount === 1 ? 'item' : 'items';
|
const itemLabelText = itemCount === 1 ? 'item' : 'items';
|
||||||
updateStatus(
|
announceMenuEntry(
|
||||||
`${itemCount} ${itemLabelText}. ${itemLabel(first)}, ${distanceDirectionPhrase(state.player.x, state.player.y, first.x, first.y)}, ${first.x}, ${first.y}`,
|
`${itemCount} ${itemLabelText}`,
|
||||||
|
`${itemLabel(first)}, ${distanceDirectionPhrase(state.player.x, state.player.y, first.x, first.y)}, ${first.x}, ${first.y}`,
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
audio.sfxUiCancel();
|
||||||
}
|
}
|
||||||
audio.sfxUiBlip();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -2463,11 +2461,13 @@ function handleNormalModeInput(code: string, shiftKey: boolean): void {
|
|||||||
const userCount = state.sortedPeerIds.length;
|
const userCount = state.sortedPeerIds.length;
|
||||||
const userLabelText = userCount === 1 ? 'user' : 'users';
|
const userLabelText = userCount === 1 ? 'user' : 'users';
|
||||||
const gainPhrase = `volume ${formatSteppedNumber(getPeerListenGainForNickname(first.nickname), MIC_INPUT_GAIN_STEP)}`;
|
const gainPhrase = `volume ${formatSteppedNumber(getPeerListenGainForNickname(first.nickname), MIC_INPUT_GAIN_STEP)}`;
|
||||||
updateStatus(
|
announceMenuEntry(
|
||||||
`${userCount} ${userLabelText}. ${first.nickname}, ${gainPhrase}, ${distanceDirectionPhrase(state.player.x, state.player.y, first.x, first.y)}, ${first.x}, ${first.y}`,
|
`${userCount} ${userLabelText}`,
|
||||||
|
`${first.nickname}, ${gainPhrase}, ${distanceDirectionPhrase(state.player.x, state.player.y, first.x, first.y)}, ${first.x}, ${first.y}`,
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
audio.sfxUiCancel();
|
||||||
}
|
}
|
||||||
audio.sfxUiBlip();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user