Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Login visual fixes (#793)

Oleg Isonene0b52fb61256
diff --git a/apps/designer/app/auth/login-button.tsx b/apps/designer/app/auth/login-button.tsx
index ea435bec83..5826dd4f7d 100644
--- a/apps/designer/app/auth/login-button.tsx
+++ b/apps/designer/app/auth/login-button.tsx
@@ -25,6 +25,7 @@ export const LoginButton = ({
{...props}
type="submit"
disabled={disabled}
+ variant="neutral"
css={{ width: "100%" }}
>
<Flex gap="2" align="center">
diff --git a/apps/designer/app/auth/login.tsx b/apps/designer/app/auth/login.tsx
index 9acc353e3f..1001fb0e2f 100644
--- a/apps/designer/app/auth/login.tsx
+++ b/apps/designer/app/auth/login.tsx
@@ -1,14 +1,7 @@
import { LinksFunction, MetaFunction } from "@remix-run/node";
import { Form, useLoaderData } from "@remix-run/react";
import { useState } from "react";
-import {
- Card,
- Flex,
- DeprecatedHeading,
- Button,
- Text,
- TextField,
-} from "@webstudio-is/design-system";
+import { Flex, Button, Text, TextField } from "@webstudio-is/design-system";
import interStyles from "~/shared/font-faces/inter.css";
import { GithubIcon, CommitIcon, GoogleIcon } from "@webstudio-is/icons";
import { LoginButton } from "./login-button";
@@ -43,68 +36,65 @@ export const Login = ({ errorMessage }: { errorMessage: string }) => {
align="center"
justify="center"
>
- <Card size={2}>
- <Flex direction="column" align="center" gap="3">
- <DeprecatedHeading size="2">Login</DeprecatedHeading>
- <Flex direction="column" gap="4">
- {errorMessage.length ? (
- <Text align="center" color="error">
- {errorMessage}
- </Text>
- ) : null}
- <Flex gap="2" direction="column">
- <Form action={authPath({ provider: "github" })} method="post">
- <LoginButton
- disabled={data.isGithubEnabled === false}
- icon={<GithubIcon />}
+ <Flex direction="column" align="center" gap="3">
+ <Flex direction="column" gap="4">
+ {errorMessage.length ? (
+ <Text align="center" color="error">
+ {errorMessage}
+ </Text>
+ ) : null}
+ <Flex gap="2" direction="column">
+ <Form action={authPath({ provider: "github" })} method="post">
+ <LoginButton
+ disabled={data.isGithubEnabled === false}
+ icon={<GithubIcon />}
+ >
+ Login with GitHub
+ </LoginButton>
+ </Form>
+ <Form action={authPath({ provider: "google" })} method="post">
+ <LoginButton
+ disabled={data.isGoogleEnabled === false}
+ icon={<GoogleIcon />}
+ >
+ Login with Google
+ </LoginButton>
+ </Form>
+ {data.isDevLogin &&
+ (isDevLoginOpen ? (
+ <Flex
+ as="form"
+ action={authPath({ provider: "dev" })}
+ method="post"
+ css={{
+ flexDirection: "row",
+ gap: "$spacing$5",
+ }}
>
- Login with GitHub
- </LoginButton>
- </Form>
- <Form action={authPath({ provider: "google" })} method="post">
+ <TextField
+ name="secret"
+ type="text"
+ minLength={2}
+ required
+ autoFocus
+ placeholder="Auth secret"
+ css={{ flexGrow: 1 }}
+ />
+ <Button>Login</Button>
+ </Flex>
+ ) : (
<LoginButton
- disabled={data.isGoogleEnabled === false}
- icon={<GoogleIcon />}
+ disabled={data.isDevLogin === false}
+ isDevLogin
+ onClick={() => openDevLogin(true)}
+ icon={<CommitIcon />}
>
- Login with Google
+ Dev Login
</LoginButton>
- </Form>
- {data.isDevLogin &&
- (isDevLoginOpen ? (
- <Flex
- as="form"
- action={authPath({ provider: "dev" })}
- method="post"
- css={{
- flexDirection: "row",
- gap: "$spacing$5",
- }}
- >
- <TextField
- name="secret"
- type="text"
- minLength={2}
- required
- autoFocus
- placeholder="Auth secret"
- css={{ flexGrow: 1 }}
- />
- <Button>Login</Button>
- </Flex>
- ) : (
- <LoginButton
- disabled={data.isDevLogin === false}
- isDevLogin
- onClick={() => openDevLogin(true)}
- icon={<CommitIcon />}
- >
- Dev Login
- </LoginButton>
- ))}
- </Flex>
+ ))}
</Flex>
</Flex>
- </Card>
+ </Flex>
</Flex>
);
};