Add branding splash and simulator cycle timing
This commit is contained in:
@@ -39,6 +39,7 @@ function FieldLabel({ label, error, children }: { label: string; error?: ReactNo
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
const [showSplash, setShowSplash] = useState(true);
|
||||
const [dashboard, setDashboard] = useState<DashboardSnapshot | null>(null);
|
||||
const [orders, setOrders] = useState<ProductionOrder[]>([]);
|
||||
const [unqualifiedDowntimes, setUnqualifiedDowntimes] = useState<Downtime[]>([]);
|
||||
@@ -77,6 +78,11 @@ export default function App() {
|
||||
return language === "fr" ? fr : en;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const timer = window.setTimeout(() => setShowSplash(false), 900);
|
||||
return () => window.clearTimeout(timer);
|
||||
}, []);
|
||||
|
||||
const moduleTabs: Array<{ key: ModuleKey; label: string; description: string }> = [
|
||||
{ key: "atelier", label: t("Workshop", "Atelier"), description: t("Machines view", "Vue machines") },
|
||||
{ key: "machine", label: "Machine", description: t("Cycles and events", "Cycles et evenements") },
|
||||
@@ -1118,13 +1124,34 @@ export default function App() {
|
||||
);
|
||||
}
|
||||
|
||||
if (showSplash) {
|
||||
return (
|
||||
<div className="splash-screen" aria-label="Plast Track">
|
||||
<img src="/KSS.png" alt="KSS" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`app-shell ${isWorkshopMode && activeModule === "atelier" ? "app-shell--workshop" : ""}`}>
|
||||
<main className="workspace">
|
||||
<aside className="demo-notice" role="note">
|
||||
<strong>{t("Simulation and demonstration only", "Simulation et demonstration uniquement")}</strong>
|
||||
<span>
|
||||
{t(
|
||||
"This web application is for simulation and demonstration. It must not be used as a validated production MES or safety system.",
|
||||
"Cette application web est destinee a la simulation et a la demonstration. Elle ne doit pas etre utilisee comme MES de production valide ni comme systeme de securite.",
|
||||
)}
|
||||
</span>
|
||||
</aside>
|
||||
|
||||
<header className="hero">
|
||||
<div>
|
||||
<p className="eyebrow">Plast Track MVP</p>
|
||||
<h1>{t("Workshop supervision", "Supervision atelier")}</h1>
|
||||
<div className="brand-lockup">
|
||||
<img className="brand-lockup__logo" src="/KSS.png" alt="KSS" />
|
||||
<div>
|
||||
<p className="eyebrow">Plast Track MVP</p>
|
||||
<h1>{t("Workshop supervision", "Supervision atelier")}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div className="hero__controls">
|
||||
<label className="language-select">
|
||||
|
||||
Reference in New Issue
Block a user