Refactor app into components and add file upload progress

Components created:
- Header: App header with GitHub links
- ActionSelector: Step 1 - Choose create/join/scan
- MethodSelector: Step 2 - Choose connection method
- ConnectionForm: Step 3 - Enter connection details
- ChatView: Step 4 - Connected chat interface
- Message: Individual message display (text/file)
- QRScanner: QR code scanning component
- QRCodeDisplay: QR code display component
- FileUploadProgress: Progress bar for file uploads

Features:
- Clean component separation with props
- File upload progress bar with percentage
- Cancel upload functionality
- Disabled file button during upload
- Visual progress indicator with gradient
- All logic remains in App.jsx for state management
This commit is contained in:
2025-11-07 22:26:19 +01:00
parent 8e9edb6d79
commit 9f9068e7c7
11 changed files with 622 additions and 365 deletions

View File

@@ -0,0 +1,13 @@
function QRCodeDisplay({ qrCodeUrl, connectionId }) {
if (!qrCodeUrl) return null;
return (
<div className="qr-code-container">
<p className="qr-label">Scan to connect:</p>
<img src={qrCodeUrl} alt="Connection QR Code" className="qr-code" />
<p className="connection-id-display">{connectionId}</p>
</div>
);
}
export default QRCodeDisplay;