river-cleaner / control-center.html
NextNow's picture
import React, { useEffect, useRef, useState } from "react";
cc0a1aa verified
Raw History Blame Contribute Delete
8.36 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RiverCleaner AR 路 Control Center</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
zinc: {
900: '#18181b',
800: '#27272a',
700: '#3f3f46',
200: '#e4e4e7',
100: '#f4f4f5',
},
emerald: {
400: '#34d399',
500: '#10b981',
},
red: {
500: '#ef4444',
600: '#dc2626',
},
sky: {
400: '#38bdf8',
500: '#0ea5e9',
},
fuchsia: {
400: '#e879f9',
},
lime: {
400: '#a3e635',
},
indigo: {
500: '#6366f1',
},
cyan: {
400: '#22d3ee',
},
amber: {
500: '#f59e0b',
},
blue: {
500: '#3b82f6',
},
rose: {
500: '#f43f5e',
}
}
}
}
}
</script>
<style>
:root {
--num: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
--sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { font-family: var(--sans); }
.bg-gradient-custom {
background: linear-gradient(to bottom, #05070b, #0b0f17, #07090f);
}
.animate-pulse-slow {
animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
</style>
</head>
<body class="bg-gradient-custom text-zinc-200 min-h-screen">
<!-- Navigation Header -->
<header class="sticky top-0 z-40 backdrop-blur bg-black/40 border-b border-zinc-800">
<div class="max-w-7xl mx-auto px-6 py-4 flex items-center justify-between">
<div class="flex items-center gap-3">
<span class="inline-block w-2 h-2 rounded-full bg-[#22c55e]"></span>
<h1 class="text-xl md:text-2xl font-bold tracking-tight">RiverCleaner AR 路 Control Center</h1>
<span class="hidden md:inline text-xs text-zinc-400 ml-2" id="fps-display">0 FPS</span>
<span class="ml-3 text-xs px-2 py-1 rounded bg-red-500/20 text-red-300 border border-red-500/30 hidden" id="safe-mode">SAFE MODE</span>
</div>
<nav class="flex items-center gap-4">
<a href="index.html" class="text-zinc-400 hover:text-zinc-200 transition">Dashboard</a>
<a href="control-center.html" class="text-zinc-200 border-b border-zinc-200">Control Center</a>
<a href="analytics.html" class="text-zinc-400 hover:text-zinc-200 transition">Analytics</a>
<a href="settings.html" class="text-zinc-400 hover:text-zinc-200 transition">Settings</a>
</nav>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-6 py-6">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Camera Feed Placeholder -->
<div class="lg:col-span-2 bg-zinc-900/70 border border-zinc-800 rounded-2xl shadow-xl p-6">
<h2 class="text-lg font-semibold mb-4">Live Camera Feed</h2>
<div class="relative rounded-xl overflow-hidden bg-zinc-800 h-80 flex items-center justify-center">
<div class="text-zinc-400 text-center">
<div class="text-4xl mb-2">馃摲</div>
<p>Camera feed would be displayed here</p>
<p class="text-sm mt-2">Live object detection and tracking</p>
</div>
</div>
</div>
<!-- Status Panel -->
<div class="space-y-6">
<div class="bg-zinc-900/70 border border-zinc-800 rounded-2xl shadow-xl p-6">
<h2 class="text-lg font-semibold mb-4">System Status</h2>
<div class="grid grid-cols-2 gap-4">
<div class="bg-zinc-800 rounded-lg p-3 text-center">
<div class="text-xs text-zinc-400">Impellers Online</div>
<div class="text-2xl font-bold text-emerald-400">12/12</div>
</div>
<div class="bg-zinc-800 rounded-lg p-3 text-center">
<div class="text-xs text-zinc-400">System Health</div>
<div class="text-2xl font-bold text-emerald-400">99%</div>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="bg-zinc-900/70 border border-zinc-800 rounded-2xl shadow-xl p-6">
<h2 class="text-lg font-semibold mb-4">Quick Actions</h2>
<div class="space-y-3">
<button class="w-full bg-emerald-500/20 border border-emerald-400/40 text-emerald-300 py-2 rounded-lg hover:bg-emerald-500/30 transition">
Start Collection
</button>
<button class="w-full bg-red-500/20 border border-red-400/40 text-red-300 py-2 rounded-lg hover:bg-red-500/30 transition">
Emergency Stop
</button>
</div>
</div>
</div>
</div>
<!-- Statistics Grid -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mt-6">
<div class="bg-zinc-900/70 border border-zinc-800 rounded-2xl shadow-xl p-6">
<h2 class="text-lg font-semibold mb-4">Total Recycled</h2>
<div class="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-sky-400 to-fuchsia-400">
9.46 t
</div>
</div>
<div class="bg-zinc-900/70 border border-zinc-800 rounded-2xl shadow-xl p-6">
<h2 class="text-lg font-semibold mb-4">Energy Saved</h2>
<div class="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-emerald-400 to-lime-400">
623.7 kWh
</div>
</div>
<div class="bg-zinc-900/70 border border-zinc-800 rounded-2xl shadow-xl p-6">
<h2 class="text-lg font-semibold mb-4">Current Operation</h2>
<div class="text-xl font-mono text-zinc-200">Active 路 Puerto Ciudad</div>
</div>
</div>
</main>
<script>
// Simple FPS counter simulation
let lastTime = performance.now();
let frames = 0;
function updateFPS() {
const now = performance.now();
frames++;
if (now - lastTime >= 1000) {
document.getElementById('fps-display').textContent = frames + ' FPS';
frames = 0;
lastTime = now;
}
requestAnimationFrame(updateFPS);
}
updateFPS();
// Simulate safe mode toggle
setInterval(() => {
const safeMode = document.getElementById('safe-mode');
if (Math.random() > 0.8) {
safeMode.classList.remove('hidden');
} else {
safeMode.classList.add('hidden');
}
}, 5000);
</script>
</body>
</html>