diff --git a/src/FullScreenView.jsx b/src/FullScreenView.jsx
index 2763da3..f207e5c 100644
--- a/src/FullScreenView.jsx
+++ b/src/FullScreenView.jsx
@@ -3,10 +3,11 @@ import { Link, useLocation } from "react-router-dom";
import { ErrorMessage } from "./Input";
import styles from "./FullScreenView.module.css";
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";
+import classNames from "classnames";
-export function FullScreenView({ children }) {
+export function FullScreenView({ className, children }) {
return (
-
+
diff --git a/src/Home.module.css b/src/Home.module.css
index 67bb126..990e365 100644
--- a/src/Home.module.css
+++ b/src/Home.module.css
@@ -55,20 +55,6 @@
margin-bottom: 0;
}
-.left .content hr {
- width: calc(100% - 24px);
- border: none;
- border-top: 1px solid var(--bgColor4);
- color: var(--textColor2);
- overflow: visible;
- text-align: center;
- height: 5px;
- font-weight: 600;
- font-size: 15px;
- line-height: 24px;
- margin: 0 12px;
-}
-
.left .content hr:after {
background-color: var(--bgColor1);
content: "OR";
diff --git a/src/Room.jsx b/src/Room.jsx
index 39d021b..b512edc 100644
--- a/src/Room.jsx
+++ b/src/Room.jsx
@@ -63,8 +63,6 @@ export function Room() {
const { loading, isAuthenticated, error, client, registerGuest, isGuest } =
useClient();
- console.log({ isGuest });
-
useEffect(() => {
if (!loading && !isAuthenticated) {
setRegisteringGuest(true);
@@ -180,6 +178,19 @@ export function GroupCallView({
};
}, [groupCall]);
+ const [left, setLeft] = useState(false);
+ const history = useHistory();
+
+ const onLeave = useCallback(() => {
+ leave();
+
+ if (!isGuest) {
+ history.push("/");
+ } else {
+ setLeft(true);
+ }
+ }, [leave, history, isGuest]);
+
if (error) {
return ;
} else if (state === GroupCallState.Entered) {
@@ -194,7 +205,7 @@ export function GroupCallView({
toggleMicrophoneMuted={toggleMicrophoneMuted}
userMediaFeeds={userMediaFeeds}
activeSpeaker={activeSpeaker}
- onLeave={leave}
+ onLeave={onLeave}
toggleScreensharing={toggleScreensharing}
isScreensharing={isScreensharing}
localScreenshareFeed={localScreenshareFeed}
@@ -207,6 +218,8 @@ export function GroupCallView({
);
} else if (state === GroupCallState.Entering) {
return ;
+ } else if (left) {
+ return ;
} else {
return (
);
}
+
+export function CallEndedScreen() {
+ return (
+
+ Your call is now ended
+
+ Why not finish by creating an account?
+ You'll be able to:
+
+ - Easily access all your previous call links
+ - Set a username and avatar
+ -
+ Get your own Matrix ID so you can log in to{" "}
+
+ Element
+
+
+
+
+ Create account
+
+ Not now, return to home screen
+
+ );
+}
diff --git a/src/Room.module.css b/src/Room.module.css
index 1e45c41..1446b9a 100644
--- a/src/Room.module.css
+++ b/src/Room.module.css
@@ -164,6 +164,30 @@ limitations under the License.
margin-right: 0px;
}
+.callEndedScreen h1 {
+ margin-bottom: 60px;
+}
+
+.callEndedScreen h2 {
+ font-size: 24px;
+ font-weight: 600;
+ margin-bottom: 32px;
+}
+
+.callEndedScreen p {
+ margin: 0 0 16px 0;
+}
+
+.callEndedScreen ul {
+ padding: 0;
+ margin-bottom: 40px;
+}
+
+.callEndedButton {
+ width: 100%;
+ max-width: 360px;
+}
+
@media (min-width: 800px) {
.roomContainer {
flex-direction: row;
diff --git a/src/button/Button.jsx b/src/button/Button.jsx
index fe77014..8f1ab8f 100644
--- a/src/button/Button.jsx
+++ b/src/button/Button.jsx
@@ -10,7 +10,7 @@ import { ReactComponent as ScreenshareIcon } from "../icons/Screenshare.svg";
import { useButton } from "@react-aria/button";
import { useObjectRef } from "@react-aria/utils";
-const variantToClassName = {
+export const variantToClassName = {
default: [styles.button],
toolbar: [styles.toolbarButton],
icon: [styles.iconButton],
@@ -19,9 +19,22 @@ const variantToClassName = {
iconCopy: [styles.iconCopyButton],
};
+export const sizeToClassName = {
+ lg: [styles.lg],
+};
+
export const Button = forwardRef(
(
- { variant = "default", on, off, iconStyle, className, children, ...rest },
+ {
+ variant = "default",
+ size,
+ on,
+ off,
+ iconStyle,
+ className,
+ children,
+ ...rest
+ },
ref
) => {
const buttonRef = useObjectRef(ref);
@@ -40,6 +53,7 @@ export const Button = forwardRef(