Skip to content

Commit

Permalink
feat(web): fix login bg && add welcome text (#941)
Browse files Browse the repository at this point in the history
* fix: sign up provider err

* styles: sign in page ui bg fix && add welcome text

* fix: login page color

* fix: login text color to theme color

* fix: auth css

* fix: auth logout
  • Loading branch information
walle233 authored Mar 24, 2023
1 parent 971b484 commit 6baf800
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
10 changes: 10 additions & 0 deletions web/src/chakraThemeDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ const Button = defineStyleConfig({
},
},

thirdly: {
color: "lafDark.1000",
bg: "lafDark.300",
_hover: {
bg: "lafDark.400",
},
border: "1px solid",
rounded: "md",
},

plain: {
bg: "grayModern.100",
color: "grayModern.500",
Expand Down
2 changes: 0 additions & 2 deletions web/src/layouts/Auth/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.container {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
background-color: #edf1f5;
Expand Down
7 changes: 5 additions & 2 deletions web/src/layouts/Auth/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Outlet } from "react-router-dom";
import clsx from "clsx";

import styles from "./index.module.scss";

export default function LoginReg() {
return (
<div className={clsx(styles.container)}>
<div className={styles.container}>
<div className="absolute top-[120px] left-[120px]">
<div className="text-primary-600 text-[36px]">Welcome to laf !</div>
<div className="text-grayModern-500 text-[20px]">life is short, you need laf.</div>
</div>
<Outlet />
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions web/src/layouts/Header/UserSetting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useTranslation } from "react-i18next";
import { Avatar, Menu, MenuButton, MenuItem, MenuList, useColorMode } from "@chakra-ui/react";

import { VITE_SERVER_BASE_URL } from "@/constants";
import i18n from "@/utils/i18n";

import SettingModal, { TabKeys } from "@/pages/app/setting";
Expand Down Expand Up @@ -64,8 +63,9 @@ export default function UserSetting(props: { name: string; avatar?: string; widt

<MenuItem
onClick={() => {
localStorage.clear();
(window as any).location.href = (VITE_SERVER_BASE_URL + "/login") as string;
localStorage.removeItem("token");
localStorage.setItem("chakra-ui-color-mode", "light");
window.location.href = "/login";
}}
>
{t("Logout")}
Expand Down
9 changes: 0 additions & 9 deletions web/src/layouts/LoginReg.tsx

This file was deleted.

0 comments on commit 6baf800

Please sign in to comment.