Fix piano control status replay and remove duplicate beeps
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.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";
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user