frontend: passing parent_path via socketio

This commit is contained in:
Mose Müller 2023-08-02 12:06:20 +02:00
parent 7248192e83
commit 6c89059792
4 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,7 @@ export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
socket.emit('frontend_update', { socket.emit('frontend_update', {
name: method_name, name: method_name,
parent_path: parent_path,
value: { args: args } value: { args: args }
}); });
}; };

View File

@ -23,6 +23,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
const handleValueChange = (newValue: string) => { const handleValueChange = (newValue: string) => {
socket.emit('frontend_update', { socket.emit('frontend_update', {
name: name, name: name,
parent_path: parent_path,
value: { value: newValue } value: { value: newValue }
}); });
}; };

View File

@ -31,6 +31,7 @@ export const MethodComponent = React.memo((props: MethodProps) => {
'frontend_update', 'frontend_update',
{ {
name: name, name: name,
parent_path: parent_path,
value: { args: args } value: { args: args }
}, },
(ack) => { (ack) => {

View File

@ -33,6 +33,7 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
) => { ) => {
socket.emit('frontend_update', { socket.emit('frontend_update', {
name: name, name: name,
parent_path: parent_path,
value: { value: newNumber, min: min, max: max, step_size: stepSize } value: { value: newNumber, min: min, max: max, step_size: stepSize }
}); });
}; };