Skip to content

Commit

Permalink
Feat/visual production (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 authored Jan 27, 2025
1 parent e6ff46f commit c42b179
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/components/landing-page/join-production.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ import { RemoveIcon } from "../../assets/icons/icon.tsx";

type FormValues = TJoinProductionOptions;

const NameWrapper = styled.div`
display: flex;
flex-direction: column;
margin-bottom: 2rem;
`;

const ProductionName = styled.p`
margin-bottom: 1rem;
&.name {
font-weight: bold;
min-height: 1.5rem;
margin: 0 0 0 0.5rem;
}
`;

const FetchErrorMessage = styled.div`
background: ${errorColour};
color: ${darkText};
Expand Down Expand Up @@ -291,6 +307,12 @@ export const JoinProduction = ({
<>
{!preSelected && (
<>
<NameWrapper>
<ProductionName>Production name</ProductionName>
<ProductionName className="name">
{production?.name || "Enter a production ID"}
</ProductionName>
</NameWrapper>
<FormInputWithLoader
onChange={(ev) => {
onChange(ev);
Expand Down
9 changes: 7 additions & 2 deletions src/components/production-line/call-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ProductionName,
ParticipantCount,
HeaderIcon,
Id,
} from "../production-list/production-list-components";
import { AudioFeedIcon, CallHeader } from "./production-line-components";
import { TLine, TProduction } from "./types";
Expand Down Expand Up @@ -44,8 +45,12 @@ export const CallHeaderComponent = ({
</AudioFeedIcon>
)}
<ProductionName
title={`${production?.name} / ${line?.name}`}
>{`${truncatedProductionName} / ${truncatedLineName}`}</ProductionName>
title={`${production?.name} (id: ${production?.productionId}) / ${line?.name}`}
>
{`${truncatedProductionName}`}
<Id>{`(id: ${production?.productionId})`}</Id>
{`/ ${truncatedLineName}`}
</ProductionName>
<UsersIcon />
<ParticipantCount>{line?.participants.length}</ParticipantCount>
</HeaderTexts>
Expand Down
5 changes: 5 additions & 0 deletions src/components/production-list/production-list-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ export const ProductionItemWrapper = styled.div`
`;

export const ProductionName = styled.div`
display: flex;
font-size: 1.4rem;
font-weight: bold;
margin-right: 1rem;
max-width: 30rem;
word-break: break-word;
`;

export const Id = styled.p`
font-weight: normal;
`;

export const ParticipantCount = styled.div`
font-size: 1.5rem;
color: #9e9e9e;
Expand Down
2 changes: 2 additions & 0 deletions src/components/production-list/production-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
HeaderTexts,
HeaderWrapper,
IconWrapper,
Id,
InnerDiv,
Lineblock,
LineBlockParticipant,
Expand Down Expand Up @@ -151,6 +152,7 @@ export const ProductionsListItem = ({
{production.name.length > 40
? `${production.name.slice(0, 40)}...`
: production.name}
<Id>{`(id: ${production?.productionId})`}</Id>
</ProductionName>
<UsersIcon />
<ParticipantCount>{totalParticipants}</ParticipantCount>
Expand Down

0 comments on commit c42b179

Please sign in to comment.