From 07ed834b27bcb4ebff7be534de8bfaa5e7d9f08d Mon Sep 17 00:00:00 2001 From: Chell Date: Sat, 5 Nov 2022 15:46:52 +0100 Subject: [PATCH] fix: system info mobile view (#1261) --- web/src/SystemInfo.js | 91 ++++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 31 deletions(-) diff --git a/web/src/SystemInfo.js b/web/src/SystemInfo.js index 09ffe5ae..ba781702 100644 --- a/web/src/SystemInfo.js +++ b/web/src/SystemInfo.js @@ -90,37 +90,66 @@ class SystemInfo extends React.Component { : i18next.t("system:Get Memory Usage Failed") ); - return ( - - - - - - - {this.state.loading ? : CPUInfo} - - - - - {this.state.loading ? : MemInfo} - - - - - -
{i18next.t("system:An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS")}
- GitHub: casdoor -
- {i18next.t("system:Version")}: {this.state.latestVersion} -
- {i18next.t("system:Official Website")}: casdoor.org -
- {i18next.t("system:Community")}: contact us -
- - -
- ); + if (!Setting.isMobile()) { + return ( + + + + + + + {this.state.loading ? : CPUInfo} + + + + + {this.state.loading ? : MemInfo} + + + + + +
{i18next.t("system:An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS")}
+ GitHub: casdoor +
+ {i18next.t("system:Version")}: {this.state.latestVersion} +
+ {i18next.t("system:Official Website")}: casdoor.org +
+ {i18next.t("system:Community")}: contact us +
+ + +
+ ); + } else { + return ( + + + + {this.state.loading ? : CPUInfo} + + + + + {this.state.loading ? : MemInfo} + + + + +
{i18next.t("system:An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS")}
+ GitHub: casdoor +
+ {i18next.t("system:Version")}: {this.state.latestVersion} +
+ {i18next.t("system:Official Website")}: casdoor.org +
+ {i18next.t("system:Community")}: contact us +
+ +
+ ); + } } }