Update design of VideoTileSettingsModal

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2022-08-02 14:30:33 +02:00
parent a150619d08
commit 33ef680c41
No known key found for this signature in database
GPG key ID: D1D45825D60C24D2
2 changed files with 20 additions and 6 deletions

View file

@ -1,5 +1,16 @@
.videoTileSettingsModal {
width: 700px;
height: 316px;
display: flex;
}
.content { .content {
position: relative;
margin: 27px 34px; margin: 27px 34px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
} }
.localVolumePercentage { .localVolumePercentage {

View file

@ -17,10 +17,10 @@ limitations under the License.
import React, { ChangeEvent, useState } from "react"; import React, { ChangeEvent, useState } from "react";
import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed"; import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed";
import selectInputStyles from "../input/SelectInput.module.css";
import { FieldRow } from "../input/Input"; import { FieldRow } from "../input/Input";
import { Modal } from "../Modal"; import { Modal } from "../Modal";
import styles from "./VideoTileSettingsModal.module.css"; import styles from "./VideoTileSettingsModal.module.css";
import { VolumeIcon } from "../button/VolumeIcon";
interface LocalVolumeProps { interface LocalVolumeProps {
feed: CallFeed; feed: CallFeed;
@ -39,11 +39,8 @@ const LocalVolume: React.FC<LocalVolumeProps> = ({
return ( return (
<> <>
<h4 className={selectInputStyles.label}> Local Volume </h4>
<FieldRow> <FieldRow>
<span className={styles.localVolumePercentage}> <VolumeIcon volume={localVolume} />
{`${Math.round(localVolume * 100)}%`}
</span>
<input <input
className={styles.localVolumeSlider} className={styles.localVolumeSlider}
type="range" type="range"
@ -65,7 +62,13 @@ interface Props {
export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => { export const VideoTileSettingsModal = ({ feed, ...rest }: Props) => {
return ( return (
<Modal title="Feed settings" isDismissable mobileFullScreen {...rest}> <Modal
className={styles.videoTileSettingsModal}
title="Local volume"
isDismissable
mobileFullScreen
{...rest}
>
<div className={styles.content}> <div className={styles.content}>
<LocalVolume feed={feed} /> <LocalVolume feed={feed} />
</div> </div>