diff --git a/www/app/components/dashboard.js b/www/app/components/dashboard.js
index cf5c75c0..9c73f6f3 100644
--- a/www/app/components/dashboard.js
+++ b/www/app/components/dashboard.js
@@ -15,43 +15,82 @@ export function Dashboard({
stream,
}) {
const [openIndex, setOpenIndex] = useState(null);
+ const [autoscrollEnabled, setAutoscrollEnabled] = useState(true);
+
+ useEffect(() => {
+ if (autoscrollEnabled) scrollToBottom();
+ }, [topics.length]);
+
+ const scrollToBottom = () => {
+ const topicsDiv = document.getElementById("topics-div");
+ topicsDiv.scrollTop = topicsDiv.scrollHeight;
+ };
+
+ const handleScroll = (e) => {
+ const bottom =
+ e.target.scrollHeight - e.target.scrollTop === e.target.clientHeight;
+ if (!bottom && autoscrollEnabled) {
+ setAutoscrollEnabled(false);
+ } else if (bottom && !autoscrollEnabled) {
+ setAutoscrollEnabled(true);
+ }
+ };
return (
<>
-
-
+
+
Meeting Notes
-
Timestamp
-
Topic
-
+
Timestamp
+
Topic
- {topics.map((item, index) => (
-
-
setOpenIndex(openIndex === index ? null : index)}
- >
-
{item.timestamp}
-
- {item.title}
-
+
+ ⬇
+
+
+ {topics.map((item, index) => (
+
+
setOpenIndex(openIndex === index ? null : index)}
+ >
+
{item.timestamp}
+
+ {item.title}
+
+
-
+ {openIndex === index && (
+
+ {item.transcript}
+
+ )}
- {openIndex === index && (
-
{item.transcript}
- )}
-
- ))}
+ ))}
+ {topics.length === 0 && (
+
No topics yet
+ )}
+
{finalSummary && (
-
+
Final Summary
Duration: {finalSummary.duration}
{finalSummary.summary}
@@ -59,7 +98,7 @@ export function Dashboard({
)}
-
-
+
{/* TODO: Download audio
tag */}
+ {/* TODO: current time / audio duration */}
);
}
diff --git a/www/app/globals.scss b/www/app/globals.scss
index 016ef0b5..c24395c8 100644
--- a/www/app/globals.scss
+++ b/www/app/globals.scss
@@ -18,3 +18,10 @@ body {
background: beige;
border-radius: 5px;
}
+
+.Dropdown-placeholder {
+ text-wrap: nowrap;
+}
+.Dropdown-arrow {
+ top: 47% !important;
+}
diff --git a/www/app/page.js b/www/app/page.js
index 9fcf0087..128d8703 100644
--- a/www/app/page.js
+++ b/www/app/page.js
@@ -16,8 +16,8 @@ const App = () => {
serverData?.peer?.send(JSON.stringify({ cmd: "STOP" }));
return (
-
-
+
+
Reflector
Capture The Signal, Not The Noise