mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Change wording from 'share' to 'invite'
This was updated in the designs.
This commit is contained in:
parent
03caa22f0e
commit
a959436ac7
@ -19,13 +19,13 @@ import { Button } from "@vector-im/compound-web";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ReactComponent as UserAddSolidIcon } from "@vector-im/compound-design-tokens/icons/user-add-solid.svg";
|
||||
|
||||
export const ShareButton: FC<
|
||||
export const InviteButton: FC<
|
||||
Omit<ComponentPropsWithoutRef<"button">, "children">
|
||||
> = (props) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Button kind="secondary" size="sm" Icon={UserAddSolidIcon} {...props}>
|
||||
{t("Share")}
|
||||
{t("Invite")}
|
||||
</Button>
|
||||
);
|
||||
};
|
@ -47,7 +47,7 @@ import { useEnableE2EE } from "../settings/useSetting";
|
||||
import { useRoomAvatar } from "./useRoomAvatar";
|
||||
import { useRoomName } from "./useRoomName";
|
||||
import { useJoinRule } from "./useJoinRule";
|
||||
import { ShareModal } from "./ShareModal";
|
||||
import { InviteModal } from "./InviteModal";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@ -274,15 +274,15 @@ export function GroupCallView({
|
||||
|
||||
const joinRule = useJoinRule(rtcSession.room);
|
||||
|
||||
const [shareModalOpen, setShareModalOpen] = useState(false);
|
||||
const onDismissShareModal = useCallback(
|
||||
() => setShareModalOpen(false),
|
||||
[setShareModalOpen]
|
||||
const [shareModalOpen, setInviteModalOpen] = useState(false);
|
||||
const onDismissInviteModal = useCallback(
|
||||
() => setInviteModalOpen(false),
|
||||
[setInviteModalOpen]
|
||||
);
|
||||
|
||||
const onShareClickFn = useCallback(
|
||||
() => setShareModalOpen(true),
|
||||
[setShareModalOpen]
|
||||
() => setInviteModalOpen(true),
|
||||
[setInviteModalOpen]
|
||||
);
|
||||
const onShareClick = joinRule === JoinRule.Public ? onShareClickFn : null;
|
||||
|
||||
@ -325,10 +325,10 @@ export function GroupCallView({
|
||||
}
|
||||
|
||||
const shareModal = (
|
||||
<ShareModal
|
||||
<InviteModal
|
||||
room={rtcSession.room}
|
||||
open={shareModalOpen}
|
||||
onDismiss={onDismissShareModal}
|
||||
onDismiss={onDismissInviteModal}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -69,7 +69,7 @@ import { useWakeLock } from "../useWakeLock";
|
||||
import { useMergedRefs } from "../useMergedRefs";
|
||||
import { MuteStates } from "./MuteStates";
|
||||
import { MatrixInfo } from "./VideoPreview";
|
||||
import { ShareButton } from "../button/ShareButton";
|
||||
import { InviteButton } from "../button/InviteButton";
|
||||
import { LayoutToggle } from "./LayoutToggle";
|
||||
import {
|
||||
ECAddonConnectionState,
|
||||
@ -417,7 +417,7 @@ export function InCallView({
|
||||
</LeftNav>
|
||||
<RightNav>
|
||||
{!reducedControls && onShareClick !== null && (
|
||||
<ShareButton onClick={onShareClick} />
|
||||
<InviteButton onClick={onShareClick} />
|
||||
)}
|
||||
</RightNav>
|
||||
</Header>
|
||||
|
@ -21,7 +21,7 @@ import { Room } from "matrix-js-sdk";
|
||||
import { Modal } from "../Modal";
|
||||
import { CopyButton } from "../button";
|
||||
import { getAbsoluteRoomUrl } from "../matrix-utils";
|
||||
import styles from "./ShareModal.module.css";
|
||||
import styles from "./InviteModal.module.css";
|
||||
import { useRoomSharedKey } from "../e2ee/sharedKeyManagement";
|
||||
|
||||
interface Props {
|
||||
@ -30,12 +30,12 @@ interface Props {
|
||||
onDismiss: () => void;
|
||||
}
|
||||
|
||||
export const ShareModal: FC<Props> = ({ room, open, onDismiss }) => {
|
||||
export const InviteModal: FC<Props> = ({ room, open, onDismiss }) => {
|
||||
const { t } = useTranslation();
|
||||
const roomSharedKey = useRoomSharedKey(room.roomId);
|
||||
|
||||
return (
|
||||
<Modal title={t("Share this call")} open={open} onDismiss={onDismiss}>
|
||||
<Modal title={t("Invite to this call")} open={open} onDismiss={onDismiss}>
|
||||
<p>{t("Copy and share this call link")}</p>
|
||||
<CopyButton
|
||||
className={styles.copyButton}
|
@ -27,7 +27,7 @@ import { Header, LeftNav, RightNav, RoomHeaderInfo } from "../Header";
|
||||
import { useLocationNavigation } from "../useLocationNavigation";
|
||||
import { MatrixInfo, VideoPreview } from "./VideoPreview";
|
||||
import { MuteStates } from "./MuteStates";
|
||||
import { ShareButton } from "../button/ShareButton";
|
||||
import { InviteButton } from "../button/InviteButton";
|
||||
import {
|
||||
HangupButton,
|
||||
MicButton,
|
||||
@ -109,7 +109,7 @@ export const LobbyView: FC<Props> = ({
|
||||
/>
|
||||
</LeftNav>
|
||||
<RightNav>
|
||||
{onShareClick !== null && <ShareButton onClick={onShareClick} />}
|
||||
{onShareClick !== null && <InviteButton onClick={onShareClick} />}
|
||||
</RightNav>
|
||||
</Header>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user