Commit 994ce1cb authored by BBeretta's avatar BBeretta

feat/language-translation (Prettier fixes)

parent 82912fd2
import {
DatabaseFilled,
FullscreenOutlined,
LoginOutlined,
LogoutOutlined,
SettingFilled,
TeamOutlined,
UserOutlined,
} from "@ant-design/icons";
import { App, Avatar, Dropdown } from "antd"; import { App, Avatar, Dropdown } from "antd";
import classNames from "classnames"; import classNames from "classnames";
import React, { useEffect } from "react"; import React, { useEffect } from "react";
...@@ -32,16 +41,6 @@ import { ...@@ -32,16 +41,6 @@ import {
initWASM, initWASM,
} from "./utils"; } from "./utils";
import {
LoginOutlined,
LogoutOutlined,
FullscreenOutlined,
DatabaseFilled,
UserOutlined,
TeamOutlined,
SettingFilled
} from "@ant-design/icons";
const NeosConfig = useConfig(); const NeosConfig = useConfig();
export const loader: LoaderFunction = async () => { export const loader: LoaderFunction = async () => {
...@@ -125,14 +124,20 @@ export const Component = () => { ...@@ -125,14 +124,20 @@ export const Component = () => {
{ {
label: ( label: (
<a href={NeosConfig.profileUrl} target="_blank"> <a href={NeosConfig.profileUrl} target="_blank">
<><UserOutlined style={{fontSize: '16px'}} /> <strong>{i18n("PersonalCenter")}</strong></> <>
<UserOutlined style={{ fontSize: "16px" }} />{" "}
<strong>{i18n("PersonalCenter")}</strong>
</>
</a> </a>
), ),
}, },
{ {
label: ( label: (
<a href="https://ygobbs.com" target="_blank"> <a href="https://ygobbs.com" target="_blank">
<><TeamOutlined style={{fontSize: '16px'}} /> <strong>{i18n("MyCardCommunity")}</strong></> <>
<TeamOutlined style={{ fontSize: "16px" }} />{" "}
<strong>{i18n("MyCardCommunity")}</strong>
</>
</a> </a>
), ),
}, },
...@@ -142,15 +147,27 @@ export const Component = () => { ...@@ -142,15 +147,27 @@ export const Component = () => {
href="https://mycard.moe/ygopro/arena/#/" href="https://mycard.moe/ygopro/arena/#/"
target="_blank" target="_blank"
> >
<><DatabaseFilled style={{fontSize: '16px'}} /> <strong>{i18n("DuelDatabase")}</strong></> <>
<DatabaseFilled style={{ fontSize: "16px" }} />{" "}
<strong>{i18n("DuelDatabase")}</strong>
</>
</a> </a>
), ),
}, },
{ {
label: <><SettingFilled /> <strong>{i18n("SystemSettings")}</strong></>, label: (
<>
<SettingFilled />{" "}
<strong>{i18n("SystemSettings")}</strong>
</>
),
onClick: () => { onClick: () => {
modal.info({ modal.info({
content: <><Setting /></>, content: (
<>
<Setting />
</>
),
centered: true, centered: true,
maskClosable: true, maskClosable: true,
icon: null, icon: null,
...@@ -159,11 +176,28 @@ export const Component = () => { ...@@ -159,11 +176,28 @@ export const Component = () => {
}, },
}, },
{ {
label: <><strong style={{ color: '#1890ff' }}><FullscreenOutlined style={{fontSize: '16px'}}/> {i18n("Fullscreen")}</strong></>, label: (
<>
<strong style={{ color: "#1890ff" }}>
<FullscreenOutlined style={{ fontSize: "16px" }} />{" "}
{i18n("Fullscreen")}
</strong>
</>
),
onClick: () => document.documentElement.requestFullscreen(), onClick: () => document.documentElement.requestFullscreen(),
}, },
{ {
label: logined ? <><LogoutOutlined style={{fontSize: '16px'}}/> <strong>{i18n("LogOut")}</strong></> : <><LoginOutlined style={{fontSize: '16px'}}/> <strong>{i18n("Login")}</strong></>, label: logined ? (
<>
<LogoutOutlined style={{ fontSize: "16px" }} />{" "}
<strong>{i18n("LogOut")}</strong>
</>
) : (
<>
<LoginOutlined style={{ fontSize: "16px" }} />{" "}
<strong>{i18n("Login")}</strong>
</>
),
onClick: logined ? onLogout : onLogin, onClick: logined ? onLogout : onLogin,
danger: logined ? true : false, danger: logined ? true : false,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment