From 2107bcbfad32ed7de8d8117925d7cc8f76932ecd Mon Sep 17 00:00:00 2001 From: Ishita Sharma Date: Sat, 21 Mar 2026 18:48:42 -0700 Subject: [PATCH] UI change --- demo/frontend/src/App.tsx | 67 +++- demo/frontend/src/components/CallHistory.tsx | 14 +- demo/frontend/src/components/CallScreen.tsx | 68 ++-- demo/frontend/src/components/DemoControls.tsx | 65 ++-- .../src/components/FeatureBreakdown.tsx | 145 ++++++--- .../src/components/FederatedDashboard.tsx | 16 +- demo/frontend/src/components/FraudAlert.tsx | 11 +- .../src/components/PhoneSimulator.tsx | 39 ++- demo/frontend/src/components/PrivacyDemo.tsx | 24 +- demo/frontend/src/components/ScoreGauge.tsx | 223 ++++++++----- .../src/components/TranscriptPanel.tsx | 138 ++++++-- demo/frontend/src/styles/index.css | 66 ++++ demo/frontend/src/styles/phone.css | 297 +++++++++++++++++- 13 files changed, 912 insertions(+), 261 deletions(-) diff --git a/demo/frontend/src/App.tsx b/demo/frontend/src/App.tsx index 862155d..c4ada4b 100644 --- a/demo/frontend/src/App.tsx +++ b/demo/frontend/src/App.tsx @@ -279,12 +279,13 @@ export default function App() { { id: 'privacy', label: 'Privacy Demo', icon: }, { id: 'federated', label: 'Federated Learning', icon: }, ] + const isDetectionLoading = isCallActive && sentences.length === 0 return (
{/* Header */}
-
+
@@ -302,14 +303,14 @@ export default function App() {
{/* Tabs */} -
{/* Main Content */} -
+
{activeTab === 'detection' && (
{/* Demo Controls */} @@ -343,9 +344,9 @@ export default function App() { /> {/* Main detection layout */} -
+
{/* Phone Simulator */} -
+
{/* Right side panels */} -
+
{/* Score + Features row */} -
+
- + {isDetectionLoading ? ( +
+
+
+
+
+ ) : ( + + )}
- + {isDetectionLoading ? ( +
+ {[0, 1, 2, 3].map(item => ( +
+
+
+
+
+
+
+ ))} +
+ ) : ( + + )}
{/* Transcript */}
- + {isDetectionLoading ? ( +
+ {[0, 1, 2].map(item => ( +
+
+
+
+
+ ))} +
+ ) : ( + + )}
diff --git a/demo/frontend/src/components/CallHistory.tsx b/demo/frontend/src/components/CallHistory.tsx index 18392e0..c4f457d 100644 --- a/demo/frontend/src/components/CallHistory.tsx +++ b/demo/frontend/src/components/CallHistory.tsx @@ -109,7 +109,7 @@ export default function CallHistory({ entries }: CallHistoryProps) { {/* Collapsible header */} diff --git a/demo/frontend/src/components/DemoControls.tsx b/demo/frontend/src/components/DemoControls.tsx index 076e491..41cf1a4 100644 --- a/demo/frontend/src/components/DemoControls.tsx +++ b/demo/frontend/src/components/DemoControls.tsx @@ -35,56 +35,53 @@ export default function DemoControls({ availableCalls, }: DemoControlsProps) { return ( -
-
+
+
{/* Left: sample calls */} -
+
Sample Calls
- {availableCalls.map((call) => { - const config = callIcons[call.id] || { - icon: , - color: 'hover:bg-brand-teal/10 hover:text-brand-teal hover:border-brand-teal/30', - } - return ( - - ) - })} +
+ {availableCalls.map((call) => { + const config = callIcons[call.id] || { + icon: , + color: 'hover:bg-brand-teal/10 hover:text-brand-teal hover:border-brand-teal/30', + } + return ( + + ) + })} +
{/* Right: mic toggle */} -
-
+
+