Merge pull request #14 from OpenSignLabs/staging

sync fork
This commit is contained in:
prafull-opensignlabs
2023-11-13 10:59:43 +05:30
committed by GitHub
15 changed files with 922 additions and 821 deletions
+2 -1
View File
@@ -23,4 +23,5 @@ npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
apps/OpenSign/public/mfbuild/* apps/OpenSign/public/mfbuild/*
microfrontends/SignDocuments/build/* microfrontends/SignDocuments/build/*
apps/OpenSignServer/files/files/*
+19 -2
View File
@@ -127,7 +127,24 @@ openssl pkcs12 -inkey ./cert/local_dev.key -in ./cert/local_dev.crt -export -out
openssl base64 -in ./cert/local_dev.pfx -out ./cert/base64_pfx openssl base64 -in ./cert/local_dev.pfx -out ./cert/base64_pfx
``` ```
#Build Local Environment # CORS Configuration
Below are the steps to follow - As document storage is delegated to S3-compatible services that reside in a different host than the OpenSign one, document operations (loading, storing, deleting) are subject to [Cross-Origin Resource Sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) restriction policies; as a consequence, OpenSign app may fail with (browser console) errors like the following:
```
Access to fetch at 'https://foo.nyc3.digitaloceanspaces.com/exported_file_4627_0000-00-00T00%3A45%3A43.344Z.pdf'
from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header
is present on the requested resource. If an opaque response serves your needs, set the request's mode to
'no-cors' to fetch the resource with CORS disabled.
```
In order to address this, your document storage system must be instructed to accept requests from other hosts; below the relevant documentation links:
- [How to Configure CORS on DigitalOcean Spaces](https://docs.digitalocean.com/products/spaces/how-to/configure-cors/)
- [Configuring cross-origin resource sharing on AWS S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html)
# Build Local Environment
Command to build project -
- Execute `make build` - Execute `make build`
Command to run project -
- Execute `make run`
+6
View File
@@ -1,3 +1,9 @@
build: build:
cp .env.local_dev .env
rm -rf apps/OpenSign/public/mfbuild
cd microfrontends/SignDocuments && npm install && npm run build
docker compose up --build --force-recreate
run:
cp .env.local_dev .env cp .env.local_dev .env
docker compose up -d docker compose up -d
+12 -8
View File
@@ -48,14 +48,18 @@ Welcome to OpenSign, an open-source document e-signing solution designed to prov
### Features ### Features
- **Secure Signing**: Utilizes state-of-the-art cryptographic algorithms to ensure the security & integrity of your documents. - **Secure PDF E-Signing:** With the help of Robust encryption algorithms, OpenSign™ ensures maximum security, privacy & compatibility.
- **User-Friendly Interface**: Designed with usability in mind, making it easy for both technical and non-technical users. - **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.
- **Multi-Platform Support**: Compatible with various browsers and devices. - **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.
- **Invite & collaborate users**: Bring multiple people from your team into the signing process, all within your own infrastructure. - **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.
- **Secure**: Allows for the easy, secure and seamless organization of your documents using 'OpenSigDrive'. - **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. 
- **Audit Trails**: Keeps a detailed log of all activities related to the document signing process including IP addresses and access timings. - **"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.
- **Completion Certificate**: Generate secure completion certificate as soon as a document is signed by all participants. - **Beautiful email templates:** All document signing invitations, completion notifications & reminders are formatted using great looking email templates.
- **API Support**: Provides a robust API for integration into other software and services. - **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.
- **OpenSign™ Drive:** It is a centralised secure vault for your signed documents that makes storing, signing, organizing, sharing & achieving your docs a breeze.
- **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.
- **API Support(coming soon):** OpenSign™ API allows seamless integration into existing systems and software. APIs will soon be available as a cloud hosted solution.
- **Integrations:** Seamless integrations with various Cloud storage systems, CRMs & enterprise platforms is coming soon.
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/b37ff443-7099-4273-9aeb-21c46d7154cf height='200'> <img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/b37ff443-7099-4273-9aeb-21c46d7154cf height='200'>
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/86db91b7-6c2f-4885-a33c-58f4fd35ec89 height='200'> <img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/86db91b7-6c2f-4885-a33c-58f4fd35ec89 height='200'>
+1 -1
View File
@@ -21,5 +21,5 @@ EXPOSE 3000
# ENV NODE_ENV production # ENV NODE_ENV production
# Run the application # Run the application
CMD ["npm", "start"] ENTRYPOINT npm run start-dev
@@ -4,6 +4,12 @@ import multerS3 from 'multer-s3';
import aws from 'aws-sdk'; import aws from 'aws-sdk';
import dotenv from 'dotenv'; import dotenv from 'dotenv';
dotenv.config(); dotenv.config();
function sanitizeFileName(fileName) {
// Remove spaces and invalid characters
return fileName.replace(/[^a-zA-Z0-9._-]/g, '');
}
async function uploadFile(req, res) { async function uploadFile(req, res) {
try { try {
//--size extended to 100 mb //--size extended to 100 mb
@@ -50,16 +56,28 @@ async function uploadFile(req, res) {
region: process.env.DO_REGION, region: process.env.DO_REGION,
}); });
// const s3 = new aws.S3(); const parseBaseUrl = process.env.SERVER_URL;
const upload = multer({ const parseAppId = process.env.APP_ID;
fileFilter: function (req, file, cb) {
if (accepted_extensions.some(ext => file.originalname.toLowerCase().endsWith('.' + ext))) { if (process.env.USE_LOCAL == "TRUE") {
return cb(null, true); var fileStorage = multer.diskStorage({
destination: function(req, file, cb) {
cb(null, "files/files");
},
metadata: function (req, file, cb) {
cb(null, { fieldName: 'OPENSIGN_METADATA' });
},
filename: function(req, file, cb) {
let filename = file.originalname;
let newFileName = filename.split('.')[0];
let extension = filename.split('.')[1];
newFileName = sanitizeFileName(newFileName + '_' + new Date().toISOString() + '.' + extension)
console.log(newFileName);
cb(null, newFileName);
} }
// otherwise, return error });
return cb('Only ' + accepted_extensions.join(', ') + ' files are allowed!'); } else {
}, var fileStorage = multerS3({
storage: multerS3({
acl: 'public-read', acl: 'public-read',
s3, s3,
bucket: DO_SPACE, bucket: DO_SPACE,
@@ -69,14 +87,25 @@ async function uploadFile(req, res) {
key: function (req, file, cb) { key: function (req, file, cb) {
//console.log(file); //console.log(file);
let filename = file.originalname; let filename = file.originalname;
let filenam = filename.split('.')[0]; let newFileName = filename.split('.')[0];
let extension = filename.split('.')[1]; let extension = filename.split('.')[1];
filenam = filenam + '_' + new Date().toISOString() + '.' + extension; newFileName = sanitizeFileName(newFileName + '_' + new Date().toISOString() + '.' + extension)
console.log(filenam); console.log(newFileName);
cb(null, filenam); cb(null, newFileName);
}, }
}), });
}
// const s3 = new aws.S3();
const upload = multer({
fileFilter: function (req, file, cb) {
if (accepted_extensions.some(ext => file.originalname.toLowerCase().endsWith('.' + ext))) {
return cb(null, true);
}
// otherwise, return error
return cb('Only ' + accepted_extensions.join(', ') + ' files are allowed!');
},
storage: fileStorage,
limits: { fileSize: size }, limits: { fileSize: size },
}).single('file'); }).single('file');
@@ -93,7 +122,14 @@ async function uploadFile(req, res) {
const status = 'Success'; const status = 'Success';
//res.header("Access-Control-Allow-Headers", "Content-Type"); //res.header("Access-Control-Allow-Headers", "Content-Type");
//res.setHeader("Access-Control-Allow-Origin", "*"); //res.setHeader("Access-Control-Allow-Origin", "*");
return res.json({ status, imageUrl: req.file.location }); if (process.env.USE_LOCAL == "TRUE") {
console.log(req.file);
var fileUrl = `${parseBaseUrl}/files/${parseAppId}/${req.file.filename}`;
} else {
var fileUrl = req.file.location;
}
return res.json({ status, imageUrl: fileUrl });
}); });
} catch (err) { } catch (err) {
console.log('Exeption in query ' + err.stack); console.log('Exeption in query ' + err.stack);
@@ -99,7 +99,7 @@ function PdfFileComponent({
//function for navigate user to microapp-signature component //function for navigate user to microapp-signature component
const checkPdfStatus = async (data) => { const checkPdfStatus = async (data) => {
const hostUrl = getHostUrl(); const hostUrl = getHostUrl();
const expireDate = data.ExpiryDate.iso; const expireDate = data.ExpiryDate.iso;
const expireUpdateDate = new Date(expireDate).getTime(); const expireUpdateDate = new Date(expireDate).getTime();
@@ -221,13 +221,19 @@ function PdfFileComponent({
// console.log("download") // console.log("download")
const pdfName = data && data.Name; const pdfName = data && data.Name;
const pdfUrl = data && data.SignedUrl ? data.SignedUrl : data.URL; const pdfUrl = data && data.SignedUrl ? data.SignedUrl : data.URL;
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`); saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
} else if (selectType === "Rename") { } else if (selectType === "Rename") {
// console.log("rename") // console.log("rename")
setRenameValue(data.Name); setRenameValue(data.Name);
setRename(data.objectId); setRename(data.objectId);
} }
}; };
const sanitizeFileName = (pdfName) => {
// Replace spaces with underscore
return pdfName.replace(/ /g, '_');
}
const handleEnterPress = (e, data) => { const handleEnterPress = (e, data) => {
if (e.key === "Enter") { if (e.key === "Enter") {
handledRenameDoc(data); handledRenameDoc(data);
@@ -28,9 +28,9 @@ function EmailComponent({
setIsLoading(true); setIsLoading(true);
let sendMail; let sendMail;
for (let i = 0; i < emailCount.length; i++) { for (let i = 0; i < emailCount.length; i++) {
try { try {
const imgPng = const imgPng =
"https://qikinnovation.ams3.digitaloceanspaces.com/logo.png"; "https://qikinnovation.ams3.digitaloceanspaces.com/logo.png";
// "https://qikinnovation.ams3.digitaloceanspaces.com/mailLogo_2023-08-18T12%3A51%3A31.573Z.png"; // "https://qikinnovation.ams3.digitaloceanspaces.com/mailLogo_2023-08-18T12%3A51%3A31.573Z.png";
@@ -41,7 +41,7 @@ function EmailComponent({
"X-Parse-Application-Id": localStorage.getItem("parseAppId"), "X-Parse-Application-Id": localStorage.getItem("parseAppId"),
sessionToken: localStorage.getItem("accesstoken") sessionToken: localStorage.getItem("accesstoken")
}; };
const themeBGcolor = themeColor(); const themeBGcolor = themeColor();
let params = { let params = {
pdfName: pdfName, pdfName: pdfName,
@@ -125,12 +125,17 @@ function EmailComponent({
//handle download signed pdf //handle download signed pdf
const handleDownloadPdf = () => { const handleDownloadPdf = () => {
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`); saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
}; };
const sanitizeFileName = (pdfName) => {
// Replace spaces with underscore
return pdfName.replace(/ /g, '_');
}
const isAndroid = /Android/i.test(navigator.userAgent); const isAndroid = /Android/i.test(navigator.userAgent);
return ( return (
<div> <div>
{/* isEmail */} {/* isEmail */}
@@ -248,13 +253,13 @@ function EmailComponent({
style={{ style={{
display: "flex", display: "flex",
flexDirection: "row", flexDirection: "row",
flexWrap: "wrap" flexWrap: "wrap"
}} }}
> >
{emailCount.map((data, ind) => { {emailCount.map((data, ind) => {
return ( return (
<div className="emailChip" <div className="emailChip"
style={{display:"flex", flexDirection:"row", alignItems:"center"}} style={{display:"flex", flexDirection:"row", alignItems:"center"}}
key={ind}> key={ind}>
<span <span
@@ -37,7 +37,7 @@ function Header({
}) { }) {
const isMobile = window.innerWidth < 767; const isMobile = window.innerWidth < 767;
const navigate = useNavigate(); const navigate = useNavigate();
const isGuestSigner = localStorage.getItem("isGuestSigner");
//for go to previous page //for go to previous page
function previousPage() { function previousPage() {
changePage(-1); changePage(-1);
@@ -76,19 +76,27 @@ function Header({
const handleDownloadPdf = () => { const handleDownloadPdf = () => {
const pdfName = pdfDetails[0] && pdfDetails[0].Name; const pdfName = pdfDetails[0] && pdfDetails[0].Name;
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`); saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
}; };
const sanitizeFileName = (pdfName) => {
// Replace spaces with underscore
return pdfName.replace(/ /g, '_');
}
return ( return (
<div <div
style={{ paddingBottom: "5px", paddingTop: "5px" }} style={{ padding: !isGuestSigner && "5px 0px 5px 0px" }}
className="mobileHead" className="mobileHead"
> >
{isMobile && isShowHeader ? ( {isMobile && isShowHeader ? (
<div <div
id="navbar" id="navbar"
className="stickyHead" className={isGuestSigner ? "stickySignerHead" : "stickyHead"}
style={{ width: window.innerWidth - 30 + "px" }} style={{
width: isGuestSigner ? window.innerWidth : window.innerWidth - 30 + "px"
}}
> >
<div className="preBtn2"> <div className="preBtn2">
<div <div
@@ -215,7 +223,7 @@ function Header({
</DropdownMenu.Root> </DropdownMenu.Root>
) : ( ) : (
<div style={{ display: "flex", justifyContent: "space-around" }}> <div style={{ display: "flex", justifyContent: "space-around" }}>
{/* current signer is checking user send request and check status of pdf sign than if current {/* current signer is checking user send request and check status of pdf sign than if current
user exist than show finish button else no user exist than show finish button else no
*/} */}
{currentSigner && ( {currentSigner && (
@@ -42,8 +42,42 @@ function RenderPdf({
const isMobile = window.innerWidth < 767; const isMobile = window.innerWidth < 767;
const newWidth = window.innerWidth; const newWidth = window.innerWidth;
const scale = isMobile ? pdfOriginalWidth / newWidth : 1; const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
//function for render placeholder block over pdf document
// handle signature block width and height according to screen
const posWidth = (pos) => {
let width;
if (isMobile) {
if (!pos.isMobile) {
width = pos.Width / scale ? pos.Width / scale : 150 / scale;
return width;
} else {
width = pos.Width ? pos.Width : 150;
return width;
}
} else {
width = pos.Width ? pos.Width : 150;
return width;
}
};
const posHeight = (pos) => {
let width;
if (isMobile) {
if (!pos.isMobile) {
width = pos.Height / scale ? pos.Height / scale : 60 / scale;
return width;
} else {
width = pos.Height ? pos.Height : 60;
return width;
}
} else {
width = pos.Height ? pos.Height : 60;
return width;
}
};
//check isGuestSigner is present in local if yes than handle login flow header in mobile view
const isGuestSigner = localStorage.getItem("isGuestSigner");
//function for render placeholder block over pdf document
const checkSignedSignes = (data) => { const checkSignedSignes = (data) => {
const checkSign = signedSigners.filter( const checkSign = signedSigners.filter(
(sign) => sign.objectId === data.signerObjId (sign) => sign.objectId === data.signerObjId
@@ -56,7 +90,7 @@ function RenderPdf({
if (isMobile) { if (isMobile) {
//if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale
if (!pos.isMobile) { if (!pos.isMobile) {
return pos.xPosition / scale; return pos.xPosition / scale - 20;
} }
//pos.isMobile true -- placeholder save from mobile view(small device) handle position in mobile view(small screen) view divided by scale //pos.isMobile true -- placeholder save from mobile view(small device) handle position in mobile view(small screen) view divided by scale
else { else {
@@ -134,8 +168,8 @@ function RenderPdf({
borderWidth: "0.2px" borderWidth: "0.2px"
}} }}
size={{ size={{
width: pos.Width ? pos.Width : 150, width: posWidth(pos),
height: pos.Height ? pos.Height : 60 height: posHeight(pos)
}} }}
lockAspectRatio={pos.Width && 2.5} lockAspectRatio={pos.Width && 2.5}
default={{ default={{
@@ -205,8 +239,8 @@ function RenderPdf({
y: yPos(pos) y: yPos(pos)
}} }}
size={{ size={{
width: pos.Width ? pos.Width : 150, width: posWidth(pos),
height: pos.Height ? pos.Height : 60 height: posHeight(pos)
}} }}
lockAspectRatio={pos.Width ? pos.Width / pos.Height : 2.5} lockAspectRatio={pos.Width ? pos.Width / pos.Height : 2.5}
> >
@@ -235,7 +269,8 @@ function RenderPdf({
{isMobile && scale ? ( {isMobile && scale ? (
<div <div
style={{ style={{
border: "0.1px solid #ebe8e8" border: "0.1px solid #ebe8e8",
marginTop: isGuestSigner && "30px"
}} }}
ref={drop} ref={drop}
id="container" id="container"
@@ -294,12 +329,11 @@ function RenderPdf({
borderWidth: "0.2px" borderWidth: "0.2px"
}} }}
size={{ size={{
width: pos.Width ? pos.Width : 150, width: posWidth(pos),
height: pos.Height ? pos.Height : 60 height: posHeight(pos)
}} }}
lockAspectRatio={pos.Width && 2.5} lockAspectRatio={pos.Width && 2.5}
//if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divide by scale //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divide by scale
//else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale //else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale
default={{ default={{
x: !pos.isMobile x: !pos.isMobile
@@ -361,14 +395,13 @@ function RenderPdf({
borderWidth: "0.2px" borderWidth: "0.2px"
}} }}
size={{ size={{
width: pos.Width ? pos.Width : 150, width: posWidth(pos),
height: pos.Height ? pos.Height : 60 height: posHeight(pos)
}} }}
disableDragging={true} disableDragging={true}
default={{ default={{
//if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divide by scale //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divide by scale
//else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale //else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale
x: !pos.isMobile x: !pos.isMobile
? pos.xPosition / scale ? pos.xPosition / scale
: pos.xPosition * (pos.scale / scale) - 50, : pos.xPosition * (pos.scale / scale) - 50,
@@ -1281,4 +1314,4 @@ function RenderPdf({
); );
} }
export default RenderPdf; export default RenderPdf;
@@ -38,19 +38,15 @@ function Login() {
const handleChange = (event) => { const handleChange = (event) => {
const { value } = event.target; const { value } = event.target;
setOTP(value); setOTP(value);
}; };
//send email OTP function //send email OTP function
const SendOtp = async (e) => { const SendOtp = async (e) => {
const serverUrl = const serverUrl =
localStorage.getItem("baseUrl") && localStorage.getItem("baseUrl"); localStorage.getItem("baseUrl") && localStorage.getItem("baseUrl");
const parseId = const parseId =
localStorage.getItem("parseAppId") && localStorage.getItem("parseAppId"); localStorage.getItem("parseAppId") && localStorage.getItem("parseAppId");
if (serverUrl && localStorage) { if (serverUrl && localStorage) {
setLoading(true); setLoading(true);
e.preventDefault(); e.preventDefault();
@@ -84,13 +80,10 @@ function Login() {
e.preventDefault(); e.preventDefault();
const serverUrl = const serverUrl =
localStorage.getItem("baseUrl") && localStorage.getItem("baseUrl"); localStorage.getItem("baseUrl") && localStorage.getItem("baseUrl");
const parseId = const parseId =
localStorage.getItem("parseAppId") && localStorage.getItem("parseAppId"); localStorage.getItem("parseAppId") && localStorage.getItem("parseAppId");
if (OTP) { if (OTP) {
setLoading(true); setLoading(true);
try { try {
let url = `${serverUrl}functions/AuthLoginAsMail/`; let url = `${serverUrl}functions/AuthLoginAsMail/`;
const headers = { const headers = {
@@ -102,7 +95,6 @@ function Login() {
otp: OTP otp: OTP
}; };
let user = await axios.post(url, body, { headers: headers }); let user = await axios.post(url, body, { headers: headers });
if (user.data.result === "Invalid Otp") { if (user.data.result === "Invalid Otp") {
alert("Invalid Otp"); alert("Invalid Otp");
setLoading(false); setLoading(false);
@@ -114,10 +106,12 @@ function Login() {
localStorage.setItem("UserInformation", JSON.stringify(_user)); localStorage.setItem("UserInformation", JSON.stringify(_user));
localStorage.setItem("username", _user.name); localStorage.setItem("username", _user.name);
localStorage.setItem("accesstoken", _user.sessionToken); localStorage.setItem("accesstoken", _user.sessionToken);
//save isGuestSigner true in local to handle login flow header in mobile view
localStorage.setItem("isGuestSigner", true);
setLoading(false); setLoading(false);
//navigate user to on signature page navigate(
// navigate(`/recipientSignPdf/${id}/${contactBookId}`); `/loadmf/signmicroapp/recipientSignPdf/${id}/${contactBookId}`
navigate(`/loadmf/signmicroapp/recipientSignPdf/${id}/${contactBookId}`); );
} }
} catch (error) {} } catch (error) {}
} else { } else {
@@ -173,9 +167,7 @@ function Login() {
<span className="KNLO"> <span className="KNLO">
Verification code is sent to your email Verification code is sent to your email
</span> </span>
<div className="card card-box" <div className="card card-box" style={{ borderRadius: "0px" }}>
style={{borderRadius:"0px"}}
>
<div className="card-body"> <div className="card-body">
<input <input
type="email" type="email"
@@ -190,7 +182,6 @@ function Login() {
<div className="btnContainer"> <div className="btnContainer">
{loading ? ( {loading ? (
<button <button
// className="btn btn-info loadinBtn "
type="button" type="button"
style={{ style={{
background: themeColor(), background: themeColor(),
@@ -214,15 +205,7 @@ function Login() {
color: "white", color: "white",
marginLeft: "0px !important" marginLeft: "0px !important"
}} }}
// className="btn btn-sm otpButton"
onClick={(e) => SendOtp(e)} onClick={(e) => SendOtp(e)}
// style={{
// marginBottom: "4px",
// width: "210px",
// background: themeColor(),
// color: "white",
// fontWeight: "600"
// }}
> >
Send OTP Send OTP
</button> </button>
@@ -952,7 +952,7 @@ function PlaceHolderSign() {
background: themeColor() background: themeColor()
}} }}
> >
<span style={{ color: "white" }}>Send Mail </span> <span style={{ color: "white" }}>Mails Sent</span>
</Modal.Header> </Modal.Header>
{/* signature modal */} {/* signature modal */}
@@ -74,7 +74,8 @@ function EmbedPdfImage() {
return object.pageNumber === pageNumber; return object.pageNumber === pageNumber;
}); });
const divRef = useRef(null); const divRef = useRef(null);
//check isGuestSigner is present in local if yes than handle login flow header in mobile view
const isGuestSigner = localStorage.getItem("isGuestSigner");
useEffect(() => { useEffect(() => {
const clientWidth = window.innerWidth; const clientWidth = window.innerWidth;
const pdfWidth = clientWidth - 160 - 220 - 30; const pdfWidth = clientWidth - 160 - 220 - 30;
@@ -1010,8 +1011,8 @@ function EmbedPdfImage() {
{/* pdf render view */} {/* pdf render view */}
<div <div
style={{ style={{
marginLeft: pdfOriginalWidth > 500 && "20px", marginLeft: !isGuestSigner && pdfOriginalWidth > 500 && "20px",
marginRight: pdfOriginalWidth > 500 && "20px" marginRight: !isGuestSigner && pdfOriginalWidth > 500 && "20px"
}} }}
> >
{/* this modal is used show this document is already sign */} {/* this modal is used show this document is already sign */}
@@ -1126,9 +1127,9 @@ function EmbedPdfImage() {
)} )}
</div> </div>
)} )}
{/* ndD5gdaxqw */}
</DndProvider> </DndProvider>
); );
} }
export default EmbedPdfImage; export default EmbedPdfImage;
File diff suppressed because it is too large Load Diff