Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve pgm line ui #285

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 39 additions & 12 deletions src/components/production-line/production-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type FormValues = TJoinProductionOptions;
const HeaderWrapper = styled.div`
display: flex;
justify-content: space-between;
gap: 1rem;
`;

const ProductionLineInfo = styled.div`
Expand Down Expand Up @@ -91,7 +92,7 @@ const ButtonIcon = styled.div`
}
`;

const FlexButtonWrapper = styled.div`
const FlexButtonWrapper = styled.div<{ isProgramUser: boolean }>`
width: 50%;
padding: 0 1rem 2rem 1rem;

Expand All @@ -101,6 +102,7 @@ const FlexButtonWrapper = styled.div`

&.last {
padding-right: 0;
padding-left: ${({ isProgramUser }) => (isProgramUser ? "0" : "1rem")};
}
`;

Expand All @@ -126,6 +128,7 @@ const LongPressWrapper = styled.div`
const ButtonWrapper = styled.div`
display: flex;
justify-content: space-between;
height: 4rem;
`;

const ListWrapper = styled(DisplayContainer)`
Expand Down Expand Up @@ -154,11 +157,27 @@ const ConnectionErrorWrapper = styled(FlexContainer)`
padding-top: 12rem;
`;

const IconWrapper = styled.div`
width: 5rem;
height: 5rem;
margin-left: 2rem;
const ProgramOutputIcon = styled.div`
display: flex;
flex-direction: row;
align-items: center;
background: rgba(50, 56, 59, 1);
color: #59cbe8;
border: 0.2rem solid #6d6d6d;
padding: 0.5rem 1rem;
width: fit-content;
height: 4rem;
border-radius: 0.5rem;
margin: 0 2rem 2rem 1rem;
gap: 1rem;
font-size: 1.2rem;

svg {
fill: #59cbe8;
width: 3.5rem;
}
`;

const DeviceButtonWrapper = styled.div`
display: flex;
justify-content: flex-end;
Expand Down Expand Up @@ -606,11 +625,6 @@ export const ProductionLine = ({
{!isSingleCall && production && line && (
<ButtonWrapper>
<ExitCallButton resetOnExit={() => setConfirmExitModalOpen(true)} />
{line?.programOutputLine && (
<IconWrapper>
<TVIcon />
</IconWrapper>
)}
{confirmExitModalOpen && (
<Modal onClose={() => setConfirmExitModalOpen(false)}>
<DisplayContainerHeader>Confirm</DisplayContainerHeader>
Expand All @@ -625,6 +639,13 @@ export const ProductionLine = ({
)}
</ButtonWrapper>
)}

{line?.programOutputLine && (
<ProgramOutputIcon>
<TVIcon />
Program Output
</ProgramOutputIcon>
)}
</HeaderWrapper>

{connectionActive && (
Expand Down Expand Up @@ -682,7 +703,10 @@ export const ProductionLine = ({
{!(
line?.programOutputLine && joinProductionOptions.isProgramUser
) && (
<FlexButtonWrapper className="first">
<FlexButtonWrapper
className="first"
isProgramUser={joinProductionOptions.isProgramUser}
>
<UserControlBtn
type="button"
onClick={() => muteOutput()}
Expand All @@ -706,7 +730,10 @@ export const ProductionLine = ({
(line?.programOutputLine
? joinProductionOptions?.isProgramUser
: !joinProductionOptions.isProgramUser) && (
<FlexButtonWrapper className="last">
<FlexButtonWrapper
className="last"
isProgramUser={joinProductionOptions.isProgramUser}
>
<UserControlBtn
type="button"
onClick={() => muteInput(!isInputMuted)}
Expand Down
Loading