fix(voice): fixed header style

This commit is contained in:
trashtemp 2022-01-16 13:44:00 +01:00
parent 59fb8a3c0f
commit da5d82537d
No known key found for this signature in database
GPG key ID: D1F0DB65081B0FC6
6 changed files with 26 additions and 27 deletions

View file

@ -21,7 +21,7 @@ interface IconModifiers {
export default styled.svg<IconModifiers>` export default styled.svg<IconModifiers>`
flex-shrink: 0; flex-shrink: 0;
cursor: pointer;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;

View file

@ -60,6 +60,7 @@ export const ReplyBase = styled.div<{
} }
.user { .user {
//margin-inline-start: 12px;
gap: 6px; gap: 6px;
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
@ -98,6 +99,10 @@ export const ReplyBase = styled.div<{
transition: transform ease-in-out 0.1s; transition: transform ease-in-out 0.1s;
filter: brightness(1); filter: brightness(1);
> svg {
flex-shrink: 0;
}
> span > p { > span > p {
display: flex; display: flex;
align-items: center; align-items: center;

View file

@ -1,5 +1,4 @@
import { MicrophoneOff } from "@styled-icons/boxicons-regular"; import { VolumeMute, MicrophoneOff } from "@styled-icons/boxicons-solid";
import { VolumeMute } from "@styled-icons/boxicons-solid";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Masquerade } from "revolt-api/types/Channels"; import { Masquerade } from "revolt-api/types/Channels";
@ -44,10 +43,6 @@ const VoiceIndicator = styled.div<{ status: VoiceStatus }>`
align-items: center; align-items: center;
justify-content: center; justify-content: center;
svg {
stroke: white;
}
${(props) => ${(props) =>
(props.status === "muted" || props.status === "deaf") && (props.status === "muted" || props.status === "deaf") &&
css` css`

View file

@ -92,6 +92,7 @@
p > code { p > code {
padding: 1px 4px; padding: 1px 4px;
flex-shrink: 0;
} }
code { code {

View file

@ -1,10 +1,8 @@
import { BarChart } from "@styled-icons/boxicons-regular";
import { import {
Megaphone, BarChartAlt2,
Microphone, Microphone,
MicrophoneOff, MicrophoneOff,
PhoneOff, PhoneOff,
Speaker,
VolumeFull, VolumeFull,
VolumeMute, VolumeMute,
} from "@styled-icons/boxicons-solid"; } from "@styled-icons/boxicons-solid";
@ -41,16 +39,16 @@ const VoiceBase = styled.div`
align-items: center; align-items: center;
padding: 10px; padding: 10px;
font-size: 14px; font-size: 13px;
font-weight: 600; font-weight: 500;
user-select: none; user-select: none;
gap: 6px;
color: var(--success); color: var(--success);
border-radius: var(--border-radius); border-radius: var(--border-radius);
background: var(--primary-background); background: var(--primary-background);
svg { svg {
margin-inline-end: 4px;
cursor: help; cursor: help;
} }
} }
@ -59,7 +57,7 @@ const VoiceBase = styled.div`
flex-direction: column; flex-direction: column;
.participants { .participants {
margin: 20px 0; margin: 40px 20px;
justify-content: center; justify-content: center;
user-select: none; user-select: none;
display: flex; display: flex;
@ -137,42 +135,42 @@ export default observer(({ id }: Props) => {
)} )}
</div> </div>
<div className="status"> <div className="status">
<BarChart size={20} /> <BarChartAlt2 size={16} />
{voiceState.status === VoiceStatus.CONNECTED && ( {voiceState.status === VoiceStatus.CONNECTED && (
<Text id="app.main.channel.voice.connected" /> <Text id="app.main.channel.voice.connected" />
)} )}
</div> </div>
<div className="actions"> <div className="actions">
<Tooltip content={"Leave call"} placement={"bottom"}> <Tooltip content={"Leave call"} placement={"top"}>
<Button error onClick={voiceState.disconnect}> <Button error onClick={voiceState.disconnect}>
<PhoneOff width={25} /> <PhoneOff width={20} />
</Button> </Button>
</Tooltip> </Tooltip>
{voiceState.isProducing("audio") ? ( {voiceState.isProducing("audio") ? (
<Tooltip content={"Mute microphone"} placement={"bottom"}> <Tooltip content={"Mute microphone"} placement={"top"}>
<Button <Button
onClick={() => voiceState.stopProducing("audio")}> onClick={() => voiceState.stopProducing("audio")}>
<Microphone width={25} /> <Microphone width={20} />
</Button> </Button>
</Tooltip> </Tooltip>
) : ( ) : (
<Tooltip content={"Unmute microphone"} placement={"bottom"}> <Tooltip content={"Unmute microphone"} placement={"top"}>
<Button <Button
onClick={() => voiceState.startProducing("audio")}> onClick={() => voiceState.startProducing("audio")}>
<MicrophoneOff width={25} /> <MicrophoneOff width={20} />
</Button> </Button>
</Tooltip> </Tooltip>
)} )}
{voiceState.isDeaf() ? ( {voiceState.isDeaf() ? (
<Tooltip content={"Deafen"} placement={"bottom"}> <Tooltip content={"Undeafen"} placement={"top"}>
<Button onClick={() => voiceState.stopDeafen()}> <Button onClick={() => voiceState.stopDeafen()}>
<VolumeMute width={25} /> <VolumeMute width={20} />
</Button> </Button>
</Tooltip> </Tooltip>
) : ( ) : (
<Tooltip content={"Deafen"} placement={"bottom"}> <Tooltip content={"Deafen"} placement={"top"}>
<Button onClick={() => voiceState.startDeafen()}> <Button onClick={() => voiceState.startDeafen()}>
<VolumeFull width={25} /> <VolumeFull width={20} />
</Button> </Button>
</Tooltip> </Tooltip>
)} )}

View file

@ -96,8 +96,8 @@ export const Profile = observer(() => {
<Text id="app.settings.pages.profile.profile_picture" /> <Text id="app.settings.pages.profile.profile_picture" />
</h3> </h3>
<FileUploader <FileUploader
width={80} width={92}
height={80} height={92}
style="icon" style="icon"
fileType="avatars" fileType="avatars"
behaviour="upload" behaviour="upload"