Skip to content

Commit 851ce07

Browse files
author
root
committed
UI refinements: blue shades for charts, fixed KPI cards, and added STYLE.md
1 parent b7bbbb5 commit 851ce07

File tree

2 files changed

+52
-5
lines changed

2 files changed

+52
-5
lines changed

STYLE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Style Guide - VibeNVR Telemetry
2+
3+
This document outlines the visual standards and design patterns used in the VibeNVR Telemetry Dashboard.
4+
5+
## 🎨 Color System
6+
7+
### Primary Palette (Blue)
8+
The dashboard uses a blue-centric color system to represent data and branding.
9+
- **Primary Blue (`--primary`)**: `#3b82f6` (Light) / `#58a6ff` (Dark)
10+
- **Primary Light**: Background for active elements and hover states.
11+
- **Primary Dark**: Hover states for buttons.
12+
13+
### Chart Colors
14+
Bar charts use a progressive blue scale to indicate volume/variety:
15+
- `[#1d4ed8, #2563eb, #3b82f6, #60a5fa, #93c5fd, #bfdbfe, #dbeafe]`
16+
- Colors are assigned automatically by Chart.js based on the dataset order.
17+
18+
### Accent & Status
19+
- **Success (`--success`)**: `#10b981` (Used for the "Live" badge).
20+
- **Accent (`--accent`)**: `#8b5cf6` (Purple, used in pie/doughnut charts for secondary metrics).
21+
22+
## 🧱 Component Standards
23+
24+
### KPI Cards
25+
- **Values**: Should use the default text color (`var(--text)`) or primary blue for emphasis. Avoid using purple/accent for primary metrics unless specifically justified.
26+
- **Borders**: All cards use `var(--border)`. Subtle borders are used for structure, and a highlight border (`var(--primary)`) is applied only on `:hover`.
27+
- **Icons**: SVG icons are used with a `stroke` of `var(--primary)` and a subtle `drop-shadow`.
28+
29+
### Typography
30+
- **Font Family**: 'Inter', sans-serif.
31+
- **Headings**: Semi-bold to Bold (600-800) with slight negative letter-spacing for a premium feel.
32+
33+
## 🌗 Dark Mode
34+
- **Background**: `#0d1117`
35+
- **Surface**: `#161b22`
36+
- **Border**: `#21262d`
37+
- **Text**: `#e6edf3`
38+
39+
The theme toggle switches the `.dark` class on the `<html>` element, which updates these CSS variables.

src/index.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ export default {
590590
<div class="kpi-grid">
591591
<div class="kpi-card">
592592
<div class="kpi-label"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg> Active Installs</div>
593-
<div class="kpi-value accent" id="kpi-active">-</div>
593+
<div class="kpi-value" id="kpi-active">-</div>
594594
<div class="kpi-sub">Last 7 days</div>
595595
</div>
596596
<div class="kpi-card">
@@ -618,9 +618,9 @@ export default {
618618
<div class="kpi-value" id="kpi-gpu">-</div>
619619
<div class="kpi-sub">HW accel enabled</div>
620620
</div>
621-
<div class="kpi-card" style="border-color: var(--primary);">
621+
<div class="kpi-card">
622622
<div class="kpi-label"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></svg> Notifications</div>
623-
<div class="kpi-value accent" id="kpi-notifications">-</div>
623+
<div class="kpi-value" id="kpi-notifications">-</div>
624624
<div class="kpi-sub">With webhooks / email</div>
625625
</div>
626626
</div>
@@ -735,7 +735,15 @@ export default {
735735
}
736736
737737
const PIE_PALETTE = () => [tok('primary'), tok('accent'), '#10b981', '#f59e0b', '#ef4444', '#06b6d4', '#84cc16'];
738-
const BAR_PALETTE = () => tok('primary');
738+
const BAR_PALETTE = () => [
739+
'#1d4ed8', // Blue 700
740+
'#2563eb', // Blue 600
741+
'#3b82f6', // Blue 500
742+
'#60a5fa', // Blue 400
743+
'#93c5fd', // Blue 300
744+
'#bfdbfe', // Blue 200
745+
'#dbeafe' // Blue 100
746+
];
739747
740748
function prepData(list, lk='name', vk='count', limit=8) {
741749
list = [...(list||[])].sort((a,b) => b[vk]-a[vk]);
@@ -846,7 +854,7 @@ export default {
846854
mkChart('chart-groups-dist', 'bar', { labels: gdistRaw.map(x=>x.name+' grp'), data: gdistRaw.map(x=>x.count) }, BAR_PALETTE());
847855
mkChart('chart-versions', 'bar', prepData(lastData.versions), BAR_PALETTE());
848856
mkChart('chart-ram', 'bar', prepData(lastData.ram,'name','count',8), BAR_PALETTE());
849-
mkChart('chart-cpu-models', 'bar', prepData(lastData.cpu_models,'name','count',12), pp, true);
857+
mkChart('chart-cpu-models', 'bar', prepData(lastData.cpu_models,'name','count',12), BAR_PALETTE(), true);
850858
mkChart('chart-cpu-cores', 'bar', prepData(lastData.cpu_cores,'name','count',10), BAR_PALETTE(), true);
851859
}
852860

0 commit comments

Comments
 (0)