Browse Source

:fire: 去掉用户登录下面的多余链接

visuddhinanda 3 năm trước cách đây
mục cha
commit
c5025c3311

+ 20 - 37
dashboard/src/layouts/anonymous/index.tsx

@@ -4,43 +4,26 @@ import UiLangSelect from "../../components/general/UiLangSelect";
 import img_banner from "../../assets/library/images/wikipali_logo_library.svg";
 
 const Widget = () => {
-	return (
-		<>
-			<Layout style={{ textAlign: "right", backgroundColor: "#3e3e3e" }}>
-				<UiLangSelect />
-			</Layout>
-			<div style={{ paddingTop: "3em", backgroundColor: "#3e3e3e" }}>
-				<Row>
-					<Col flex="auto"></Col>
-					<Col flex="400px" style={{ padding: "1em" }}>
-						<img
-							alt="logo"
-							style={{ height: "5em" }}
-							src={img_banner}
-						/>
-					</Col>
-					<Col flex="400px" style={{ padding: "1em" }}>
-						<Outlet />
-						<div>
-							<Space>
-								<Link to="/anonymous/users/sign-in">
-									Sign in
-								</Link>
-								<Link to="/anonymous/users/sign-up">
-									Sign up
-								</Link>
-								<Link to="/anonymous/users/forgot-password">
-									Forgot password
-								</Link>
-							</Space>
-						</div>
-					</Col>
-					<Col flex="auto"></Col>
-				</Row>
-			</div>
-			<div>anonymous layout footer</div>
-		</>
-	);
+  return (
+    <>
+      <Layout style={{ textAlign: "right", backgroundColor: "#3e3e3e" }}>
+        <UiLangSelect />
+      </Layout>
+      <div style={{ paddingTop: "3em", backgroundColor: "#3e3e3e" }}>
+        <Row>
+          <Col flex="auto"></Col>
+          <Col flex="400px" style={{ padding: "1em" }}>
+            <img alt="logo" style={{ height: "5em" }} src={img_banner} />
+          </Col>
+          <Col flex="400px" style={{ padding: "1em" }}>
+            <Outlet />
+          </Col>
+          <Col flex="auto"></Col>
+        </Row>
+      </div>
+      <div>anonymous layout footer</div>
+    </>
+  );
 };
 
 export default Widget;

+ 2 - 1
dashboard/src/locales/zh-Hans/nut/index.ts

@@ -1,7 +1,8 @@
 const items = {
-  "nut.users.sign-in.title": "欢迎登录",
+  "nut.users.sign-in.title": "登录",
   "nut.users.sign-up.title": "新用户注册",
   "nut.users.logs.title": "日志列表",
+  "nut.users.forgot-password.title": "忘记密码",
 };
 
 export default items;

+ 7 - 5
dashboard/src/pages/nut/users/forgot-password.tsx

@@ -1,12 +1,14 @@
 import { Card } from "antd";
 import ForgotPassword from "../../../components/nut/users/ForgotPassword";
+import NonSignInSharedLinks from "../../../components/nut/users/NonSignInSharedLinks";
 
 const Widget = () => {
-	return (
-		<Card title="忘记密码">
-			<ForgotPassword />
-		</Card>
-	);
+  return (
+    <Card title="重置密码">
+      <ForgotPassword />
+      <NonSignInSharedLinks />
+    </Card>
+  );
 };
 
 export default Widget;

+ 10 - 1
dashboard/src/pages/nut/users/reset-password.tsx

@@ -1,5 +1,14 @@
+import { Card } from "antd";
+import ForgotPassword from "../../../components/nut/users/ForgotPassword";
+import NonSignInSharedLinks from "../../../components/nut/users/NonSignInSharedLinks";
+
 const Widget = () => {
-  return <div>reset password</div>;
+  return (
+    <Card title="重置密码">
+      <ForgotPassword />
+      <NonSignInSharedLinks />
+    </Card>
+  );
 };
 
 export default Widget;

+ 11 - 13
dashboard/src/pages/nut/users/sign-in.tsx

@@ -1,20 +1,18 @@
 import SignInForm from "../../../components/nut/users/SignIn";
 import SharedLinks from "../../../components/nut/users/NonSignInSharedLinks";
-import { Card } from "antd";
+import { Card, Space } from "antd";
 
 const Widget = () => {
-	return (
-		<div>
-			<Card title="登录">
-				<div>
-					<SignInForm />
-				</div>
-				<div>
-					<SharedLinks />
-				</div>
-			</Card>
-		</div>
-	);
+  return (
+    <div>
+      <Card title="登录">
+        <Space direction="vertical">
+          <SignInForm />
+          <SharedLinks />
+        </Space>
+      </Card>
+    </div>
+  );
 };
 
 export default Widget;

+ 10 - 2
dashboard/src/pages/nut/users/sign-up.tsx

@@ -1,12 +1,20 @@
+import { Card } from "antd";
+import { useIntl } from "react-intl";
 import SharedLinks from "../../../components/nut/users/NonSignInSharedLinks";
 
 const Widget = () => {
+  const intl = useIntl();
+
   return (
-    <div>
+    <Card
+      title={intl.formatMessage({
+        id: "nut.users.sign-in.title",
+      })}
+    >
       sign up
       <br />
       <SharedLinks />
-    </div>
+    </Card>
   );
 };