Add stats strip with tracking features to ADS-B dashboard

- Add slim statistics bar with live stats (aircraft count, max range,
  highest altitude, fastest speed, closest aircraft, countries, ACARS)
- Add session timer and report generation with JSON export
- Add signal quality indicator with visual dots
- Add squawk code reference modal
- Add flight lookup button (FlightAware integration)
- Add aircraft type icons (jet, helicopter, prop, military, glider)
- Move status indicator and UTC time from header to stats strip
- Reorganize controls bar into logical groups
- Add ICAO country allocation data for nationality detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-15 15:15:41 +00:00
parent 0b22d0aa1f
commit 71e5803695
2 changed files with 1432 additions and 161 deletions

View File

@@ -136,12 +136,6 @@ body {
font-size: 11px;
}
.status-item {
display: flex;
align-items: center;
gap: 6px;
}
.status-dot {
width: 8px;
height: 8px;
@@ -168,37 +162,6 @@ body {
}
}
/* Stats badges in header */
.stats-badges {
display: flex;
gap: 12px;
}
.stat-badge {
background: rgba(74, 158, 255, 0.1);
border: 1px solid rgba(74, 158, 255, 0.3);
border-radius: 4px;
padding: 4px 10px;
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
}
.stat-badge .value {
color: var(--accent-cyan);
font-weight: 600;
}
.stat-badge .label {
color: var(--text-secondary);
margin-left: 4px;
}
.datetime {
font-family: 'Orbitron', monospace;
font-size: 12px;
color: var(--accent-cyan);
}
.back-link {
color: var(--accent-cyan);
text-decoration: none;
@@ -737,43 +700,110 @@ body {
}
.control-group {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
padding: 6px 10px;
background: rgba(74, 158, 255, 0.03);
border: 1px solid rgba(74, 158, 255, 0.1);
border-radius: 6px;
}
.control-group-label {
font-size: 8px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--accent-cyan);
opacity: 0.7;
}
.control-group-items {
display: flex;
align-items: center;
gap: 8px;
gap: 6px;
flex-wrap: wrap;
}
.control-group label {
display: flex;
align-items: center;
gap: 6px;
gap: 4px;
cursor: pointer;
font-size: 11px;
font-size: 10px;
color: var(--text-primary);
white-space: nowrap;
}
.control-group input[type="checkbox"] {
accent-color: var(--accent-cyan);
width: 12px;
height: 12px;
}
.control-group select {
padding: 6px 10px;
padding: 4px 8px;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(74, 158, 255, 0.3);
border-radius: 4px;
color: var(--accent-cyan);
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
font-size: 10px;
}
.control-group input[type="text"] {
width: 80px;
padding: 6px 8px;
.control-group input[type="text"],
.control-group input[type="number"] {
padding: 4px 6px;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(74, 158, 255, 0.3);
border-radius: 4px;
color: var(--accent-cyan);
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
font-size: 10px;
}
.control-group.tracking-group {
background: rgba(34, 197, 94, 0.05);
border-color: rgba(34, 197, 94, 0.2);
}
.control-group.tracking-group .control-group-label {
color: var(--accent-green);
}
.control-group.airband-group {
background: rgba(245, 158, 11, 0.05);
border-color: rgba(245, 158, 11, 0.2);
}
.control-group.airband-group .control-group-label {
color: var(--accent-orange);
}
.airband-sliders {
display: flex;
align-items: center;
gap: 4px;
font-size: 8px;
color: var(--text-dim);
}
.airband-sliders input[type="range"] {
width: 40px;
height: 4px;
-webkit-appearance: none;
background: rgba(74, 158, 255, 0.2);
border-radius: 2px;
}
.airband-sliders input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 10px;
height: 10px;
background: var(--accent-cyan);
border-radius: 50%;
cursor: pointer;
}
.control-label {
@@ -785,19 +815,18 @@ body {
/* Start/stop button */
.start-btn {
padding: 8px 20px;
padding: 6px 16px;
border: none;
background: var(--accent-green);
color: #fff;
font-family: 'Orbitron', monospace;
font-size: 11px;
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 2px;
letter-spacing: 1px;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
margin-left: auto;
}
.start-btn:hover {
@@ -1155,8 +1184,8 @@ body {
gap: 6px;
}
/* DateTime smaller */
.datetime {
/* Strip time smaller on mobile */
.strip-time {
font-size: 10px;
}
@@ -1233,3 +1262,599 @@ body {
line-height: 44px !important;
font-size: 18px !important;
}
/* ============================================
STATISTICS STRIP
============================================ */
.stats-strip {
background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-dark) 100%);
border-bottom: 1px solid var(--border-color);
padding: 6px 12px;
position: relative;
z-index: 9;
overflow-x: auto;
}
.stats-strip-inner {
display: flex;
align-items: center;
gap: 4px;
min-width: max-content;
}
.strip-stat {
display: flex;
flex-direction: column;
align-items: center;
padding: 4px 10px;
background: rgba(74, 158, 255, 0.05);
border: 1px solid rgba(74, 158, 255, 0.15);
border-radius: 4px;
min-width: 55px;
}
.strip-stat:hover {
background: rgba(74, 158, 255, 0.1);
border-color: rgba(74, 158, 255, 0.3);
}
.strip-value {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
font-weight: 600;
color: var(--accent-cyan);
line-height: 1.2;
}
.strip-label {
font-size: 8px;
font-weight: 600;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-top: 1px;
}
.strip-stat.session-stat {
background: rgba(34, 197, 94, 0.05);
border-color: rgba(34, 197, 94, 0.2);
}
.strip-stat.session-stat .strip-value {
color: var(--accent-green);
}
.strip-report-btn {
background: linear-gradient(135deg, var(--accent-cyan) 0%, #2563eb 100%);
border: none;
color: white;
padding: 8px 12px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
cursor: pointer;
margin-left: auto;
white-space: nowrap;
transition: all 0.2s;
}
.strip-report-btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}
/* ============================================
REPORT MODAL
============================================ */
.report-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
padding: 20px;
}
.report-content {
background: var(--bg-panel);
border: 1px solid var(--border-color);
border-radius: 12px;
width: 100%;
max-width: 600px;
max-height: 85vh;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.report-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
background: var(--bg-card);
border-bottom: 1px solid var(--border-color);
}
.report-header h2 {
font-size: 16px;
font-weight: 600;
color: var(--accent-cyan);
}
.report-close {
background: none;
border: none;
color: var(--text-secondary);
font-size: 24px;
cursor: pointer;
padding: 0 8px;
line-height: 1;
}
.report-close:hover {
color: var(--text-primary);
}
.report-body {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
}
.report-section {
margin-bottom: 20px;
}
.report-section h3 {
font-size: 12px;
font-weight: 600;
color: var(--accent-cyan);
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid var(--border-color);
}
.report-grid {
display: grid;
grid-template-columns: auto 1fr;
gap: 6px 16px;
font-size: 12px;
}
.report-grid span:nth-child(odd) {
color: var(--text-secondary);
}
.report-grid span:nth-child(even) {
color: var(--text-primary);
font-family: 'JetBrains Mono', monospace;
}
.report-highlights {
display: flex;
flex-direction: column;
gap: 6px;
}
.highlight-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 10px;
background: var(--bg-card);
border-radius: 4px;
font-size: 11px;
}
.highlight-item.military {
border-left: 3px solid #556b2f;
}
.highlight-item.emergency {
border-left: 3px solid var(--accent-red);
}
.highlight-type {
font-size: 9px;
font-weight: 700;
padding: 2px 6px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.1);
}
.highlight-item.military .highlight-type {
background: rgba(85, 107, 47, 0.3);
color: #8fbc8f;
}
.highlight-item.emergency .highlight-type {
background: rgba(239, 68, 68, 0.3);
color: #f87171;
}
.highlight-detail {
color: var(--text-primary);
}
.highlight-more {
font-size: 10px;
color: var(--text-dim);
text-align: center;
padding: 4px;
}
.report-table-wrap {
overflow-x: auto;
max-height: 200px;
overflow-y: auto;
}
.report-table {
width: 100%;
border-collapse: collapse;
font-size: 11px;
}
.report-table th {
background: var(--bg-card);
color: var(--text-secondary);
font-weight: 600;
text-align: left;
padding: 8px 10px;
position: sticky;
top: 0;
}
.report-table td {
padding: 6px 10px;
border-bottom: 1px solid var(--border-color);
color: var(--text-primary);
}
.report-table tr.military {
background: rgba(85, 107, 47, 0.1);
}
.report-table tr:hover {
background: rgba(74, 158, 255, 0.05);
}
.report-more {
font-size: 10px;
color: var(--text-dim);
text-align: center;
padding: 8px;
}
.report-footer {
display: flex;
gap: 10px;
padding: 16px 20px;
background: var(--bg-card);
border-top: 1px solid var(--border-color);
}
.report-btn {
flex: 1;
padding: 10px 16px;
border: 1px solid var(--border-color);
background: var(--bg-panel);
color: var(--text-primary);
border-radius: 6px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.report-btn:hover {
background: var(--bg-card);
border-color: var(--accent-cyan);
}
/* Mobile responsiveness for stats strip */
@media (max-width: 768px) {
.stats-strip {
padding: 4px 8px;
}
.strip-stat {
padding: 3px 6px;
min-width: 45px;
}
.strip-value {
font-size: 12px;
}
.strip-label {
font-size: 7px;
}
.strip-report-btn,
.strip-btn {
padding: 6px 10px;
font-size: 9px;
}
.report-content {
max-height: 90vh;
}
}
/* ============================================
STRIP BUTTONS
============================================ */
.strip-divider {
width: 1px;
height: 24px;
background: rgba(74, 158, 255, 0.2);
margin: 0 4px;
}
.strip-btn {
background: rgba(74, 158, 255, 0.1);
border: 1px solid rgba(74, 158, 255, 0.2);
color: var(--text-primary);
padding: 6px 10px;
border-radius: 4px;
font-size: 10px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
}
.strip-btn:hover:not(:disabled) {
background: rgba(74, 158, 255, 0.2);
border-color: rgba(74, 158, 255, 0.4);
}
.strip-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.strip-btn.primary {
background: linear-gradient(135deg, var(--accent-cyan) 0%, #2563eb 100%);
border: none;
color: white;
}
.strip-btn.primary:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}
/* Status and time in strip */
.strip-status {
display: flex;
align-items: center;
gap: 6px;
padding: 0 8px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-secondary);
}
.strip-status .status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--accent-red);
box-shadow: 0 0 10px var(--accent-red);
animation: pulse 2s ease-in-out infinite;
transition: all 0.3s ease;
}
.strip-status .status-dot.active {
background: var(--accent-green);
box-shadow: 0 0 10px var(--accent-green);
}
.strip-time {
font-size: 11px;
font-weight: 500;
color: var(--accent-cyan);
font-family: 'JetBrains Mono', monospace;
padding-left: 8px;
border-left: 1px solid rgba(74, 158, 255, 0.2);
white-space: nowrap;
}
/* Signal quality states */
.strip-stat.signal-stat .strip-value {
letter-spacing: 2px;
}
.strip-stat.signal-stat.good {
background: rgba(34, 197, 94, 0.1);
border-color: rgba(34, 197, 94, 0.3);
}
.strip-stat.signal-stat.good .strip-value {
color: var(--accent-green);
}
.strip-stat.signal-stat.warning {
background: rgba(245, 158, 11, 0.1);
border-color: rgba(245, 158, 11, 0.3);
}
.strip-stat.signal-stat.warning .strip-value {
color: var(--accent-orange);
}
.strip-stat.signal-stat.poor {
background: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.3);
}
.strip-stat.signal-stat.poor .strip-value {
color: var(--accent-red);
}
/* ============================================
SQUAWK REFERENCE MODAL
============================================ */
.squawk-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
padding: 20px;
}
.squawk-content {
background: var(--bg-panel);
border: 1px solid var(--border-color);
border-radius: 12px;
width: 100%;
max-width: 650px;
max-height: 85vh;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.squawk-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
background: var(--bg-card);
border-bottom: 1px solid var(--border-color);
}
.squawk-header h2 {
font-size: 16px;
font-weight: 600;
color: var(--accent-cyan);
}
.squawk-close {
background: none;
border: none;
color: var(--text-secondary);
font-size: 24px;
cursor: pointer;
padding: 0 8px;
line-height: 1;
}
.squawk-close:hover {
color: var(--text-primary);
}
.squawk-body {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
}
.squawk-section {
margin-bottom: 16px;
}
.squawk-section h3 {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid var(--border-color);
}
.squawk-section.emergency h3 {
color: var(--accent-red);
border-color: rgba(239, 68, 68, 0.3);
}
.squawk-section.special h3 {
color: var(--accent-orange);
border-color: rgba(245, 158, 11, 0.3);
}
.squawk-section.standard h3 {
color: var(--accent-cyan);
}
.squawk-section.other h3 {
color: var(--text-secondary);
}
.squawk-grid {
display: flex;
flex-direction: column;
gap: 6px;
}
.squawk-item {
display: grid;
grid-template-columns: 50px 100px 1fr;
gap: 12px;
align-items: center;
padding: 8px 10px;
background: var(--bg-card);
border-radius: 4px;
font-size: 11px;
}
.squawk-code {
font-family: 'JetBrains Mono', monospace;
font-weight: 700;
color: var(--accent-cyan);
font-size: 12px;
}
.squawk-section.emergency .squawk-code {
color: var(--accent-red);
}
.squawk-section.special .squawk-code {
color: var(--accent-orange);
}
.squawk-name {
font-weight: 600;
color: var(--text-primary);
font-size: 10px;
}
.squawk-desc {
color: var(--text-secondary);
font-size: 10px;
}
@media (max-width: 600px) {
.squawk-item {
grid-template-columns: 45px 80px 1fr;
gap: 8px;
font-size: 10px;
}
.squawk-code {
font-size: 11px;
}
}