diff --git a/www/src/views/devices/integration-view.jsx b/www/src/views/devices/integration-view.jsx index ce2a8e4..378ae25 100644 --- a/www/src/views/devices/integration-view.jsx +++ b/www/src/views/devices/integration-view.jsx @@ -4,6 +4,7 @@ import { createResource, createSignal, onCleanup, + Show, } from "solid-js"; import WebRTCService from "../../services/webrtc-service"; import Integration from "../../data/integration"; @@ -37,8 +38,15 @@ function IntegrationView(props) { initialValue: [], }); const [selectedRemote, setSelectedRemote] = createSignal(); + const [remoteControlVisible, setRemoteControlVisible] = createSignal(false); - createEffect(() => handleRemoteSelected(availableRemotes().shift()?.getId())); + createEffect(() => + handleRemoteSelected( + availableRemotes() + .find(() => true) + ?.getId() + ) + ); createEffect(() => { let url = UrlUtils.getUrl(); @@ -90,6 +98,10 @@ function IntegrationView(props) { RemoteService.sendCommand(command); } + function toggleRemoteControl() { + setRemoteControlVisible(!remoteControlVisible()); + } + return (