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 all 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
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")}
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.