Skip to content

Commit 141351d

Browse files
Merge pull request #16 from OpenSignLabs/staging
update main branch
2 parents 81af6a6 + edecf3e commit 141351d

File tree

13 files changed

+810
-48
lines changed

13 files changed

+810
-48
lines changed

.husky/pre-commit

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx eslint '**/*.{js,jsx}'
5-
npx pretty-quick --staged '**/*.{js,jsx}'
4+
npm run lint-staged-changes

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.js": "prettier --write"
3+
}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ build:
22
cp .env.local_dev .env
33
rm -rf apps/OpenSign/public/mfbuild
44
cd microfrontends/SignDocuments && npm install && npm run build
5-
docker compose up -d
5+
docker compose up --build --force-recreate
66

77
run:
88
cp .env.local_dev .env

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,18 @@ Welcome to OpenSign, an open-source document e-signing solution designed to prov
4848

4949
### Features
5050

51-
- **Secure Signing**: Utilizes state-of-the-art cryptographic algorithms to ensure the security & integrity of your documents.
52-
- **User-Friendly Interface**: Designed with usability in mind, making it easy for both technical and non-technical users.
53-
- **Multi-Platform Support**: Compatible with various browsers and devices.
54-
- **Invite & collaborate users**: Bring multiple people from your team into the signing process, all within your own infrastructure.
55-
- **Secure**: Allows for the easy, secure and seamless organization of your documents using 'OpenSigDrive'.
56-
- **Audit Trails**: Keeps a detailed log of all activities related to the document signing process including IP addresses and access timings.
57-
- **Completion Certificate**: Generate secure completion certificate as soon as a document is signed by all participants.
58-
- **API Support**: Provides a robust API for integration into other software and services.
51+
- **Secure PDF E-Signing:** With the help of Robust encryption algorithms, OpenSign™ ensures maximum security, privacy & compatibility.
52+
- **Annotate Documents:** OpenSign™ allows you to annotate PDF documents with an advanced signing pad that comes with hand drawn signatures support as well as uploaded images & saved signatures for the simplest signing experience.
53+
- **User-Friendly Interface:** OpenSign™ was built while keeping Intuitive design in mind for ease of use. Features like "Sign yourself", "One click signatures" and "OpenSign Drive" makes it stand out of the crowd and even makes it better than a lot of so-called industry leaders.
54+
- **Multi-signer Support:** OpenSign's ability to invite multiple signers for signing along with the ability to invite witnesses & being able to enforce signing in a sequence makes it the only open source solution that is fully loaded and allows it to compete head-to-head with established players.
55+
- **Email Unique Code(OTP) verification support for guest signers:** With OpenSign™, your documents are fully secure even when being signed by guest users. Guest signers can only sign the document after entering a unique code sent to their email address. 
56+
- **"Expiring Docs" & "Rejection":** You can set documents to expire after certain number of days after which nobody will be able to sign it. Not just this, OpenSign also allows signers to reject signing a document.
57+
- **Beautiful email templates:** All document signing invitations, completion notifications & reminders are formatted using great looking email templates.
58+
- **PDF Template Creation(coming soon):** OpenSign™ allows you to create and store PDF document templates for repeated use thereby saving you a lot of time.
59+
- **OpenSign™ Drive:** It is a centralised secure vault for your signed documents that makes storing, signing, organizing, sharing & achieving your docs a breeze.
60+
- **Audit Trails & completion certificate:** Being a security focused solution, OpenSign™ makes it a top priority to save detailed logs for tracking document activities along with time-stamps, IP addresses, email IDs & phone numbers. A completion certificate is generated as soon as document is completed which contains all the document related logs for added safety.
61+
- **API Support(coming soon):** OpenSign™ API allows seamless integration into existing systems and software. APIs will soon be available as a cloud hosted solution.
62+
- **Integrations:** Seamless integrations with various Cloud storage systems, CRMs & enterprise platforms is coming soon.
5963

6064
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/b37ff443-7099-4273-9aeb-21c46d7154cf height='200'>
6165
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/86db91b7-6c2f-4885-a33c-58f4fd35ec89 height='200'>

apps/OpenSign/src/routes/Login.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function Login(props) {
129129
);
130130
if (rolesfiltered.length > 0) {
131131
_currentRole = rolesfiltered[0];
132-
}
132+
}
133133
} else {
134134
const rolesfiltered = userRoles.filter(
135135
(x) => !valuesToExclude.includes(x)
@@ -472,7 +472,7 @@ function Login(props) {
472472
);
473473
if (rolesfiltered.length > 0) {
474474
_currentRole = rolesfiltered[0];
475-
}
475+
}
476476
} else {
477477
const rolesfiltered = userRoles.filter(
478478
(x) => !valuesToExclude.includes(x)
@@ -655,7 +655,6 @@ function Login(props) {
655655
} else {
656656
setThirdpartyLoader(false);
657657
setState({ ...state, loading: false });
658-
659658
}
660659
})
661660
.catch((err) => {
@@ -1171,7 +1170,7 @@ function Login(props) {
11711170
<div className="modal-dialog" role="document">
11721171
<div className="modal-content">
11731172
<div className="modal-header">
1174-
<h5 className="modal-title">Login form</h5>
1173+
<h5 className="modal-title font-semibold">Additional Info</h5>
11751174
<span>
11761175
<span></span>
11771176
</span>
@@ -1227,18 +1226,19 @@ function Login(props) {
12271226
<div className="mt-4">
12281227
<button
12291228
type="button"
1230-
className="bg-[#6c757d] text-sm p-2 text-white rounded uppercase"
1231-
onClick={handleCloseModal}
1232-
style={{ marginRight: 10, width: 90 }}
1229+
className="bg-[#17a2b8] text-sm p-2 text-white rounded uppercase"
1230+
onClick={(e) => handleSubmitbtn(e)}
1231+
style={{ marginRight: 10 }}
12331232
>
1234-
Cancel
1233+
Login
12351234
</button>
12361235
<button
12371236
type="button"
1238-
className="bg-[#17a2b8] text-sm p-2 text-white rounded uppercase"
1239-
onClick={(e) => handleSubmitbtn(e)}
1237+
className="bg-[#6c757d] text-sm p-2 text-white rounded uppercase"
1238+
onClick={handleCloseModal}
1239+
style={{ width: 90 }}
12401240
>
1241-
Login
1241+
Cancel
12421242
</button>
12431243
</div>
12441244
</form>

apps/OpenSign/src/routes/PlanSubscriptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const PlanSubscriptions = () => {
2828
: "";
2929
const phone =
3030
userDetails && userDetails.phone ? "&mobile=" + userDetails.phone : "";
31-
const details = "?" + name + email + company + phone;
31+
const details = "?shipping_country_code=US&" + name + email + company + phone;
3232
useEffect(() => {
3333
if (localStorage.getItem("accesstoken")) {
3434
setIsLoader(false);

apps/OpenSign/src/routes/Signup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const Signup = (props) => {
118118
await Parse.User.requestPasswordReset(email).then(
119119
async function (res1) {
120120
if (res1.data === undefined) {
121-
alert("Email has been sent to your mail!");
121+
alert("Verification mail has been sent to your E-mail!");
122122
}
123123
}
124124
);

microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function PdfFileComponent({
9999

100100
//function for navigate user to microapp-signature component
101101
const checkPdfStatus = async (data) => {
102-
102+
103103
const hostUrl = getHostUrl();
104104
const expireDate = data.ExpiryDate.iso;
105105
const expireUpdateDate = new Date(expireDate).getTime();
@@ -221,13 +221,19 @@ function PdfFileComponent({
221221
// console.log("download")
222222
const pdfName = data && data.Name;
223223
const pdfUrl = data && data.SignedUrl ? data.SignedUrl : data.URL;
224-
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`);
224+
saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
225225
} else if (selectType === "Rename") {
226226
// console.log("rename")
227227
setRenameValue(data.Name);
228228
setRename(data.objectId);
229229
}
230230
};
231+
232+
const sanitizeFileName = (pdfName) => {
233+
// Replace spaces with underscore
234+
return pdfName.replace(/ /g, '_');
235+
}
236+
231237
const handleEnterPress = (e, data) => {
232238
if (e.key === "Enter") {
233239
handledRenameDoc(data);

microfrontends/SignDocuments/src/Component/SignYourselfPdf.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ function SignYourSelf() {
500500
removeBase64Fromjpeg,
501501
""
502502
);
503-
504503
//function for call to embed signature in pdf and get digital signature pdf
505504
signPdfFun(newImgUrl, documentId, data, pdfBase64, pageNo);
506505
})
@@ -575,14 +574,18 @@ function SignYourSelf() {
575574
const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
576575

577576
const posY = () => {
578-
if (id === 0) {
579-
return (
580-
page.getHeight() -
581-
imgUrlList[id].yPosition * scale -
582-
imgHeight
583-
);
584-
} else if (id > 0) {
585-
return page.getHeight() - imgUrlList[id].yPosition * scale;
577+
if (isMobile) {
578+
if (id === 0) {
579+
return (
580+
page.getHeight() -
581+
imgUrlList[id].yPosition * scale -
582+
imgHeight
583+
);
584+
} else if (id > 0) {
585+
return page.getHeight() - imgUrlList[id].yPosition * scale;
586+
}
587+
} else {
588+
return page.getHeight() - imgUrlList[id].yPosition - imgHeight;
586589
}
587590
};
588591
page.drawImage(img, {
@@ -596,7 +599,6 @@ function SignYourSelf() {
596599
});
597600
}
598601
const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false });
599-
600602
signPdfFun(pdfBytes, documentId);
601603
}
602604
setIsSignPad(false);
@@ -615,10 +617,11 @@ function SignYourSelf() {
615617
pageNo
616618
) => {
617619
let singleSign;
620+
618621
const isMobile = window.innerWidth < 767;
619622
const newWidth = window.innerWidth;
620623
const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
621-
const imgWidth = xyPosData.Width.Width ? xyPosData.Width.Width : 150;
624+
const imgWidth = xyPosData ? xyPosData.Width : 150;
622625
if (xyPostion.length === 1 && xyPostion[0].pos.length === 1) {
623626
const height = xyPosData.Height ? xyPosData.Height : 60;
624627
const bottomY = xyPosData.isDrag
@@ -1115,6 +1118,8 @@ function SignYourSelf() {
11151118
pdfDetails={pdfDetails}
11161119
isShowHeader={true}
11171120
currentSigner={true}
1121+
alreadySign={pdfUrl ? true : false}
1122+
isSignYourself={true}
11181123
/>
11191124

11201125
{/* className="hidePdf" */}

microfrontends/SignDocuments/src/Component/component/emailComponent.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ function EmailComponent({
2828
setIsLoading(true);
2929
let sendMail;
3030
for (let i = 0; i < emailCount.length; i++) {
31-
31+
3232
try {
33-
33+
3434
const imgPng =
3535
"https://qikinnovation.ams3.digitaloceanspaces.com/logo.png";
3636
// "https://qikinnovation.ams3.digitaloceanspaces.com/mailLogo_2023-08-18T12%3A51%3A31.573Z.png";
@@ -41,7 +41,7 @@ function EmailComponent({
4141
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
4242
sessionToken: localStorage.getItem("accesstoken")
4343
};
44-
44+
4545
const themeBGcolor = themeColor();
4646
let params = {
4747
pdfName: pdfName,
@@ -125,12 +125,17 @@ function EmailComponent({
125125

126126
//handle download signed pdf
127127
const handleDownloadPdf = () => {
128-
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`);
128+
saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
129129
};
130130

131+
const sanitizeFileName = (pdfName) => {
132+
// Replace spaces with underscore
133+
return pdfName.replace(/ /g, '_');
134+
}
135+
131136
const isAndroid = /Android/i.test(navigator.userAgent);
132137

133-
138+
134139
return (
135140
<div>
136141
{/* isEmail */}
@@ -248,13 +253,13 @@ function EmailComponent({
248253
style={{
249254
display: "flex",
250255
flexDirection: "row",
251-
256+
252257
flexWrap: "wrap"
253258
}}
254259
>
255260
{emailCount.map((data, ind) => {
256261
return (
257-
<div className="emailChip"
262+
<div className="emailChip"
258263
style={{display:"flex", flexDirection:"row", alignItems:"center"}}
259264
key={ind}>
260265
<span

0 commit comments

Comments
 (0)