Skip to content

Commit ccecec5

Browse files
authored
Merge pull request #149 from OpenSignLabs/staging
v1.0.3
2 parents 66f91d2 + d4be4ae commit ccecec5

File tree

24 files changed

+470
-168
lines changed

24 files changed

+470
-168
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,15 @@
169169
"contributions": [
170170
"bug"
171171
]
172+
},
173+
{
174+
"login": "lsprr",
175+
"name": "Luis Parra",
176+
"avatar_url": "https://avatars.githubusercontent.com/u/16653744?v=4",
177+
"profile": "https://luisparra.dev",
178+
"contributions": [
179+
"a11y"
180+
]
172181
}
173182
]
174183
}

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ [email protected]
4747

4848
# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
4949
PFX_BASE64=
50+
51+
# Provide Pass pharse of above PFX or p12 document
52+
PASS_PHRASE=

.env.local_dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ [email protected]
5151

5252
# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
5353
PFX_BASE64=
54+
55+
# Provide Pass pharse of above PFX or p12 document
56+
PASS_PHRASE=

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ We would like to thank all our contributors and users for their support and feed
124124
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andrew-opensignlabs"><img src="https://avatars.githubusercontent.com/u/148278535?v=4?s=100" width="100px;" alt="Andrew"/><br /><sub><b>Andrew</b></sub></a><br /><a href="#code-andrew-opensignlabs" title="Code">💻</a></td>
125125
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rishabjasrotia"><img src="https://avatars.githubusercontent.com/u/33950743?v=4?s=100" width="100px;" alt="Rishab"/><br /><sub><b>Rishab</b></sub></a><br /><a href="#code-rishabjasrotia" title="Code">💻</a></td>
126126
<td align="center" valign="top" width="14.28%"><a href="https://session.it"><img src="https://avatars.githubusercontent.com/u/327285?v=4?s=100" width="100px;" alt="Maurizio Pillitu"/><br /><sub><b>Maurizio Pillitu</b></sub></a><br /><a href="#bug-maoo" title="Bug reports">🐛</a></td>
127+
<td align="center" valign="top" width="14.28%"><a href="https://luisparra.dev"><img src="https://avatars.githubusercontent.com/u/16653744?v=4?s=100" width="100px;" alt="Luis Parra"/><br /><sub><b>Luis Parra</b></sub></a><br /><a href="#a11y-lsprr" title="Accessibility">️️️️♿️</a></td>
127128
</tr>
128129
</tbody>
129130
</table>

apps/OpenSign/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"web-vitals": "^2.1.4"
4141
},
4242
"scripts": {
43-
"start": "mf-cra start",
44-
"start-prod": "serve -s build",
43+
"start": "serve -s build",
44+
"start-dev": "mf-cra start",
4545
"build": "rm -rf public/mfbuild && npm run micro && CI=false && mf-cra build",
4646
"micro": "cd ../../microfrontends/SignDocuments && npm install && npm run build",
4747
"test": "react-scripts test",

apps/OpenSign/src/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import PageNotFound from "./routes/PageNotFound";
1414
import ForgetPassword from "./routes/ForgetPassword";
1515
import ChangePassword from "./routes/ChangePassword";
1616
import ReportMicroapp from "./components/ReportMicroapp";
17+
import LoadMf from "./routes/LoadMf";
1718

1819
function App() {
1920
const [isloading, setIsLoading] = useState(true);
@@ -59,6 +60,7 @@ function App() {
5960
<Routes>
6061
<Route exact path="/" element={<Login />} />
6162
<Route exact path="/signup" element={<Signup />} />
63+
<Route exact path="/loadmf/:remoteApp/*" element={<LoadMf />} />
6264
<Route exact path="/forgetpassword" element={<ForgetPassword />} />
6365
{process.env.REACT_APP_ENABLE_SUBSCRIPTION && (
6466
<>

apps/OpenSign/src/components/fields/FileUpload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const FileUpload = (props) => {
8282
progress: (progressValue, loaded, total, { type }) => {
8383
if (type === "upload" && progressValue !== null) {
8484
const percentCompleted = Math.round((loaded * 100) / total);
85-
console.log("percentCompleted ", percentCompleted);
85+
// console.log("percentCompleted ", percentCompleted);
8686
setpercentage(percentCompleted);
8787
}
8888
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
import { NavLink } from "react-router-dom";
3+
4+
const Menu = ({ item, isOpen, closeSidebar }) => {
5+
return (
6+
<li key={item.title} role="none">
7+
<NavLink
8+
to={`/${item.pageType}/${item.objectId}`}
9+
className="mx-auto flex items-center hover:bg-[#eef1f5] p-3 lg:p-4"
10+
onClick={closeSidebar}
11+
tabIndex={isOpen ? 0 : -1}
12+
role="menuitem"
13+
>
14+
<i className={`${item.icon} text-[18px]`} aria-hidden="true"></i>
15+
<span className="ml-3 lg:ml-4">{item.title}</span>
16+
</NavLink>
17+
</li>
18+
)
19+
}
20+
21+
export default Menu;

apps/OpenSign/src/components/sidebar/Sidebar.js

Lines changed: 34 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,77 @@
11
import React, { useState, useEffect } from "react";
2-
import { Link, NavLink } from "react-router-dom";
2+
3+
import Menu from './Menu';
34
import Submenu from "./SubMenu";
4-
import dp from "../../assets/images/dp.png";
5+
import SocialMedia from './SocialMedia';
6+
57
import Parse from "parse";
8+
import dp from "../../assets/images/dp.png";
9+
610
const Sidebar = ({ isOpen, closeSidebar }) => {
11+
const [menuList, setmenuList] = useState([]);
712
let username = localStorage.getItem("username");
813
const image = localStorage.getItem("profileImg") || dp;
914
const tenantname = localStorage.getItem("TenantName");
10-
const [menuList, setmenuList] = useState([]);
1115

1216
useEffect(() => {
1317
if (localStorage.getItem("accesstoken")) {
1418
menuItem();
1519
}
1620
}, []);
21+
1722
const menuItem = async () => {
1823
const parseBaseUrl = localStorage.getItem("baseUrl");
1924
const parseAppId = localStorage.getItem("parseAppId");
25+
2026
try {
2127
Parse.serverURL = parseBaseUrl;
2228
Parse.initialize(parseAppId);
2329
var sideMenu = Parse.Object.extend("w_menu");
2430
var query = new Parse.Query(sideMenu);
2531
query.equalTo("objectId", localStorage.getItem("defaultmenuid"));
26-
32+
2733
const results = await query.first();
2834
const resultjson = results.toJSON();
29-
// console.log("resultjson ", resultjson);
3035
let result = resultjson;
3136
setmenuList(result.menuItems);
3237
} catch (e) {
3338
console.error("Problem", e);
3439
}
40+
3541
};
3642

3743
return (
38-
<div
39-
className={`${
40-
isOpen ? "block" : "hidden"
41-
} bg-white text-[#444] h-screen w-full md:w-[300px] overflow-y-auto transform transition-transform z-40 ${
42-
isOpen ? "translate-x-0" : "-translate-x-full"
43-
}`}
44+
<aside
45+
className={`${isOpen ? "block" : "hidden"
46+
} bg-white text-[#444] h-screen w-full md:w-[300px] overflow-y-auto transform transition-transform z-40 ${isOpen ? "translate-x-0" : "-translate-x-full"
47+
}`}
4448
>
4549
<div className="flex px-2 py-3 gap-2 items-center shadow-md">
4650
<div className="w-[75px] h-[75px] rounded-full ring-[2px] ring-offset-2 ring-gray-400 overflow-hidden">
47-
<img className="w-full h-full object-contain" src={image} alt="img" />
51+
<img className="w-full h-full object-cover" src={image} alt="Profile" />
4852
</div>
4953
<div>
50-
<p className="text-[14px] font-bold">{username && username}</p>
51-
<p
52-
className={`text-[12px] ${tenantname && tenantname ? "mt-2" : ""}`}
53-
>
54-
{tenantname && tenantname}
54+
<p className="text-[14px] font-bold">{username}</p>
55+
<p className={`text-[12px] ${tenantname ? "mt-2" : ""}`}>
56+
{tenantname}
5557
</p>
5658
</div>
5759
</div>
58-
<ul className="text-sm">
59-
{menuList.length > 0 && (
60-
<>
61-
{menuList.map((item) =>
62-
!item.children ? (
63-
<li key={item.title} onClick={() => closeSidebar()}>
64-
<Link
65-
className={`mx-auto flex items-center hover:bg-[#eef1f5] p-3 lg:p-4 hover:no-underline cursor-pointer`}
66-
to={`/${item.pageType}/${item.objectId}`}
67-
>
68-
<i className={item.icon + " text-[18px]"}></i>
69-
<span title={item.description} className="ml-3 lg:ml-4">
70-
{item.title}
71-
</span>
72-
</Link>
73-
</li>
74-
) : (
75-
<Submenu key={item.title} icon={item.icon} title={item.title}>
76-
{item.children.map((item) => (
77-
<li key={item.title} onClick={() => closeSidebar()} className="pl-6 md:pl-8 hover:bg-[#eef1f5] cursor-pointer">
78-
<Link
79-
className={`mx-auto flex items-center p-2 lg:p-3 hover:no-underline`}
80-
to={`/${item.pageType}/${item.objectId}`}
81-
>
82-
<i className={item.icon + " text-[18px]"}></i>
83-
<span title={item.description} className="ml-3 lg:ml-4">
84-
{item.title}
85-
</span>
86-
</Link>
87-
</li>
88-
))}
89-
</Submenu>
90-
)
91-
)}
92-
</>
93-
)}
94-
</ul>
95-
<div className="mt-4 flex justify-center items-center text-[25px] text-black gap-3">
96-
<NavLink to="https://github.com/opensignlabs/opensign" target="_blank">
97-
<i className="fa-brands fa-github"></i>
98-
</NavLink>
99-
<NavLink
100-
to="https://www.linkedin.com/company/opensign%E2%84%A2/"
101-
target="_blank"
102-
>
103-
<i className="fa-brands fa-linkedin"></i>
104-
</NavLink>
105-
<NavLink to="https://www.twitter.com/opensignlabs" target="_blank">
106-
<i className="fa-brands fa-square-x-twitter"></i>
107-
</NavLink>
108-
<NavLink to="https://discord.com/invite/xe9TDuyAyj" target="_blank">
109-
<i className="fa-brands fa-discord"></i>
110-
</NavLink>
111-
</div>
112-
</div>
60+
<nav aria-label="OpenSign Sidebar Navigation">
61+
<ul className="text-sm" role="menubar" aria-label="OpenSign Sidebar Navigation">
62+
{menuList.map((item) => (
63+
!item.children ? (
64+
<Menu key={item.title} item={item} isOpen={isOpen} closeSidebar={closeSidebar} />
65+
) : (
66+
<Submenu key={item.title} item={item} closeSidebar={closeSidebar} />
67+
)
68+
))}
69+
</ul>
70+
</nav>
71+
<footer className="mt-4 flex justify-center items-center text-[25px] text-black gap-3">
72+
<SocialMedia />
73+
</footer>
74+
</aside>
11375
);
11476
};
11577

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from "react";
2+
import { NavLink } from "react-router-dom";
3+
4+
const SocialMedia = () => {
5+
return (
6+
<React.Fragment>
7+
<NavLink to="https://github.com/opensignlabs/opensign" target="_blank" rel="noopener noreferrer">
8+
<i aria-hidden="true" className="fa-brands fa-github"></i>
9+
<span className="fa-sr-only">OpenSign&apos;s Github</span>
10+
</NavLink>
11+
<NavLink to="https://www.linkedin.com/company/opensign%E2%84%A2/" target="_blank" rel="noopener noreferrer">
12+
<i aria-hidden="true" className="fa-brands fa-linkedin"></i>
13+
<span className="fa-sr-only">OpenSign&apos;s LinkedIn</span>
14+
</NavLink>
15+
<NavLink to="https://www.twitter.com/opensignlabs" target="_blank" rel="noopener noreferrer">
16+
<i aria-hidden="true" className="fa-brands fa-square-x-twitter"></i>
17+
<span className="fa-sr-only">OpenSign&apos;s Twitter</span>
18+
</NavLink>
19+
<NavLink to="https://discord.com/invite/xe9TDuyAyj" target="_blank" rel="noopener noreferrer">
20+
<i aria-hidden="true" className="fa-brands fa-discord"></i>
21+
<span className="fa-sr-only">OpenSign&apos;s Discord</span>
22+
</NavLink>
23+
</React.Fragment>
24+
)
25+
}
26+
27+
export default SocialMedia;

0 commit comments

Comments
 (0)