From a33bbb34485ec8b41ae3e9984a876f5194575b5e Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sun, 31 May 2026 09:34:25 +0200 Subject: [PATCH] feat(radio): make the radio widget toggleable from ui-config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the radio on/off switch out of renderer-config (where it sat next to asset/data URLs) into ui-config, alongside the other UI feature toggles (game.center.enabled, guides.enabled, …) — the natural home for a widget switch — and rename it to the dotted convention `radio_ui.enabled`. The MainView gate now defaults to `false`, so the radio is opt-in: an absent key keeps it hidden; set `"radio_ui.enabled": true` in ui-config to show it. The radio.url data source stays in renderer-config. --- public/configuration/renderer-config.example | 1 - public/configuration/ui-config.example | 1 + src/components/MainView.tsx | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/configuration/renderer-config.example b/public/configuration/renderer-config.example index 8438c97..28356ff 100644 --- a/public/configuration/renderer-config.example +++ b/public/configuration/renderer-config.example @@ -32,7 +32,6 @@ "badge.asset.url": "${image.library.url}album1584/%badgename%.gif", "radio.url": "${gamedata.url}/radio-stations.json5?t=%timestamp%", "soundboard.url": "${gamedata.url}/soundboard-sounds.json5?t=%timestamp%", - "radio_ui": false, "furni.rotation.bounce.steps": 20, "furni.rotation.bounce.height": 0.0625, "enable.avatar.arrow": false, diff --git a/public/configuration/ui-config.example b/public/configuration/ui-config.example index 796ac12..65eff4c 100644 --- a/public/configuration/ui-config.example +++ b/public/configuration/ui-config.example @@ -24,6 +24,7 @@ "wired.action.kick.from.room.max.length": 100, "wired.action.mute.user.max.length": 100, "game.center.enabled": false, + "radio_ui.enabled": false, "guides.enabled": true, "housekeeping.enabled": true, "toolbar.hide.quests": true, diff --git a/src/components/MainView.tsx b/src/components/MainView.tsx index e155f05..6fdbeab 100644 --- a/src/components/MainView.tsx +++ b/src/components/MainView.tsx @@ -184,7 +184,7 @@ export const MainView: FC<{}> = props => - { GetConfigurationValue('radio_ui', true) && } + { GetConfigurationValue('radio_ui.enabled', false) && } );