l-min-components 1.0.715 → 1.0.722
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/AppMainLayout/index.jsx +14 -0
- package/src/components/index.js +2 -0
- package/src/components/mobileLayout/assets/images/apple_store.png +0 -0
- package/src/components/mobileLayout/assets/images/bg_img.png +0 -0
- package/src/components/mobileLayout/assets/images/play_store.png +0 -0
- package/src/components/mobileLayout/assets/svg/backArrow.jsx +28 -0
- package/src/components/mobileLayout/index.jsx +43 -0
- package/src/components/mobileLayout/index.styled.js +80 -0
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ import EnterpriseRightBar from "../fileRightBar/enterpriseRightBar";
|
|
|
27
27
|
import PersonalRightBar from "../fileRightBar/personalRightBar";
|
|
28
28
|
import useHeader from "../header/getHeaderDetails";
|
|
29
29
|
import GracePeriod from "../deactivated";
|
|
30
|
+
import MobileLayout from "../mobileLayout";
|
|
30
31
|
|
|
31
32
|
const AppMainLayout = () => {
|
|
32
33
|
const [isOpen, setIsOpen] = useState(true);
|
|
@@ -51,6 +52,14 @@ const AppMainLayout = () => {
|
|
|
51
52
|
const [newNotifications, setNewNotifications] = useState([]);
|
|
52
53
|
const [deactivated, setDeactivated] = useState(true); // testing, until we get account setup
|
|
53
54
|
const [gracePeriod, setGracePeriod] = useState(true); // test
|
|
55
|
+
const [deviceWidth, setDeviceWidth] = useState(window.innerWidth);
|
|
56
|
+
|
|
57
|
+
// for mobile view
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const handleResize = () => setDeviceWidth(window.innerWidth);
|
|
60
|
+
window.addEventListener("resize", handleResize);
|
|
61
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
62
|
+
}, []);
|
|
54
63
|
|
|
55
64
|
const {
|
|
56
65
|
setDefaultAccount,
|
|
@@ -175,6 +184,10 @@ const AppMainLayout = () => {
|
|
|
175
184
|
handleGetNotificationMarkRead,
|
|
176
185
|
}}
|
|
177
186
|
>
|
|
187
|
+
{/* display mobile layout on device width*/}
|
|
188
|
+
{deviceWidth < 1024 ? (
|
|
189
|
+
<MobileLayout />
|
|
190
|
+
) : (
|
|
178
191
|
<Layout
|
|
179
192
|
coming={coming}
|
|
180
193
|
hasLayoutBackgroundImage={hasLayoutBackgroundImage}
|
|
@@ -272,6 +285,7 @@ const AppMainLayout = () => {
|
|
|
272
285
|
)}
|
|
273
286
|
</MainLayout>
|
|
274
287
|
</Layout>
|
|
288
|
+
)}
|
|
275
289
|
</OutletContext.Provider>
|
|
276
290
|
);
|
|
277
291
|
};
|
package/src/components/index.js
CHANGED
|
@@ -49,3 +49,5 @@ export { default as AdminSecurity } from './AdminSecuritySettings';
|
|
|
49
49
|
export { default as GraphMap } from './GraphMap';
|
|
50
50
|
export { default as AdminRolesPermissions } from './AdminRolesPermission';
|
|
51
51
|
export { default as AdminCreateRolesPermissions } from './AdminRolesPermission/create';
|
|
52
|
+
export { default as MobileLayout } from './mobileLayout';
|
|
53
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const BackArrow = ({ width, height, fill }) => (
|
|
3
|
+
<svg
|
|
4
|
+
width="24"
|
|
5
|
+
height="24"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
d="M9.57 5.92969L3.5 11.9997L9.57 18.0697"
|
|
12
|
+
stroke="#313333"
|
|
13
|
+
stroke-width="1.5"
|
|
14
|
+
stroke-miterlimit="10"
|
|
15
|
+
stroke-linecap="round"
|
|
16
|
+
stroke-linejoin="round"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M20.5019 12H3.67188"
|
|
20
|
+
stroke="#313333"
|
|
21
|
+
stroke-width="1.5"
|
|
22
|
+
stroke-miterlimit="10"
|
|
23
|
+
stroke-linecap="round"
|
|
24
|
+
stroke-linejoin="round"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
);
|
|
28
|
+
export default BackArrow;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
2
|
+
import { MobileLayoutContainer } from "./index.styled";
|
|
3
|
+
import BackArrow from "./assets/svg/backArrow";
|
|
4
|
+
import img from "./assets/images/bg_img.png";
|
|
5
|
+
import play from "./assets/images/play_store.png";
|
|
6
|
+
import apple from "./assets/images/apple_store.png";
|
|
7
|
+
|
|
8
|
+
const MobileLayout = () => {
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<MobileLayoutContainer>
|
|
12
|
+
<div className="mlc_header">
|
|
13
|
+
<span>
|
|
14
|
+
<BackArrow /> Back
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div className="mlc_img">
|
|
18
|
+
<img src={img} alt="bg" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div className="mlc_note_container">
|
|
22
|
+
<p className="mlc_note_title">
|
|
23
|
+
Sorry, you can’t access <br /> your account on a mobile browser.
|
|
24
|
+
</p>
|
|
25
|
+
<p className="mlc_note_subtitle">
|
|
26
|
+
We know it's inconvenient. For better user accessibility, login with a
|
|
27
|
+
desktop device or via our mobile app.
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<div className="mlc_link_section">
|
|
31
|
+
<a href="#">
|
|
32
|
+
<img src={play} alt="play store" />
|
|
33
|
+
</a>
|
|
34
|
+
<a href="#">
|
|
35
|
+
<img src={apple} alt="apple store" />
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</MobileLayoutContainer>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default MobileLayout;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const MobileLayoutContainer = styled.div`
|
|
4
|
+
padding: 20px;
|
|
5
|
+
background: #fff;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
.mlc_header {
|
|
8
|
+
display: flex;
|
|
9
|
+
margin-bottom: 16px;
|
|
10
|
+
span {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
color: #313333;
|
|
16
|
+
font-family: "Nunito";
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: normal;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mlc_img {
|
|
24
|
+
max-width: 208px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
margin: 0 auto 30px;
|
|
28
|
+
img {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mlc_note_container {
|
|
34
|
+
max-width: 350px;
|
|
35
|
+
width: 100%;
|
|
36
|
+
padding: 30px 18px;
|
|
37
|
+
border-radius: 15px;
|
|
38
|
+
background: #f5f7f7;
|
|
39
|
+
margin: 0 auto;
|
|
40
|
+
|
|
41
|
+
.mlc_note_title {
|
|
42
|
+
margin-bottom: 16px;
|
|
43
|
+
color: #313333;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-family: "Nunito";
|
|
46
|
+
font-size: 25px;
|
|
47
|
+
font-weight: 500;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mlc_note_subtitle {
|
|
51
|
+
margin-bottom: 0;
|
|
52
|
+
color: #636666;
|
|
53
|
+
text-align: center;
|
|
54
|
+
font-family: "Nunito";
|
|
55
|
+
font-size: 18px;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mlc_link_section {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
margin: 30px 0 auto;
|
|
64
|
+
align-items: center;
|
|
65
|
+
|
|
66
|
+
a {
|
|
67
|
+
max-width: 291px;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 50px;
|
|
70
|
+
|
|
71
|
+
&:last-child {
|
|
72
|
+
margin-top: 12px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
img {
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|