Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix login bg && add welcome text #941

Merged
merged 7 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions web/src/chakraThemeDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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
24 changes: 24 additions & 0 deletions web/src/layouts/Auth/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@
background-position: left bottom;
background-size: 60%;
}

.welcomeWrap {
position: absolute;
top: 120px;
left: 120px;
}

.welcomeText {
font-family: 'PingFang SC';
font-style: normal;
font-weight: 500;
font-size: 36px;
// line-height: 20px;
color: #00A99D;
LeezQ marked this conversation as resolved.
Show resolved Hide resolved
}

.sloganText {
font-family: 'PingFang SC';
font-style: normal;
font-weight: 400;
font-size: 20px;
// line-height: 20px;
color: #787A90;
}
LeezQ marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions web/src/layouts/Auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import styles from "./index.module.scss";
export default function LoginReg() {
return (
<div className={clsx(styles.container)}>
<div className={styles.welcomeWrap}>
<div className={styles.welcomeText}>Welcome to laf !</div>
<div className={styles.sloganText}>life is short, you need laf.</div>
</div>
<Outlet />
</div>
);
Expand Down
5 changes: 3 additions & 2 deletions web/src/layouts/Header/UserSetting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
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 All @@ -10,6 +10,7 @@ import UserInfo from "@/pages/app/setting/UserInfo";
export default function UserSetting(props: { name: string; avatar?: string; width: string }) {
const { t } = useTranslation();
const { toggleColorMode } = useColorMode();
const navigate = useNavigate();
return (
<Menu>
<MenuButton>
Expand Down Expand Up @@ -65,7 +66,7 @@ export default function UserSetting(props: { name: string; avatar?: string; widt
<MenuItem
onClick={() => {
localStorage.clear();
LeezQ marked this conversation as resolved.
Show resolved Hide resolved
(window as any).location.href = (VITE_SERVER_BASE_URL + "/login") as string;
navigate("/login", { replace: true });
}}
>
{t("Logout")}
LeezQ marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
9 changes: 0 additions & 9 deletions web/src/layouts/LoginReg.tsx

This file was deleted.