- Store track history with position, altitude, speed, and timestamp
- Automatic track point collection every 30 seconds when position changes
- API endpoint /api/aircraft/{hex}/history for individual aircraft tracks
- Frontend "Show History" button to display historical flight paths
- Click aircraft markers to show their historical track (dashed red line)
- Track cleanup: keep last 200 points per aircraft, 24-hour retention
- Add aircraft type badges in table view with color coding
- Start/end markers for historical tracks with timestamps
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
369 lines
No EOL
6 KiB
CSS
369 lines
No EOL
6 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #1a1a1a;
|
|
color: #ffffff;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem 2rem;
|
|
background: #2d2d2d;
|
|
border-bottom: 1px solid #404040;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.5rem;
|
|
color: #00a8ff;
|
|
}
|
|
|
|
.stats-summary {
|
|
display: flex;
|
|
gap: 1rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.connection-status {
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 4px;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.connection-status.connected {
|
|
background: #27ae60;
|
|
}
|
|
|
|
.connection-status.disconnected {
|
|
background: #e74c3c;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.view-toggle {
|
|
display: flex;
|
|
background: #2d2d2d;
|
|
border-bottom: 1px solid #404040;
|
|
}
|
|
|
|
.view-btn {
|
|
padding: 0.75rem 1.5rem;
|
|
background: transparent;
|
|
border: none;
|
|
color: #ffffff;
|
|
cursor: pointer;
|
|
border-bottom: 3px solid transparent;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.view-btn:hover {
|
|
background: #404040;
|
|
}
|
|
|
|
.view-btn.active {
|
|
border-bottom-color: #00a8ff;
|
|
background: #404040;
|
|
}
|
|
|
|
.view {
|
|
flex: 1;
|
|
display: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.view.active {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
#map {
|
|
flex: 1;
|
|
z-index: 1;
|
|
}
|
|
|
|
.map-controls {
|
|
position: absolute;
|
|
top: 80px;
|
|
right: 10px;
|
|
z-index: 1000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.map-controls button {
|
|
padding: 0.5rem 1rem;
|
|
background: #2d2d2d;
|
|
border: 1px solid #404040;
|
|
color: #ffffff;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.map-controls button:hover {
|
|
background: #404040;
|
|
}
|
|
|
|
.legend {
|
|
position: absolute;
|
|
bottom: 10px;
|
|
left: 10px;
|
|
background: rgba(45, 45, 45, 0.95);
|
|
border: 1px solid #404040;
|
|
border-radius: 8px;
|
|
padding: 1rem;
|
|
z-index: 1000;
|
|
min-width: 150px;
|
|
}
|
|
|
|
.legend h4 {
|
|
margin: 0 0 0.5rem 0;
|
|
font-size: 0.9rem;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-bottom: 0.25rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.legend-icon {
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 2px;
|
|
border: 1px solid #ffffff;
|
|
}
|
|
|
|
.legend-icon.commercial { background: #00ff88; }
|
|
.legend-icon.cargo { background: #ff8c00; }
|
|
.legend-icon.military { background: #ff4444; }
|
|
.legend-icon.ga { background: #ffff00; }
|
|
.legend-icon.ground { background: #888888; }
|
|
|
|
.table-controls {
|
|
display: flex;
|
|
gap: 1rem;
|
|
padding: 1rem;
|
|
background: #2d2d2d;
|
|
border-bottom: 1px solid #404040;
|
|
}
|
|
|
|
.table-controls input,
|
|
.table-controls select {
|
|
padding: 0.5rem;
|
|
background: #404040;
|
|
border: 1px solid #606060;
|
|
color: #ffffff;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.table-controls input {
|
|
flex: 1;
|
|
}
|
|
|
|
.table-container {
|
|
flex: 1;
|
|
overflow: auto;
|
|
}
|
|
|
|
#aircraft-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
#aircraft-table th,
|
|
#aircraft-table td {
|
|
padding: 0.75rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid #404040;
|
|
}
|
|
|
|
#aircraft-table th {
|
|
background: #2d2d2d;
|
|
font-weight: 600;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
#aircraft-table tr:hover {
|
|
background: #404040;
|
|
}
|
|
|
|
.type-badge {
|
|
padding: 0.2rem 0.4rem;
|
|
border-radius: 3px;
|
|
font-size: 0.7rem;
|
|
font-weight: bold;
|
|
color: #000000;
|
|
}
|
|
|
|
.type-badge.commercial { background: #00ff88; }
|
|
.type-badge.cargo { background: #ff8c00; }
|
|
.type-badge.military { background: #ff4444; }
|
|
.type-badge.ga { background: #ffff00; }
|
|
.type-badge.ground { background: #888888; color: #ffffff; }
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: #2d2d2d;
|
|
padding: 1.5rem;
|
|
border-radius: 8px;
|
|
border: 1px solid #404040;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-card h3 {
|
|
font-size: 0.9rem;
|
|
color: #888;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
color: #00a8ff;
|
|
}
|
|
|
|
.charts-container {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
padding: 1rem;
|
|
flex: 1;
|
|
}
|
|
|
|
.chart-card {
|
|
background: #2d2d2d;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
border: 1px solid #404040;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.chart-card h3 {
|
|
margin-bottom: 1rem;
|
|
color: #888;
|
|
}
|
|
|
|
.chart-card canvas {
|
|
flex: 1;
|
|
max-height: 300px;
|
|
}
|
|
|
|
.aircraft-marker {
|
|
transform: rotate(0deg);
|
|
filter: drop-shadow(0 0 4px rgba(0,0,0,0.9));
|
|
z-index: 1000;
|
|
}
|
|
|
|
.aircraft-popup {
|
|
min-width: 200px;
|
|
}
|
|
|
|
.aircraft-popup .flight {
|
|
font-weight: bold;
|
|
font-size: 1.1rem;
|
|
margin-bottom: 0.5rem;
|
|
color: #00a8ff;
|
|
}
|
|
|
|
.aircraft-popup .details {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 0.25rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.header {
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.stats-summary {
|
|
font-size: 0.8rem;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.table-controls {
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.charts-container {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.stats-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.5rem;
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.stat-card {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.map-controls {
|
|
top: 70px;
|
|
right: 5px;
|
|
}
|
|
|
|
.map-controls button {
|
|
padding: 0.4rem 0.8rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.stats-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
#aircraft-table {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
#aircraft-table th,
|
|
#aircraft-table td {
|
|
padding: 0.5rem 0.25rem;
|
|
}
|
|
} |