diff --git a/src/components/production-line/user-list.tsx b/src/components/production-line/user-list.tsx index 01a61437..17eed875 100644 --- a/src/components/production-line/user-list.tsx +++ b/src/components/production-line/user-list.tsx @@ -1,28 +1,51 @@ import styled from "@emotion/styled"; import { DisplayContainerHeader } from "../landing-page/display-container-header.tsx"; import { TParticipant } from "./types.ts"; +import { UserIcon } from "../../assets/icons/icon.tsx"; -const ListWrapper = styled.div``; +const Container = styled.div` + width: 100%; + display: flex; + flex-direction: column; +`; + +const ListWrapper = styled.div` + border-radius: 1rem; + border: 0.2rem solid #434343; +`; type TUserProps = { + firstPerson: boolean; + lastPerson: boolean; + onlyPerson: boolean; isYou: boolean; - isActive: boolean; isTalking: boolean; }; +type TIndicatorProps = { + isActive: boolean; +}; + const User = styled.div` - margin: 0 0 1rem; + display: flex; + align-items: center; background: #1a1a1a; padding: 1rem; color: #ddd; - max-width: 32rem; - border-radius: 0.5rem; - border: 0.1rem solid #1a1a1a; + border: transparent; - ${({ isYou }) => (isYou ? `background: #353434;` : "")} + ${({ firstPerson }) => (firstPerson ? `border-radius: 1rem 1rem 0 0;` : "")} + + ${({ lastPerson }) => (lastPerson ? `border-radius: 0 0 1rem 1rem;` : "")} - ${({ isActive }) => - `border-left: 1rem solid ${isActive ? "#7be27b;" : "#ebca6a;"}`} +${({ lastPerson, onlyPerson }) => + lastPerson || onlyPerson + ? `border-bottom: 0;` + : `border-bottom: 0.1rem solid #464646;`} + + ${({ onlyPerson }) => (onlyPerson ? `border-radius: 1rem;` : "")} + + ${({ isYou }) => (isYou ? `background: #353434;` : "")} ${({ isTalking }) => `border-bottom: 0.5rem solid ${isTalking ? "#7be27b;" : "#353434;"}`} @@ -37,6 +60,22 @@ const User = styled.div` : ""} `; +const OnlineIndicator = styled.div` + width: 2.5rem; + height: 2.5rem; + border-radius: 5rem; + margin-right: 1rem; + display: flex; + align-items: center; + justify-content: center; + + ${({ isActive }) => `background: ${isActive ? "#7be27b;" : "#ebca6a;"}`} +`; + +const IconWrapper = styled.div` + width: 2rem; +`; + type TUserListOptions = { participants: TParticipant[]; sessionid: string | null; @@ -53,20 +92,29 @@ export const UserList = ({ if (!participants) return null; return ( - + Participants - {participants.map((p) => ( - - {p.name} {p.isActive ? "" : "(inactive)"} - - ))} - + + {participants.map((p, i) => ( + + + + + + + {p.name} {p.isActive ? "" : "(inactive)"} + + ))} + + ); };