From 20877863db60e5dbb77e307b49842b4bcf357989 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Thu, 1 Dec 2022 19:40:59 +0000 Subject: [PATCH] refactor: Remove login banner --- site/src/components/SignInForm/SignInForm.tsx | 11 +- site/src/i18n/en/loginPage.json | 3 +- site/src/pages/LoginPage/LoginPageView.tsx | 166 +++--------------- 3 files changed, 32 insertions(+), 148 deletions(-) diff --git a/site/src/components/SignInForm/SignInForm.tsx b/site/src/components/SignInForm/SignInForm.tsx index 71e31e6c5e628..fe631755926cf 100644 --- a/site/src/components/SignInForm/SignInForm.tsx +++ b/site/src/components/SignInForm/SignInForm.tsx @@ -57,15 +57,9 @@ const validationSchema = Yup.object({ }) const useStyles = makeStyles((theme) => ({ - wrapper: { - maxWidth: 385, + root: { width: "100%", - - [theme.breakpoints.down("sm")]: { - maxWidth: "none", - }, }, - title: { fontSize: theme.spacing(4), fontWeight: 400, @@ -77,7 +71,6 @@ const useStyles = makeStyles((theme) => ({ fontWeight: 600, }, }, - buttonIcon: { width: 14, height: 14, @@ -145,7 +138,7 @@ export const SignInForm: FC> = ({ const loginPageTranslation = useTranslation("loginPage") return ( -
+

{loginPageTranslation.t("signInTo")}{" "} {commonTranslation.t("coder")} diff --git a/site/src/i18n/en/loginPage.json b/site/src/i18n/en/loginPage.json index dad411cba4425..329dc925a2e8e 100644 --- a/site/src/i18n/en/loginPage.json +++ b/site/src/i18n/en/loginPage.json @@ -1,4 +1,3 @@ { - "signInTo": "Sign in to", - "tipCaption": "Coder Tip" + "signInTo": "Sign in to" } diff --git a/site/src/pages/LoginPage/LoginPageView.tsx b/site/src/pages/LoginPage/LoginPageView.tsx index 4c8748073f9d9..d2cf1cfdd1ded 100644 --- a/site/src/pages/LoginPage/LoginPageView.tsx +++ b/site/src/pages/LoginPage/LoginPageView.tsx @@ -1,15 +1,11 @@ import { makeStyles } from "@material-ui/core/styles" -import { Logo } from "components/Icons/Logo" import { FullScreenLoader } from "components/Loader/FullScreenLoader" import { FC } from "react" import { useLocation } from "react-router-dom" import { AuthContext } from "xServices/auth/authXService" import { LoginErrors, SignInForm } from "components/SignInForm/SignInForm" import { retrieveRedirect } from "util/redirect" -import { Pill } from "components/Pill/Pill" -import { useTranslation } from "react-i18next" -import IdeaIcon from "@material-ui/icons/EmojiObjects" -import { colors } from "theme/colors" +import { CoderIcon } from "components/Icons/CoderIcon" interface LocationState { isRedirect: boolean @@ -35,163 +31,59 @@ export const LoginPageView: FC = ({ const { authError, getUserError, checkPermissionsError, getMethodsError } = context const styles = useStyles() - const { t } = useTranslation("loginPage") return isLoading ? ( ) : ( -
-
- - -
- -
- +
+
+ +
Copyright © 2022 Coder Technologies, Inc.
- -
-
- } - text={t("tipCaption")} - className={styles.pill} - type="secondary" - /> -
-

Scheduling

-

- Coder automates your cloud cost control by ensuring developer - resources are only online while used. -

- -
-
-
) } const useStyles = makeStyles((theme) => ({ - container: { - padding: theme.spacing(5), - margin: "auto", - display: "flex", - height: "100vh", - - [theme.breakpoints.down("md")]: { - height: "auto", - minHeight: "100vh", - }, - - [theme.breakpoints.down("sm")]: { - padding: theme.spacing(4), - }, - }, - - left: { - flex: 1, - display: "flex", - flexDirection: "column", - gap: theme.spacing(4), - }, - - right: { - flex: 1, - - [theme.breakpoints.down("md")]: { - display: "none", - }, - }, - - formSection: { - flex: 1, + root: { + padding: theme.spacing(3), display: "flex", alignItems: "center", justifyContent: "center", + minHeight: "100vh", + textAlign: "center", }, - footer: { - fontSize: 12, - color: theme.palette.text.secondary, - }, - - tipWrapper: { + container: { width: "100%", - height: "100%", - borderRadius: theme.shape.borderRadius, - background: theme.palette.background.paper, - padding: theme.spacing(5), + maxWidth: 385, display: "flex", - justifyContent: "center", + flexDirection: "column", alignItems: "center", - position: "relative", - }, - - pill: { - position: "absolute", - top: theme.spacing(3), - right: theme.spacing(3), - fontWeight: 600, - fontSize: 10, - letterSpacing: "0.1em", - textTransform: "uppercase", - background: theme.palette.divider, - border: 0, - padding: theme.spacing(0, 1.5), - height: theme.spacing(3.5), + gap: theme.spacing(2), }, - pillIcon: { - color: colors.yellow[5], + icon: { + fontSize: theme.spacing(8), }, - tipContent: { - maxWidth: 570, - textAlign: "center", - fontSize: 16, + footer: { + fontSize: 12, color: theme.palette.text.secondary, - lineHeight: "160%", - - "& p": { - maxWidth: 440, - margin: "auto", - }, - - "& strong": { - color: theme.palette.text.primary, - }, - }, - - tipTitle: { - fontWeight: 400, - fontSize: 24, - margin: 0, - lineHeight: 1, - marginBottom: theme.spacing(2), - color: theme.palette.text.primary, - }, - - tipImage: { - maxWidth: 570, - marginTop: theme.spacing(4), + marginTop: theme.spacing(3), }, }))