- ProgressModal-Komponente implementiert, die während des Updates angezeigt wird - Firmwareupdate dauert 5 Minuten (Mock-Simulation) - Nach Abschluss erscheint automatisch ein Toast-Hinweis - Verbesserte Benutzerführung durch blockierendes Modal während Update - Logging in kueFirmwareUpdateLog.json integriert (Mock)
29 lines
834 B
TypeScript
29 lines
834 B
TypeScript
"use client";
|
|
import React from "react";
|
|
|
|
type Props = {
|
|
visible: boolean;
|
|
progress: number;
|
|
};
|
|
|
|
const ProgressModal: React.FC<Props> = ({ visible, progress }) => {
|
|
if (!visible) return null;
|
|
|
|
return (
|
|
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
<div className="bg-white p-6 rounded shadow-md text-center w-80">
|
|
<h2 className="text-lg font-bold mb-4">Firmwareupdate läuft...</h2>
|
|
<div className="w-full bg-gray-200 rounded-full h-4">
|
|
<div
|
|
className="bg-blue-500 h-4 rounded-full transition-all duration-100"
|
|
style={{ width: `${progress}%` }}
|
|
></div>
|
|
</div>
|
|
<p className="mt-4 text-sm">{Math.round(progress)}% abgeschlossen</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ProgressModal;
|