improved styling and added owner actions
This commit is contained in:
parent
84a9e3ea3e
commit
b69c89e4d5
|
|
@ -32,13 +32,15 @@ const PersonRow = ({ participant, isOwner = false }) => (
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
size="medium-square"
|
size="tiny-square"
|
||||||
|
disabled={participant.isCamMuted}
|
||||||
variant={participant.isCamMuted ? 'error-light' : 'success-light'}
|
variant={participant.isCamMuted ? 'error-light' : 'success-light'}
|
||||||
>
|
>
|
||||||
{participant.isCamMuted ? <IconCamOff /> : <IconCamOn />}
|
{participant.isCamMuted ? <IconCamOff /> : <IconCamOn />}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
size="medium-square"
|
size="tiny-square"
|
||||||
|
disabled={participant.isMicMuted}
|
||||||
variant={participant.isMicMuted ? 'error-light' : 'success-light'}
|
variant={participant.isMicMuted ? 'error-light' : 'success-light'}
|
||||||
>
|
>
|
||||||
{participant.isMicMuted ? <IconMicOff /> : <IconMicOn />}
|
{participant.isMicMuted ? <IconMicOff /> : <IconMicOn />}
|
||||||
|
|
@ -50,15 +52,14 @@ const PersonRow = ({ participant, isOwner = false }) => (
|
||||||
.person-row {
|
.person-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
border-bottom: 1px solid var(--gray-light);
|
border-bottom: 1px solid var(--gray-light);
|
||||||
padding: var(--spacing-xs) 0;
|
padding-bottom: var(--spacing-xxxs);
|
||||||
|
margin-bottom: var(--spacing-xxxs);
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0 var(--spacing-xs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.person-row .actions {
|
.person-row .actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--spacing-xxs);
|
gap: var(--spacing-xxxs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mute-state {
|
.mute-state {
|
||||||
|
|
@ -95,8 +96,11 @@ export const PeopleAside = () => {
|
||||||
return (
|
return (
|
||||||
<Aside>
|
<Aside>
|
||||||
{isOwner && (
|
{isOwner && (
|
||||||
<>
|
<div className="owner-actions">
|
||||||
<Button
|
<Button
|
||||||
|
fullWidth
|
||||||
|
size="tiny"
|
||||||
|
variant="outline-gray"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
callObject.updateParticipants({ '*': { setAudio: false } })
|
callObject.updateParticipants({ '*': { setAudio: false } })
|
||||||
}
|
}
|
||||||
|
|
@ -104,17 +108,36 @@ export const PeopleAside = () => {
|
||||||
Mute all mics
|
Mute all mics
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
fullWidth
|
||||||
|
size="tiny"
|
||||||
|
variant="outline-gray"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
callObject.updateParticipants({ '*': { setVideo: false } })
|
callObject.updateParticipants({ '*': { setVideo: false } })
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
Mute all cam
|
Mute all cams
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</div>
|
||||||
)}
|
)}
|
||||||
{allParticipants.map((p) => (
|
<div className="rows">
|
||||||
<PersonRow participant={p} key={p.id} isOwner={isOwner} />
|
{allParticipants.map((p) => (
|
||||||
))}
|
<PersonRow participant={p} key={p.id} isOwner={isOwner} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<style jsx>
|
||||||
|
{`
|
||||||
|
.owner-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--spacing-xxxs);
|
||||||
|
margin: var(--spacing-xs) var(--spacing-xxs);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rows {
|
||||||
|
margin: var(--spacing-xxs);
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
</style>
|
||||||
</Aside>
|
</Aside>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -194,12 +194,28 @@ export const Button = forwardRef(
|
||||||
height: 42px;
|
height: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.tiny {
|
||||||
|
height: 32px;
|
||||||
|
font-size: 11px;
|
||||||
|
border-radius: var(--radius-xs);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.tiny-square {
|
||||||
|
padding: 0px;
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
}
|
||||||
|
.button.small-square {
|
||||||
|
padding: 0px;
|
||||||
|
height: 42px;
|
||||||
|
width: 42px;
|
||||||
|
}
|
||||||
.button.medium-square {
|
.button.medium-square {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button.large-square {
|
.button.large-square {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
height: 52px;
|
height: 52px;
|
||||||
|
|
@ -273,6 +289,21 @@ export const Button = forwardRef(
|
||||||
box-shadow: 0 0 0px 3px rgba(255, 255, 255, 0.15);
|
box-shadow: 0 0 0px 3px rgba(255, 255, 255, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.outline-gray {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid var(--gray-light);
|
||||||
|
color: var(--text-light);
|
||||||
|
}
|
||||||
|
.button.outline-gray:hover,
|
||||||
|
.button.outline-gray:focus,
|
||||||
|
.button.outline-gray:active {
|
||||||
|
border: 1px solid var(--gray-default);
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.button.outline-gray:focus {
|
||||||
|
box-shadow: 0 0 0px 3px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
.button.muted {
|
.button.muted {
|
||||||
color: var(--red-default);
|
color: var(--red-default);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ export const GlobalStyle = () => (
|
||||||
--weight-medium: 500;
|
--weight-medium: 500;
|
||||||
--weight-bold: 600;
|
--weight-bold: 600;
|
||||||
|
|
||||||
|
--radius-xs: 6px;
|
||||||
--radius-sm: 9px;
|
--radius-sm: 9px;
|
||||||
--radius-md: 12px;
|
--radius-md: 12px;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue