feat: recipe version selector

- fix recipe not show on overview
- fix recipe show late after select country
- disable queue message on no connection ws
- fix infinite topping(s) list if moving between pages

Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
pakintada@gmail.com 2026-05-04 16:50:15 +07:00
parent e25881d016
commit a29ff0be1a
19 changed files with 314 additions and 108 deletions

View file

@ -1,5 +1,6 @@
import { updateMachineStatus } from '../stores/machineInfoStore';
import { addNotification } from '../stores/noti';
import { handleIncomingMessages } from './messageHandler';
type AdbPayload = { type: string; payload: any };
@ -17,6 +18,26 @@ async function handleAdbPayload(raw_payload: string) {
case 'response':
if (payload.payload instanceof String) {
// single message response
let raw_payload = payload.payload.toString();
if (raw_payload.startsWith('save_recipe_machine')) {
let res = raw_payload.split('/');
let pd = res[1] ?? '';
let action = res[2] ?? '';
let uiAction = res[3] ?? '';
handleIncomingMessages(
JSON.stringify({
type: 'ui_action',
payload: {
action: uiAction,
from: 'brew',
ref: `${pd}.${action}`
}
})
);
}
}
break;
case 'ACK':