mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 17:40:46 -04:00
big overhaul for server and webui feature matching, things default to disabled and disappear from UI when disabled.
This commit is contained in:
@@ -11,8 +11,21 @@ import {
|
||||
normalizeBinaryPayload,
|
||||
normalizeKinectStatus,
|
||||
} from './utils.js';
|
||||
import { isFeatureEnabled } from '../../lib/features.js';
|
||||
|
||||
export default function KinectPanel() {
|
||||
const enabled = useSessionSelector((state) => isFeatureEnabled(state, 'kinect'));
|
||||
|
||||
/*
|
||||
Kinect is optional local hardware. Keep the feature gate inside the panel so
|
||||
disabled installs do not need special cases in every Activities layout.
|
||||
*/
|
||||
if (!enabled) return null;
|
||||
|
||||
return <KinectPanelContent />;
|
||||
}
|
||||
|
||||
function KinectPanelContent() {
|
||||
const socket = useSocket();
|
||||
const status = useSessionSelector((state) => normalizeKinectStatus(state.session?.kinect));
|
||||
const [activeView, setActiveView] = useState('3d');
|
||||
|
||||
Reference in New Issue
Block a user