Skip to content

Commit 5613697

Browse files
committed
Add Google SVG icon and update LoginDialog component
1 parent c926033 commit 5613697

File tree

2 files changed

+82
-43
lines changed

2 files changed

+82
-43
lines changed
Lines changed: 1 addition & 0 deletions
Loading

llmstack/client/src/components/LoginDialog.jsx

Lines changed: 81 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,99 @@
11
import {
2-
Typography,
32
Button,
43
Dialog,
54
DialogContent,
6-
DialogContentText,
7-
DialogTitle,
5+
Divider,
86
Link,
97
Stack,
8+
Typography,
109
} from "@mui/material";
10+
import { styled } from "@mui/system";
11+
import logo from "../assets/icon-transparent.png";
12+
import googleIcon from "../assets/images/icons/google.svg";
13+
14+
const Logo = styled("img")({
15+
width: "50px",
16+
margin: "0 auto",
17+
});
1118

12-
function LoginDialog({ open, handleClose, redirectPath }) {
19+
function LoginDialog({ open, handleClose, redirectPath, loginMessage }) {
1320
return (
1421
<Dialog
1522
open={open}
1623
onClose={handleClose}
1724
aria-labelledby="login-dialog-title"
1825
aria-describedby="login-dialog-description"
26+
maxWidth="xs"
27+
sx={{
28+
textAlign: "center",
29+
}}
1930
>
20-
<DialogTitle
21-
id="login-dialog-title"
22-
sx={{ display: "flex", justifyContent: "center" }}
23-
>
24-
<Typography variant="h4">Sign in to continue</Typography>
25-
</DialogTitle>
26-
<DialogContent>
27-
<DialogContentText id="login-dialog-description">
28-
<Stack sx={{ alignItems: "center" }}>
29-
<Typography variant="body" gutterBottom>
30-
Access 100+ community applications for free. Use ChatGPT, GPT-4,
31-
Claude 2, DALLE 3, and others - all on Promptly.
32-
</Typography>
33-
<Stack sx={{ width: "100%", alignItems: "center" }}>
34-
<Link
35-
underline="none"
36-
href={
37-
redirectPath
38-
? `/api/provider/login?provider_id=google&redirectUrl=${redirectPath}`
39-
: "/api/provider/login?provider_id=google"
40-
}
41-
>
42-
<Button variant="contained" autoFocus>
43-
Login With Google
44-
</Button>
45-
</Link>
46-
</Stack>
47-
<Typography variant="caption" sx={{ marginTop: "4px" }}>
48-
By continuing, you agree to our{" "}
49-
<span>
50-
<a href="https://www.trypromptly.com/tos">Terms of Service</a>
51-
</span>{" "}
52-
and{" "}
53-
<span>
54-
<a href="https://www.trypromptly.com/privacy">Privacy Policy</a>
55-
</span>
56-
</Typography>
57-
</Stack>
58-
</DialogContentText>
31+
<Stack m={8}>
32+
<Logo src={logo} alt="logo" />
33+
<Typography
34+
sx={{
35+
fontSize: "48px",
36+
fontWeight: 600,
37+
color: "#0a398d",
38+
}}
39+
>
40+
Promptly
41+
</Typography>
42+
</Stack>
43+
<Divider />
44+
<DialogContent sx={{ backgroundColor: "#f7f7f7" }}>
45+
<Stack sx={{ alignItems: "center", margin: "1em" }} gap={8}>
46+
<Typography sx={{ fontSize: "18px", maxWidth: "250px" }}>
47+
{loginMessage || "Please sign in to continue using the platform."}
48+
</Typography>
49+
<Link
50+
underline="none"
51+
href={
52+
redirectPath
53+
? `/accounts/google/login/?next=${redirectPath}`
54+
: "/accounts/google/login/"
55+
}
56+
>
57+
<Button
58+
variant="outlined"
59+
size="large"
60+
sx={{
61+
textTransform: "none",
62+
fontSize: "18px",
63+
width: "300px",
64+
padding: "10px",
65+
backgroundColor: "#fff",
66+
}}
67+
>
68+
<img src={googleIcon} alt="Google" width={"24px"} />
69+
&nbsp; Continue with Google
70+
</Button>
71+
</Link>
72+
<Typography
73+
sx={{
74+
fontSize: "16px",
75+
color: "#2f3437",
76+
lineHeight: "1.8em",
77+
border: "1px solid #e0e0e0",
78+
padding: "10px",
79+
borderRadius: "5px",
80+
backgroundColor: "#fff",
81+
}}
82+
>
83+
Access thousands of Generative AI applications for free. Use
84+
ChatGPT, GPT-4, Claude 2, DALLE 3, and others - all on Promptly.
85+
</Typography>
86+
<Typography variant="caption" sx={{ marginTop: "4px" }}>
87+
By continuing, you agree to our{" "}
88+
<span>
89+
<a href="https://www.trypromptly.com/tos">Terms of Service</a>
90+
</span>{" "}
91+
and{" "}
92+
<span>
93+
<a href="https://www.trypromptly.com/privacy">Privacy Policy</a>
94+
</span>
95+
</Typography>
96+
</Stack>
5997
</DialogContent>
6098
</Dialog>
6199
);

0 commit comments

Comments
 (0)