From e1cde7678cf2c3b2409782b05d493b93afabf610 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Fri, 11 Feb 2022 19:06:11 -0800 Subject: [PATCH] attempting another type of timeline but not nice --- .../Conversations/TimelineAudioClip.tsx | 37 +++++++- .../web/components/Drawer/CreateItemModal.tsx | 2 +- .../components/MainTabsOrPages/ViewConvo.tsx | 87 ++++++++++--------- .../UserDetails/MasterAvatarGroup.tsx | 2 +- packages/web/pages/s/index.tsx | 2 +- 5 files changed, 87 insertions(+), 43 deletions(-) diff --git a/packages/web/components/Conversations/TimelineAudioClip.tsx b/packages/web/components/Conversations/TimelineAudioClip.tsx index c982ee1..83090f5 100644 --- a/packages/web/components/Conversations/TimelineAudioClip.tsx +++ b/packages/web/components/Conversations/TimelineAudioClip.tsx @@ -12,6 +12,9 @@ import { } from "../../recoil/main"; import { MasterAvatarGroupWithUserFetch } from "../UserDetails/MasterAvatarGroup"; import { useState } from "react"; +import { UserAvatarSizes } from "../UserDetails/UserAvatar"; +import { FaPlay } from "react-icons/fa"; +import { Tooltip } from "antd"; export default function TimelineAudioClip(props: { index: number; @@ -46,7 +49,7 @@ export default function TimelineAudioClip(props: { }); }; - let customClasses = "bg-slate-100 border"; + let customClasses = "bg-slate-100"; if (audioQueueCurrentClip?.id == props.audioClip.id) { customClasses = "animate-pulse bg-orange-200"; } else if ( @@ -56,6 +59,38 @@ export default function TimelineAudioClip(props: { customClasses = "bg-sky-100"; } + return ( + + + + + + + + + + {audioClipUser?.firstName + " " + audioClipUser?.lastName} + + + {moment(props.audioClip.createdDate.toDate()).fromNow()} + + + + + + + + + + ); + return ( { - toast.success("closing"); + console.log("closing"); props.handleClose(); }; diff --git a/packages/web/components/MainTabsOrPages/ViewConvo.tsx b/packages/web/components/MainTabsOrPages/ViewConvo.tsx index 969c3da..04dcb7a 100644 --- a/packages/web/components/MainTabsOrPages/ViewConvo.tsx +++ b/packages/web/components/MainTabsOrPages/ViewConvo.tsx @@ -16,6 +16,7 @@ import { FaExternalLinkAlt, FaGithub, FaImages, + FaLink, FaMicrophone, FaPlay, FaRegClock, @@ -239,19 +240,18 @@ export default function ViewConvo(props: { conversationId: string }) { // check that the link is valid if (!isValidHttpUrl(text)) { - toast.error("Not a valid link"); - return; + console.log("Not a valid link"); } // set it as we should show modal regardless now setPastedLink(text); - - setShowItemModal(true); }) .catch((err) => { console.error("Failed to read clipboard contents: ", err); toast.error("Please enable permissions for clipboard"); }); + + setShowItemModal(true); }; const keyMap: KeyMap = { @@ -376,7 +376,7 @@ export default function ViewConvo(props: { conversationId: string }) { onClick={() => setEditTldrMode(true)} className="flex flex-row group items-center" > - + TLDR; @@ -418,12 +418,12 @@ export default function ViewConvo(props: { conversationId: string }) { )} - {/* have one row, but just translate it along y downward to put it in it's own place */} + {/* timeline clips */} + + Conversation + - + {audioClips?.length > 0 ? ( audioClips.reverse().map((audClip, index) => { const restAudioClips = audioClips.slice(index); @@ -447,35 +447,6 @@ export default function ViewConvo(props: { conversationId: string }) { - - {/* stuff for recording and playing action */} - - - - - - - - - - - - - {/* drawer items */} @@ -529,6 +500,44 @@ export default function ViewConvo(props: { conversationId: string }) { + + {/* stuff for recording and playing and sharing action */} + + + + + + + + + + + + + + + + + + + ); } diff --git a/packages/web/components/UserDetails/MasterAvatarGroup.tsx b/packages/web/components/UserDetails/MasterAvatarGroup.tsx index 3c91fbf..a5e6ae6 100644 --- a/packages/web/components/UserDetails/MasterAvatarGroup.tsx +++ b/packages/web/components/UserDetails/MasterAvatarGroup.tsx @@ -39,7 +39,7 @@ export default function MasterAvatarGroup(props: { key={finalistUsers[0].id} src={finalistUsers[0].avatarUrl} shape={AVATAR_SHAPE} - size={"default"} + size={props.size || UserAvatarSizes.default} /> ); } diff --git a/packages/web/pages/s/index.tsx b/packages/web/pages/s/index.tsx index 2d1f181..685c5f9 100644 --- a/packages/web/pages/s/index.tsx +++ b/packages/web/pages/s/index.tsx @@ -74,7 +74,7 @@ export default function Me() { timeout={400} classNames="slide" > -
+
{fullCleanPageContent}