From 11ed3a4eda930b9b9d77bb04db61ab59e75ac463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 31 Aug 2026 20:32:41 +0000 Subject: [PATCH 1/6] core: frontend: store: system-information: Add cpu_temperature getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- core/frontend/src/store/system-information.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/frontend/src/store/system-information.ts b/core/frontend/src/store/system-information.ts index 423ad22e5a..cc9feb1f98 100644 --- a/core/frontend/src/store/system-information.ts +++ b/core/frontend/src/store/system-information.ts @@ -101,6 +101,13 @@ class SystemInformationStore extends VuexModule { // Stable interface name list for App tray widgets — updated only when the set of names changes. network_interface_names: string[] = [] + get cpu_temperature(): number | undefined { + return this.system?.temperature?.find((sensor) => { + const name = sensor.name.toLowerCase() + return name.includes('cpu') || name.includes('soc') || name.includes('ccd') + })?.temperature + } + fetchPlatformTask = new OneMoreTime( { delay: 5000, autostart: false }, ) From 06c2f219414c146d203f92429611d790c3e0844d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 31 Aug 2026 20:32:41 +0000 Subject: [PATCH 2/6] core: frontend: widgets: Cpu: Use cpu_temperature getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- core/frontend/src/widgets/Cpu.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/frontend/src/widgets/Cpu.vue b/core/frontend/src/widgets/Cpu.vue index c657e0fb7b..bf584b10dd 100644 --- a/core/frontend/src/widgets/Cpu.vue +++ b/core/frontend/src/widgets/Cpu.vue @@ -65,13 +65,8 @@ export default Vue.extend({ return cpus.map((cpu) => cpu.frequency) }, cpu_temperature(): string { - const temperature_sensors = system_information.system?.temperature - const main_sensor = temperature_sensors?.find( - (sensor) => sensor.name.toLowerCase().includes('cpu') - || sensor.name.toLowerCase().includes('soc') - || sensor.name.toLowerCase().includes('ccd'), - ) - return main_sensor ? main_sensor.temperature.toFixed(1) : 'Loading..' + const temperature = system_information.cpu_temperature + return temperature === undefined ? 'Loading..' : temperature.toFixed(1) }, clockDisplay(): { single: string | null; max?: string | null; min?: string | null } { if (this.cpu_clock.length === 0) { From 770a502879ec65222c4940a1a72adb63b7a944b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 31 Aug 2026 20:32:41 +0000 Subject: [PATCH 3/6] core: frontend: health: HealthTrayMenu: Use cpu_temperature getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- core/frontend/src/components/health/HealthTrayMenu.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/frontend/src/components/health/HealthTrayMenu.vue b/core/frontend/src/components/health/HealthTrayMenu.vue index acb4a7a301..697cb4e9ef 100644 --- a/core/frontend/src/components/health/HealthTrayMenu.vue +++ b/core/frontend/src/components/health/HealthTrayMenu.vue @@ -163,11 +163,8 @@ export default Vue.extend({ }, computed: { cpu_temperature(): string { - const temperature_sensors = system_information.system?.temperature - const main_sensor = temperature_sensors?.find( - (sensor) => sensor.name.toLowerCase().includes('cpu') || sensor.name.toLowerCase().includes('soc'), - ) - return main_sensor ? main_sensor.temperature.toFixed(1) : 'Loading..' + const temperature = system_information.cpu_temperature + return temperature === undefined ? 'Loading..' : temperature.toFixed(1) }, cpu_throttled() : boolean { const events = system_information.platform?.raspberry?.events From 6787f1c8976f5abba7ff018777834fa22504e543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 31 Aug 2026 20:32:41 +0000 Subject: [PATCH 4/6] core: frontend: system-information: SystemCondition: Use cpu_temperature getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../src/components/system-information/SystemCondition.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/frontend/src/components/system-information/SystemCondition.vue b/core/frontend/src/components/system-information/SystemCondition.vue index d2281d7a2a..922527373e 100644 --- a/core/frontend/src/components/system-information/SystemCondition.vue +++ b/core/frontend/src/components/system-information/SystemCondition.vue @@ -110,11 +110,7 @@ export default Vue.extend({ }, temperature(): Record { const temperature_sensors = system_information.system?.temperature - const main_sensor = temperature_sensors?.find(( - sensor, - ) => sensor.name.toLowerCase().includes('cpu') || sensor.name.toLowerCase().includes('soc')) - const main_temperature = main_sensor?.temperature.toFixed(1) ?? 'Loading..' - console.log(`main_temperature: ${main_temperature}`) + const main_temperature = system_information.cpu_temperature?.toFixed(1) ?? 'Loading..' const temperature_text = temperature_sensors?.map( (sensor) => { const critical_temp = sensor.critical_temperature || 0 From 9f99235cdfdfe83f7f23c132b7dcb85d1d8129c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 31 Aug 2026 20:32:41 +0000 Subject: [PATCH 5/6] core: frontend: widgets: Add battery widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- core/frontend/src/widgets/Battery.vue | 84 +++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 core/frontend/src/widgets/Battery.vue diff --git a/core/frontend/src/widgets/Battery.vue b/core/frontend/src/widgets/Battery.vue new file mode 100644 index 0000000000..df41bc8f10 --- /dev/null +++ b/core/frontend/src/widgets/Battery.vue @@ -0,0 +1,84 @@ + + + + + From 8c01c181418f6fdcd583ba9c840e6bfc3c4f0aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 31 Aug 2026 20:32:41 +0000 Subject: [PATCH 6/6] core: frontend: App: Add battery widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- core/frontend/src/App.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/frontend/src/App.vue b/core/frontend/src/App.vue index 7d22cf239c..134bfcfe55 100644 --- a/core/frontend/src/App.vue +++ b/core/frontend/src/App.vue @@ -423,6 +423,7 @@ import menus, { menuItem } from './menus' import autopilot_data from './store/autopilot' import system_information from './store/system-information' import { TopBarWidget } from './types/common' +import Battery from './widgets/Battery.vue' import Cpu from './widgets/Cpu.vue' import Disk from './widgets/Disk.vue' import Networking from './widgets/Networking.vue' @@ -472,6 +473,11 @@ export default Vue.extend({ computed: { widgets(): TopBarWidget[] { const widgets = [ + { + component: Battery, + name: 'Battery', + props: {}, + }, { component: Cpu, name: 'CPU',