From cb175a77bf414034b2cb91b49c662a258adb8876 Mon Sep 17 00:00:00 2001 From: DerEchteAlec Date: Thu, 6 Aug 2026 21:40:33 +0200 Subject: [PATCH] ENH - integrate phone-owned radio HUD --- README.md | 2 +- frontend/src/App.vue | 2 + frontend/src/components/RadioHud.vue | 324 +++++++++++++++++++++++++++ frontend/src/stores/phone.ts | 2 +- frontend/src/types/radio.ts | 18 ++ frontend/src/views/apps/RadioApp.vue | 8 +- sky_phone/config/config.lua | 10 +- sky_phone/config/locales/en.lua | 2 +- sky_phone/source/client/main.lua | 1 + sky_phone/source/client/radio.lua | 124 +++++++++- sky_phone/source/html/index.html | 4 +- sky_phone/source/server/radio.lua | 35 +-- 12 files changed, 489 insertions(+), 43 deletions(-) create mode 100644 frontend/src/components/RadioHud.vue diff --git a/README.md b/README.md index b87a179..bc2bd27 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Framework, inventory, callback, notification, and database integrations live und The built-in Radio app supports a primary frequency, volume, recent channels, participant lists, automatic rejoin, join/leave notifications, and an optional service number. YACA and SaltyChat support the configured secondary frequency; PMA Voice exposes one radio channel, so the secondary input is hidden automatically. -Configure frequency bounds and precision, restricted channel ranges and allowed jobs, history length, defaults, badge validation, radio display-name permissions, and the optional HUD integration under `Config.Radio`. `Config.Radio.DisplayName.AllowedJobs` maps authoritative framework job names to their minimum grade. Unlisted jobs cannot change the name; an empty name restores the normal player or character name. Channel and display-name access are always checked server-side. Setting `Config.Radio.Hud.Enabled = false` disables external HUD notifications while the phone-owned `GetPlayerBadge` and `GetPlayerRadioDisplayName` server exports remain available. +Configure frequency bounds and precision, restricted channel ranges and allowed jobs, history length, defaults, badge validation, radio display-name permissions, and the built-in speaker HUD under `Config.Radio`. `Config.Radio.DisplayName.AllowedJobs` maps authoritative framework job names to their minimum grade. Unlisted jobs cannot change the name; an empty name restores the normal player or character name. Channel and display-name access are always checked server-side. `Config.Radio.Hud` controls the phone-owned overlay, its screen edge, offsets, and recent-speaker duration without depending on another HUD resource. Active-speaker highlighting uses the YACA radio events; the Radio app itself continues to support every configured voice provider. Radio profiles are stored in `sky_phone_radio_profiles`. Runtime migration creates the table automatically; fresh installations receive it through `sky_phone/sql/install.sql`. diff --git a/frontend/src/App.vue b/frontend/src/App.vue index f6e415c..78c48ec 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -16,6 +16,7 @@ import PhoneLockScreen from '@/components/PhoneLockScreen.vue' import PhoneNotifications from '@/components/PhoneNotifications.vue' import NotificationPhonePreview from '@/components/NotificationPhonePreview.vue' import PhoneStatusBar from '@/components/PhoneStatusBar.vue' +import RadioHud from '@/components/RadioHud.vue' import SimPhonePicker, { type SimPhoneChoice, } from '@/components/SimPhonePicker.vue' @@ -417,6 +418,7 @@ onBeforeUnmount(() => {