From 397a5afef9ae0cebd5a9499b94368556b54998cc Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Mon, 9 Mar 2026 00:07:12 +0100 Subject: [PATCH] fix: capitalize technology labels in dashboard --- CHANGELOG.md | 1 + components/dashboard/TechSpecs.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c03a16f..1242fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Fixed - **Charts no longer show tomorrow's date.** The visitor chart on 7-day and 30-day views could display the next day with zero traffic, making it look like a sudden drop. The chart now ends on today. +- **Capitalized technology labels.** Device types, browsers, and OS names in the Technology panel now display with a capital first letter (e.g. "Desktop" instead of "desktop"). - **Login no longer gets stuck after updates.** If you happened to have Pulse open when a new version was deployed, logging back in could get stuck on a loading screen. The app now automatically refreshes itself to pick up the latest version. - **City and region data is now accurate.** Location data was incorrectly showing the CDN server's location (e.g. Paris, Villeurbanne) instead of the visitor's actual city. Fixed by reading the correct visitor IP header from Bunny CDN. - **"Reset Data" now clears everything.** Previously, resetting a site's data in Settings only removed pageviews and daily stats. Uptime check history, uptime daily stats, and cached dashboard data were left behind. All collected data is now properly cleared when you reset, while your site configuration, goals, funnels, and uptime monitors are kept. diff --git a/components/dashboard/TechSpecs.tsx b/components/dashboard/TechSpecs.tsx index 170cda6..d31c27e 100644 --- a/components/dashboard/TechSpecs.tsx +++ b/components/dashboard/TechSpecs.tsx @@ -25,6 +25,11 @@ interface TechSpecsProps { type Tab = 'browsers' | 'os' | 'devices' | 'screens' +function capitalize(s: string): string { + if (!s) return s + return s.charAt(0).toUpperCase() + s.slice(1) +} + const LIMIT = 7 const TAB_TO_DIMENSION: Record = { browsers: 'browser', os: 'os', devices: 'device' } @@ -162,7 +167,7 @@ export default function TechSpecs({ browsers, os, devices, screenResolutions, co >
{item.icon && {item.icon}} - {item.name} + {capitalize(item.name)}
@@ -222,7 +227,7 @@ export default function TechSpecs({ browsers, os, devices, screenResolutions, co
{item.icon && {item.icon}} - {item.name === 'Unknown' ? 'Unknown' : item.name} + {capitalize(item.name)}
{formatNumber(item.pageviews)}