From bba10b30e351653eea568cb34f6046f519a505ae Mon Sep 17 00:00:00 2001 From: srgooglo Date: Sun, 29 May 2022 18:24:35 +0200 Subject: [PATCH] split modalCard --- .../app/src/components/AboutApp/index.jsx | 85 ++++++++++--------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/packages/app/src/components/AboutApp/index.jsx b/packages/app/src/components/AboutApp/index.jsx index c6f4de5d..cf20e562 100644 --- a/packages/app/src/components/AboutApp/index.jsx +++ b/packages/app/src/components/AboutApp/index.jsx @@ -1,7 +1,7 @@ import React from "react" import ReactDOM from "react-dom" import * as antd from "antd" -import { Card, Mask } from "antd-mobile" +import { Card as ACard, Mask as AMask } from "antd-mobile" import { Icons } from "components/Icons" import { DiReact } from "react-icons/di" @@ -10,7 +10,48 @@ import config from "config" import "./index.less" -export const AboutCard = (props) => { +export const Card = (props) => { + const isProduction = import.meta.env.PROD + const isWSMainConnected = window.app.ws.mainSocketConnected + const WSMainOrigin = app.ws.sockets.main.io.uri + + return +
+

{config.app.siteName}

+ {config.author} + Licensed with {config.package?.license ?? "unlicensed"} +
+
+ v{window.app.version ?? "experimental"} + + {isProduction ? : } + {String(import.meta.env.MODE)} + +
+ + } + > +
+

Server information

+
+ {WSMainOrigin} +
+
+
+

Versions

+
+ eVite v{window.app.__eviteVersion ?? "experimental"} + v{React.version ?? "experimental"} +
+
+
+} + +export const ModalCard = (props) => { const [visible, setVisible] = React.useState(false) React.useEffect(() => { @@ -24,45 +65,9 @@ export const AboutCard = (props) => { }, 150) } - const isProduction = import.meta.env.PROD - const isWSMainConnected = window.app.ws.mainSocketConnected - const WSMainOrigin = app.ws.sockets.main.io.uri - return close()}>
- -
-

{config.app.siteName}

- {config.author} -
-
- v{window.app.version ?? "experimental"} - - {isProduction ? : } - {String(import.meta.env.MODE)} - -
-
- } - > -
-

Server information

-
- {WSMainOrigin} -
-
-
-

Versions

-
- eVite v{window.app.__eviteVersion ?? "experimental"} - v{React.version ?? "experimental"} -
-
- +
} @@ -76,5 +81,5 @@ export function openModal() { document.body.removeChild(component) } - ReactDOM.render(, component) + ReactDOM.render(, component) } \ No newline at end of file