diff --git a/docs/frontend-tricks.md b/docs/frontend-tricks.md index d96dc266..e6e38740 100644 --- a/docs/frontend-tricks.md +++ b/docs/frontend-tricks.md @@ -16,3 +16,13 @@ You can pass forces visual config using the forceVisualConfig Examples: - `http://host/overelay?forceVisualConfig=` + + +## onlyWidgets +You can pass onlyWidgets query params to show only the widgets that are passed in the query params by their id. + +Examples: +- `http://host/overlay?onlyWidgets=queue` + show only queue +- `http://host/overlay?onlyWidgets=teamview.BOTTOM_RIGHT,teamview.BOTTOM_LEFT` + show only bottom teamviews \ No newline at end of file diff --git a/src/frontend/overlay/src/components/layouts/MainLayout.tsx b/src/frontend/overlay/src/components/layouts/MainLayout.tsx index 58cb0e47..fba58a18 100644 --- a/src/frontend/overlay/src/components/layouts/MainLayout.tsx +++ b/src/frontend/overlay/src/components/layouts/MainLayout.tsx @@ -126,6 +126,9 @@ export const MainLayout = () => { if (params.get("scene") && obj.type !== "TeamLocatorWidget") { return null; } + if (params.get("onlyWidgets") && !params.get("onlyWidgets").split(",").includes(obj.widgetId)) { + return null; + } return {state => state !== "exited" &&