Fix end call screen styling
This commit is contained in:
parent
473a027702
commit
486f264673
2 changed files with 60 additions and 18 deletions
71
src/Room.jsx
71
src/Room.jsx
|
@ -42,7 +42,11 @@ import "matrix-react-sdk/res/css/views/voip/GroupCallView/_VideoGrid.scss";
|
||||||
import { useGroupCall } from "matrix-react-sdk/src/hooks/useGroupCall";
|
import { useGroupCall } from "matrix-react-sdk/src/hooks/useGroupCall";
|
||||||
import { useCallFeed } from "matrix-react-sdk/src/hooks/useCallFeed";
|
import { useCallFeed } from "matrix-react-sdk/src/hooks/useCallFeed";
|
||||||
import { useMediaStream } from "matrix-react-sdk/src/hooks/useMediaStream";
|
import { useMediaStream } from "matrix-react-sdk/src/hooks/useMediaStream";
|
||||||
import { useClient, useLoadGroupCall } from "./ConferenceCallManagerHooks";
|
import {
|
||||||
|
useClient,
|
||||||
|
useLoadGroupCall,
|
||||||
|
useProfile,
|
||||||
|
} from "./ConferenceCallManagerHooks";
|
||||||
import { ErrorView, LoadingView, FullScreenView } from "./FullScreenView";
|
import { ErrorView, LoadingView, FullScreenView } from "./FullScreenView";
|
||||||
import { GroupCallInspector } from "./GroupCallInspector";
|
import { GroupCallInspector } from "./GroupCallInspector";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
|
@ -234,7 +238,11 @@ export function GroupCallView({
|
||||||
} else if (state === GroupCallState.Entering) {
|
} else if (state === GroupCallState.Entering) {
|
||||||
return <EnteringRoomView />;
|
return <EnteringRoomView />;
|
||||||
} else if (left) {
|
} else if (left) {
|
||||||
return <CallEndedScreen />;
|
if (isPasswordlessUser) {
|
||||||
|
return <PasswordlessUserCallEndedScreen client={client} />;
|
||||||
|
} else {
|
||||||
|
return <GuestCallEndedScreen />;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<RoomSetupView
|
<RoomSetupView
|
||||||
|
@ -499,25 +507,52 @@ function InRoomView({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CallEndedScreen() {
|
export function GuestCallEndedScreen() {
|
||||||
return (
|
return (
|
||||||
<FullScreenView className={styles.callEndedScreen}>
|
<FullScreenView className={styles.callEndedScreen}>
|
||||||
<h1>Your call is now ended</h1>
|
<h1>Your call is now ended</h1>
|
||||||
<hr />
|
<div className={styles.callEndedContent}>
|
||||||
<h2>Why not finish by creating an account?</h2>
|
<p>Why not finish by creating an account?</p>
|
||||||
<p>You'll be able to:</p>
|
<p>You'll be able to:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Easily access all your previous call links</li>
|
<li>Easily access all your previous call links</li>
|
||||||
<li>Set a username and avatar</li>
|
<li>Set a username and avatar</li>
|
||||||
</ul>
|
</ul>
|
||||||
<LinkButton
|
<LinkButton
|
||||||
className={styles.callEndedButton}
|
className={styles.callEndedButton}
|
||||||
size="lg"
|
size="lg"
|
||||||
variant="default"
|
variant="default"
|
||||||
to="/register"
|
to="/register"
|
||||||
>
|
>
|
||||||
Create account
|
Create account
|
||||||
</LinkButton>
|
</LinkButton>
|
||||||
|
</div>
|
||||||
|
<Link to="/">Not now, return to home screen</Link>
|
||||||
|
</FullScreenView>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function PasswordlessUserCallEndedScreen({ client }) {
|
||||||
|
const { displayName } = useProfile(client);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<FullScreenView className={styles.callEndedScreen}>
|
||||||
|
<h1>{displayName}, your call is now ended</h1>
|
||||||
|
<div className={styles.callEndedContent}>
|
||||||
|
<p>Why not finish by setting up a password to keep your account?</p>
|
||||||
|
<p>
|
||||||
|
You'll be able to keep your name and set an avatar for use on future
|
||||||
|
calls
|
||||||
|
</p>
|
||||||
|
<LinkButton
|
||||||
|
className={styles.callEndedButton}
|
||||||
|
size="lg"
|
||||||
|
variant="default"
|
||||||
|
to="/register"
|
||||||
|
>
|
||||||
|
Create account
|
||||||
|
</LinkButton>
|
||||||
|
</div>
|
||||||
<Link to="/">Not now, return to home screen</Link>
|
<Link to="/">Not now, return to home screen</Link>
|
||||||
</FullScreenView>
|
</FullScreenView>
|
||||||
);
|
);
|
||||||
|
|
|
@ -165,6 +165,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.callEndedScreen h1 {
|
.callEndedScreen h1 {
|
||||||
|
text-align: center;
|
||||||
margin-bottom: 60px;
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,10 +182,16 @@ limitations under the License.
|
||||||
.callEndedScreen ul {
|
.callEndedScreen ul {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
|
text-align: initial;
|
||||||
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.callEndedButton {
|
.callEndedButton {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callEndedContent {
|
||||||
|
text-align: center;
|
||||||
max-width: 360px;
|
max-width: 360px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue