Accompanying changes
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
02aaa06cb3
commit
2537088099
8 changed files with 28 additions and 30 deletions
|
@ -48,10 +48,10 @@ const resolveAvatarSrc = (client: MatrixClient, src: string, size: number) =>
|
||||||
|
|
||||||
interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
||||||
bgKey?: string;
|
bgKey?: string;
|
||||||
src: string;
|
src?: string;
|
||||||
fallback: string;
|
fallback: string;
|
||||||
size?: Size | number;
|
size?: Size | number;
|
||||||
className: string;
|
className?: string;
|
||||||
style?: CSSProperties;
|
style?: CSSProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,11 +139,12 @@ export function MicButton({
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger
|
||||||
|
tooltip={() => (muted ? "Unmute microphone" : "Mute microphone")}
|
||||||
|
>
|
||||||
<Button variant="toolbar" {...rest} off={muted}>
|
<Button variant="toolbar" {...rest} off={muted}>
|
||||||
{muted ? <MuteMicIcon /> : <MicIcon />}
|
{muted ? <MuteMicIcon /> : <MicIcon />}
|
||||||
</Button>
|
</Button>
|
||||||
{() => (muted ? "Unmute microphone" : "Mute microphone")}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -156,11 +157,12 @@ export function VideoButton({
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger
|
||||||
|
tooltip={() => (muted ? "Turn on camera" : "Turn off camera")}
|
||||||
|
>
|
||||||
<Button variant="toolbar" {...rest} off={muted}>
|
<Button variant="toolbar" {...rest} off={muted}>
|
||||||
{muted ? <DisableVideoIcon /> : <VideoIcon />}
|
{muted ? <DisableVideoIcon /> : <VideoIcon />}
|
||||||
</Button>
|
</Button>
|
||||||
{() => (muted ? "Turn on camera" : "Turn off camera")}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -175,11 +177,12 @@ export function ScreenshareButton({
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger
|
||||||
|
tooltip={() => (enabled ? "Stop sharing screen" : "Share screen")}
|
||||||
|
>
|
||||||
<Button variant="toolbarSecondary" {...rest} on={enabled}>
|
<Button variant="toolbarSecondary" {...rest} on={enabled}>
|
||||||
<ScreenshareIcon />
|
<ScreenshareIcon />
|
||||||
</Button>
|
</Button>
|
||||||
{() => (enabled ? "Stop sharing screen" : "Share screen")}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -192,7 +195,7 @@ export function HangupButton({
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger tooltip={() => "Leave"}>
|
||||||
<Button
|
<Button
|
||||||
variant="toolbar"
|
variant="toolbar"
|
||||||
className={classNames(styles.hangupButton, className)}
|
className={classNames(styles.hangupButton, className)}
|
||||||
|
@ -200,7 +203,6 @@ export function HangupButton({
|
||||||
>
|
>
|
||||||
<HangupIcon />
|
<HangupIcon />
|
||||||
</Button>
|
</Button>
|
||||||
{() => "Leave"}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -213,11 +215,10 @@ export function SettingsButton({
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger tooltip={() => "Settings"}>
|
||||||
<Button variant="toolbar" {...rest}>
|
<Button variant="toolbar" {...rest}>
|
||||||
<SettingsIcon />
|
<SettingsIcon />
|
||||||
</Button>
|
</Button>
|
||||||
{() => "Settings"}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -230,22 +231,20 @@ export function InviteButton({
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger tooltip={() => "Invite"}>
|
||||||
<Button variant="toolbar" {...rest}>
|
<Button variant="toolbar" {...rest}>
|
||||||
<AddUserIcon />
|
<AddUserIcon />
|
||||||
</Button>
|
</Button>
|
||||||
{() => "Invite"}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function OptionsButton(props: Omit<Props, "variant">) {
|
export function OptionsButton(props: Omit<Props, "variant">) {
|
||||||
return (
|
return (
|
||||||
<TooltipTrigger>
|
<TooltipTrigger tooltip={() => "Options"}>
|
||||||
<Button variant="icon" {...props}>
|
<Button variant="icon" {...props}>
|
||||||
<OverflowIcon />
|
<OverflowIcon />
|
||||||
</Button>
|
</Button>
|
||||||
{() => "Options"}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React, { ReactNode } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
@ -25,10 +25,10 @@ import {
|
||||||
ButtonSize,
|
ButtonSize,
|
||||||
} from "./Button";
|
} from "./Button";
|
||||||
interface Props {
|
interface Props {
|
||||||
className: string;
|
className?: string;
|
||||||
variant: ButtonVariant;
|
variant?: ButtonVariant;
|
||||||
size: ButtonSize;
|
size?: ButtonSize;
|
||||||
children: JSX.Element;
|
children: ReactNode;
|
||||||
[index: string]: unknown;
|
[index: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import styles from "./ProfileModal.module.css";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
client: MatrixClient;
|
client: MatrixClient;
|
||||||
onClose: () => {};
|
onClose: () => void;
|
||||||
[rest: string]: unknown;
|
[rest: string]: unknown;
|
||||||
}
|
}
|
||||||
export function ProfileModal({ client, ...rest }: Props) {
|
export function ProfileModal({ client, ...rest }: Props) {
|
||||||
|
|
|
@ -28,11 +28,10 @@ import { Tooltip, TooltipTrigger } from "../Tooltip";
|
||||||
export function GridLayoutMenu({ layout, setLayout }) {
|
export function GridLayoutMenu({ layout, setLayout }) {
|
||||||
return (
|
return (
|
||||||
<PopoverMenuTrigger placement="bottom right">
|
<PopoverMenuTrigger placement="bottom right">
|
||||||
<TooltipTrigger>
|
<TooltipTrigger tooltip={() => "Layout Type"}>
|
||||||
<Button variant="icon">
|
<Button variant="icon">
|
||||||
{layout === "spotlight" ? <SpotlightIcon /> : <FreedomIcon />}
|
{layout === "spotlight" ? <SpotlightIcon /> : <FreedomIcon />}
|
||||||
</Button>
|
</Button>
|
||||||
{() => "Layout Type"}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
{(props) => (
|
{(props) => (
|
||||||
<Menu {...props} label="Grid layout menu" onAction={setLayout}>
|
<Menu {...props} label="Grid layout menu" onAction={setLayout}>
|
||||||
|
|
|
@ -61,11 +61,10 @@ export function OverflowMenu({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PopoverMenuTrigger disableOnState>
|
<PopoverMenuTrigger disableOnState>
|
||||||
<TooltipTrigger placement="top">
|
<TooltipTrigger tooltip={() => "More"} placement="top">
|
||||||
<Button variant="toolbar">
|
<Button variant="toolbar">
|
||||||
<OverflowIcon />
|
<OverflowIcon />
|
||||||
</Button>
|
</Button>
|
||||||
{() => "More"}
|
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
{(props) => (
|
{(props) => (
|
||||||
<Menu {...props} label="More menu" onAction={onAction}>
|
<Menu {...props} label="More menu" onAction={onAction}>
|
||||||
|
|
|
@ -38,6 +38,7 @@ import { usePTTSounds } from "../sound/usePttSounds";
|
||||||
import { PTTClips } from "../sound/PTTClips";
|
import { PTTClips } from "../sound/PTTClips";
|
||||||
import { GroupCallInspector } from "./GroupCallInspector";
|
import { GroupCallInspector } from "./GroupCallInspector";
|
||||||
import { OverflowMenu } from "./OverflowMenu";
|
import { OverflowMenu } from "./OverflowMenu";
|
||||||
|
import { Size } from "../Avatar";
|
||||||
|
|
||||||
function getPromptText(
|
function getPromptText(
|
||||||
networkWaiting: boolean,
|
networkWaiting: boolean,
|
||||||
|
@ -112,7 +113,7 @@ export const PTTCallView: React.FC<Props> = ({
|
||||||
const { modalState: feedbackModalState, modalProps: feedbackModalProps } =
|
const { modalState: feedbackModalState, modalProps: feedbackModalProps } =
|
||||||
useModalTriggerState();
|
useModalTriggerState();
|
||||||
const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver });
|
const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver });
|
||||||
const facepileSize = bounds.width < 800 ? "sm" : "md";
|
const facepileSize = bounds.width < 800 ? Size.SM : Size.MD;
|
||||||
const showControls = bounds.height > 500;
|
const showControls = bounds.height > 500;
|
||||||
const pttButtonSize = 232;
|
const pttButtonSize = 232;
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@ import { useModalTriggerState } from "../Modal";
|
||||||
|
|
||||||
interface RageShakeSubmitOptions {
|
interface RageShakeSubmitOptions {
|
||||||
description: string;
|
description: string;
|
||||||
roomId: string;
|
roomId?: string;
|
||||||
label: string;
|
label?: string;
|
||||||
sendLogs: boolean;
|
sendLogs: boolean;
|
||||||
rageshakeRequestId: string;
|
rageshakeRequestId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useSubmitRageshake(): {
|
export function useSubmitRageshake(): {
|
||||||
|
|
Loading…
Add table
Reference in a new issue