From 860db2916fe59c4d2233be377c528754863a599f Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 8 Jun 2022 17:41:38 +0300 Subject: [PATCH] Web: Client: Settings: add ip security loader --- .../security/access-portal/ipSecurity.js | 6 ++ .../loaders/ip-security-loader.js | 66 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/loaders/ip-security-loader.js diff --git a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/access-portal/ipSecurity.js b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/access-portal/ipSecurity.js index 7a9fcdafd7..4317605fc9 100644 --- a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/access-portal/ipSecurity.js +++ b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/access-portal/ipSecurity.js @@ -12,6 +12,8 @@ import { size } from "@appserver/components/utils/device"; import { saveToSessionStorage, getFromSessionStorage } from "../../../utils"; import isEqual from "lodash/isEqual"; import SaveCancelButtons from "@appserver/components/save-cancel-buttons"; +import { isMobile } from "react-device-detect"; +import IpSecurityLoader from "../sub-components/loaders/ip-security-loader"; const MainContainer = styled.div` width: 100%; @@ -164,6 +166,10 @@ const IpSecurity = (props) => { setShowReminder(false); }; + if (isMobile && !isInit && !isLoading) { + return ; + } + return ( diff --git a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/loaders/ip-security-loader.js b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/loaders/ip-security-loader.js new file mode 100644 index 0000000000..3fcc158249 --- /dev/null +++ b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/loaders/ip-security-loader.js @@ -0,0 +1,66 @@ +import React from "react"; +import styled from "styled-components"; +import Loaders from "@appserver/common/components/Loaders"; + +const StyledLoader = styled.div` + padding-right: 8px; + + .header { + width: 273px; + margin-bottom: 16px; + } + + .description { + margin-bottom: 12px; + } + + .checkboxs { + display: flex; + flex-direction: column; + gap: 8px; + width: 50px; + margin-bottom: 15px; + } + + .add-button { + width: 85px; + margin-bottom: 16px; + } + + .block { + display: flex; + flex-direction: column; + gap: 8px; + } + + .buttons { + width: calc(100% - 32px); + position: absolute; + bottom: 16px; + } +`; + +const IpSecurityLoader = () => { + return ( + + + + +
+ + +
+ + + +
+ + +
+ + +
+ ); +}; + +export default IpSecurityLoader;