Fix piano control status replay and remove duplicate beeps

This commit is contained in:
Jage9
2026-02-23 01:01:43 -05:00
parent d8b470d389
commit 4022a66163
2 changed files with 4 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.22 R207";
window.CHGRID_WEB_VERSION = "2026.02.22 R208";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -1916,7 +1916,9 @@ async function onSignalingMessage(message: IncomingMessage): Promise<void> {
message.type === 'item_action_result' &&
message.ok &&
message.action === 'use' &&
typeof message.itemId === 'string'
typeof message.itemId === 'string' &&
typeof message.message === 'string' &&
message.message.toLowerCase().includes('begin playing')
) {
const item = state.items.get(message.itemId);
if (item?.type === 'piano') {
@@ -2416,17 +2418,14 @@ function handlePianoUseModeInput(code: string): void {
}
if (code === 'KeyZ') {
signaling.send({ type: 'item_piano_recording', itemId, action: 'toggle_record' });
audio.sfxUiBlip();
return;
}
if (code === 'KeyX') {
signaling.send({ type: 'item_piano_recording', itemId, action: 'playback' });
audio.sfxUiBlip();
return;
}
if (code === 'KeyC') {
signaling.send({ type: 'item_piano_recording', itemId, action: 'stop_playback' });
audio.sfxUiBlip();
return;
}
if (code === 'Equal' || code === 'Minus') {