From 1aed13dc27f897f4f3e1632e394e6fa78060fcbc Mon Sep 17 00:00:00 2001 From: talksik Date: Wed, 11 May 2022 10:38:20 -0500 Subject: [PATCH] better ui with unheard messages and such --- .vscode/settings.json | 2 +- .../src/components/lines/lineIcon/index.tsx | 4 +- packages/desktop/src/pages/terminal/index.tsx | 132 +++++++++++++++++- 3 files changed, 129 insertions(+), 9 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cc40c2e..54b39ec 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,7 @@ "editor.tabSize": 2, "workbench.iconTheme": "material-icon-theme", "editor.defaultFormatter": "esbenp.prettier-vscode", - "workbench.colorTheme": "Default Light+", + // "workbench.colorTheme": "Default Light+", "javascript.format.semicolons": "insert", "window.zoomLevel": 1, "trunk.trunkGrayOutNonBlockingIssues": false diff --git a/packages/desktop/src/components/lines/lineIcon/index.tsx b/packages/desktop/src/components/lines/lineIcon/index.tsx index f25cd3d..517bd98 100644 --- a/packages/desktop/src/components/lines/lineIcon/index.tsx +++ b/packages/desktop/src/components/lines/lineIcon/index.tsx @@ -31,7 +31,7 @@ function LineIcon({ src={avatarSrc} shape="square" size={"small"} - className={`absolute bottom-0 left-0 bg-slate-200`} + className={`shadow-lg absolute bottom-0 left-0 bg-slate-200`} /> ); } else if (index === 1) { @@ -57,7 +57,7 @@ function LineIcon({ src={avatarSrc} shape="square" size={"default"} - className={`${grayscale && "grayscale"}`} + className={`${grayscale && "grayscale"} shadow-lg`} /> )) )} diff --git a/packages/desktop/src/pages/terminal/index.tsx b/packages/desktop/src/pages/terminal/index.tsx index 3368e34..a1ac5ca 100644 --- a/packages/desktop/src/pages/terminal/index.tsx +++ b/packages/desktop/src/pages/terminal/index.tsx @@ -1,6 +1,6 @@ import { $desktopMode, $selectedLineId } from "../../controller/recoil"; import { Avatar, Skeleton, Tooltip } from "antd"; -import { FiActivity, FiSettings, FiSun } from "react-icons/fi"; +import { FiActivity, FiHeadphones, FiSettings, FiSun } from "react-icons/fi"; import { GlobalHotKeys, KeyMap } from "react-hotkeys"; import { useCallback, useEffect, useMemo, useState } from "react"; import { useGetUserDetails, useUserLines } from "../../controller/index"; @@ -379,7 +379,7 @@ function LineDetailsTerminal({ {`${ - selectedLine.otherMembers?.length ?? 0 + selectedLine.otherMembers?.length + 1 ?? 0 } members`} {`${ @@ -417,11 +417,131 @@ function LineDetailsTerminal({ - {/* line details */} -
+ {/* line timeline */} +
+ + load more + - {/* line timeline + present moment*/} -
+ yesterday + +
+ {selectedLine.otherUserObjects.map((otherUser) => ( +
+ + {otherUser.givenName} + + {`${ + Math.floor(Math.random() * 10) + 1 + }:${Math.floor(Math.random() * 100) + 10}pm |`} + + {`${ + Math.floor(Math.random() * 60) + 1 + } seconds`} +
+ ))} + +
+ + {"Arjun Patel"} + + {`${ + Math.floor(Math.random() * 10) + 1 + }:${Math.floor(Math.random() * 100) + 10}pm |`} + + {`${ + Math.floor(Math.random() * 60) + 1 + } seconds`} +
+
+ + today + +
+ {selectedLine.otherUserObjects.map((otherUser) => ( + // TODO: show the shadow if it's unheard +
+ + + {otherUser.name} + + + {`${ + Math.floor(Math.random() * 10) + 1 + }:${Math.floor(Math.random() * 100) + 10}pm |`} + + {`${ + Math.floor(Math.random() * 60) + 1 + } seconds`} +
+ ))} +
+ + {/* live broadcasters */} + + + right now + +
+ {selectedLine.otherUserObjects.map((otherUser) => ( +
+ + + {otherUser.name} + + + + + +
+ ))} +
+