Skip to content

Commit daddb10

Browse files
authored
Merge pull request #864 from OpenSignLabs/resolve_stage
2 parents 795e8a8 + 6d9090d commit daddb10

File tree

4 files changed

+138
-135
lines changed

4 files changed

+138
-135
lines changed

apps/OpenSign/src/components/pdf/EmailComponent.js

Lines changed: 131 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { getBase64FromUrl } from "../../constant/Utils";
66
import { themeColor } from "../../constant/const";
77
import printModule from "print-js";
88
import Loader from "../../primitives/Loader";
9+
import ModalUi from "../../primitives/ModalUi";
910

1011
function EmailComponent({
1112
isEmail,
@@ -170,146 +171,146 @@ function EmailComponent({
170171
<div>
171172
{/* isEmail */}
172173
{isEmail && (
173-
<div className="modaloverlay">
174-
<div className="modalcontainer">
175-
{isLoading && (
176-
<div className="absolute w-full h-full flex flex-col justify-center items-center z-[20] bg-[#e6f2f2] bg-opacity-80">
177-
<Loader />
178-
<span className="text-[12px] font-bold">
179-
This might take some time
180-
</span>
181-
</div>
182-
)}
183-
<div style={{ background: "#32a3ac" }} className="modalheader">
184-
<span className="text-white">Successfully signed!</span>
185-
<div className="flex flex-row">
186-
<div></div>
187-
{!isAndroid && (
188-
<button
189-
onClick={handleToPrint}
190-
className="op-btn op-btn-neutral op-btn-sm text-[15px]"
191-
>
192-
<i className="fa fa-print" aria-hidden="true"></i>
193-
Print
194-
</button>
195-
)}
174+
<ModalUi isOpen showHeader={false}>
175+
{isLoading && (
176+
<div className="absolute w-full h-full flex flex-col justify-center items-center z-[20] bg-[#e6f2f2]/70">
177+
<Loader />
178+
<span className="text-[12px] font-bold">
179+
This might take some time
180+
</span>
181+
</div>
182+
)}
183+
<div className="flex justify-between items-center py-[10px] px-[20px] border-b-[1px] border-base-content">
184+
<span className="text-base-content font-semibold">
185+
Successfully signed!
186+
</span>
187+
<div className="flex flex-row">
188+
<div></div>
189+
{!isAndroid && (
196190
<button
197-
className="op-btn op-btn-primary op-btn-sm text-[15px] ml-2"
198-
onClick={() => handleDownloadPdf()}
191+
onClick={handleToPrint}
192+
className="op-btn op-btn-neutral op-btn-sm text-[15px]"
199193
>
200-
<i className="fa fa-download" aria-hidden="true"></i>
201-
Download
194+
<i className="fa fa-print" aria-hidden="true"></i>
195+
Print
202196
</button>
203-
</div>
204-
</div>
205-
<div className="h-full p-[20px]">
206-
{isEmailCelebration && (
207-
<div className="absolute w-[100%] flex justify-center items-center">
208-
<img alt="celeb" width={300} height={250} src={celebration} />
209-
</div>
210-
)}
211-
<p className="font-medium text-[15px] mb-[5px] text-base-content align-baseline">
212-
Recipients added here will get a copy of the signed document.
213-
</p>
214-
{emailList.length > 0 ? (
215-
<>
216-
<div className="addEmail">
217-
<div className="flex flex-row flex-wrap">
218-
{emailList.map((data, ind) => {
219-
return (
220-
<div
221-
className="flex flex-row items-center bg-[#47a3ad] m-[4px] rounded-md py-[5px] px-[10px]"
222-
key={ind}
223-
>
224-
<span className="text-white text-[13px]">
225-
{data}
226-
</span>
227-
<span
228-
className="text-white text-[13px] font-semibold ml-[7px] cursor-pointer"
229-
onClick={() => removeChip(ind)}
230-
>
231-
<i className="fa-solid fa-xmark"></i>
232-
</span>
233-
</div>
234-
);
235-
})}
236-
</div>
237-
{emailList.length <= 9 && (
238-
<input
239-
type="text"
240-
value={emailValue}
241-
className="p-[10px] pb-[20px] rounded w-full text-[15px] bg-white outline-none"
242-
onChange={handleEmailValue}
243-
onKeyDown={handleEnterPress}
244-
onBlur={() => {
245-
if (emailValue) {
246-
handleEnterPress("add");
247-
}
248-
}}
249-
required
250-
/>
251-
)}
252-
</div>
253-
</>
254-
) : (
255-
<div>
256-
<input
257-
type="text"
258-
value={emailValue}
259-
className="p-[10px] pb-[20px] rounded w-full text-[15px] outline-none bg-white border-2 border-[#47a3ad]"
260-
onChange={handleEmailValue}
261-
onKeyDown={handleEnterPress}
262-
placeholder="Add the email addresses"
263-
onBlur={() => {
264-
if (emailValue) {
265-
handleEnterPress("add");
266-
}
267-
}}
268-
required
269-
/>
270-
</div>
271197
)}
272198
<button
273-
className={`${
274-
emailValue ? "cursor-pointer" : "cursor-default"
275-
} op-btn op-btn-primary op-btn-sm m-2 shadow-md`}
276-
onClick={() => {
277-
if (emailValue) {
278-
handleEnterPress("add");
279-
}
280-
}}
199+
className="op-btn op-btn-primary op-btn-sm text-[15px] ml-2"
200+
onClick={() => handleDownloadPdf()}
281201
>
282-
<i className="fa fa-plus" aria-hidden="true"></i>
202+
<i className="fa fa-download" aria-hidden="true"></i>
203+
Download
283204
</button>
284-
285-
<div className="bg-[#e3e2e1] mt-[10px] p-[5px] rounded">
286-
<span className="font-bold">Note: </span>
287-
<span className="text-[15px]">
288-
You can only send to ten recipients at a time.
289-
</span>
205+
</div>
206+
</div>
207+
<div className="h-full p-[20px]">
208+
{isEmailCelebration && (
209+
<div className="absolute w-[100%] flex justify-center items-center">
210+
<img alt="celeb" width={300} height={250} src={celebration} />
290211
</div>
291-
<div className="h-[1px] w-full my-[15px] bg-[#9f9f9f]"></div>
292-
<button
293-
type="button"
294-
className="op-btn op-btn-primary"
295-
onClick={() => emailList.length > 0 && sendEmail()}
296-
>
297-
Send
298-
</button>
299-
<button
300-
type="button"
301-
className="op-btn op-btn-ghost ml-2"
302-
onClick={() => {
303-
setIsEmail(false);
304-
setEmailValue("");
305-
setEmailList([]);
306-
}}
307-
>
308-
Close
309-
</button>
212+
)}
213+
<p className="font-medium text-[15px] mb-[5px] text-base-content align-baseline">
214+
Recipients added here will get a copy of the signed document.
215+
</p>
216+
{emailList.length > 0 ? (
217+
<>
218+
<div className="p-0 border-[1.5px] op-border-primary rounded w-full text-[15px]">
219+
<div className="flex flex-row flex-wrap">
220+
{emailList.map((data, ind) => {
221+
return (
222+
<div
223+
className="flex flex-row items-center op-bg-primary m-[4px] rounded-md py-[5px] px-[10px]"
224+
key={ind}
225+
>
226+
<span className="text-base-100 text-[13px]">
227+
{data}
228+
</span>
229+
<span
230+
className="text-base-100 text-[13px] font-semibold ml-[7px] cursor-pointer"
231+
onClick={() => removeChip(ind)}
232+
>
233+
<i className="fa-solid fa-xmark"></i>
234+
</span>
235+
</div>
236+
);
237+
})}
238+
</div>
239+
{emailList.length <= 9 && (
240+
<input
241+
type="text"
242+
value={emailValue}
243+
className="p-[10px] pb-[20px] rounded w-full text-[15px] bg-transparent outline-none"
244+
onChange={handleEmailValue}
245+
onKeyDown={handleEnterPress}
246+
onBlur={() => {
247+
if (emailValue) {
248+
handleEnterPress("add");
249+
}
250+
}}
251+
required
252+
/>
253+
)}
254+
</div>
255+
</>
256+
) : (
257+
<div>
258+
<input
259+
type="text"
260+
value={emailValue}
261+
className="p-[10px] pb-[20px] rounded w-full text-[15px] outline-none bg-transparent border-[1.5px] op-border-primary"
262+
onChange={handleEmailValue}
263+
onKeyDown={handleEnterPress}
264+
placeholder="Add the email addresses"
265+
onBlur={() => {
266+
if (emailValue) {
267+
handleEnterPress("add");
268+
}
269+
}}
270+
required
271+
/>
272+
</div>
273+
)}
274+
<button
275+
className={`${
276+
emailValue ? "cursor-pointer" : "cursor-default"
277+
} op-btn op-btn-primary op-btn-sm m-2 shadow-md`}
278+
onClick={() => {
279+
if (emailValue) {
280+
handleEnterPress("add");
281+
}
282+
}}
283+
>
284+
<i className="fa fa-plus" aria-hidden="true"></i>
285+
</button>
286+
287+
<div className="bg-[#e3e2e1] mt-[10px] p-[5px] rounded">
288+
<span className="font-bold">Note: </span>
289+
<span className="text-[15px]">
290+
You can only send to ten recipients at a time.
291+
</span>
310292
</div>
293+
<hr className="w-full my-[15px] bg-base-content" />
294+
<button
295+
type="button"
296+
className="op-btn op-btn-primary"
297+
onClick={() => emailList.length > 0 && sendEmail()}
298+
>
299+
Send
300+
</button>
301+
<button
302+
type="button"
303+
className="op-btn op-btn-ghost ml-2"
304+
onClick={() => {
305+
setIsEmail(false);
306+
setEmailValue("");
307+
setEmailList([]);
308+
}}
309+
>
310+
Close
311+
</button>
311312
</div>
312-
</div>
313+
</ModalUi>
313314
)}
314315
</div>
315316
);

apps/OpenSign/src/components/pdf/PrevNext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function PrevNext({ pageNumber, allPages, changePage }) {
1313
return (
1414
<div className="flex items-center">
1515
<button
16-
className="op-btn op-btn-secondary op-btn-xs md:op-btn-sm font-semibold text-xs"
16+
className="op-btn op-btn-neutral op-btn-xs md:op-btn-sm font-semibold text-xs"
1717
disabled={pageNumber <= 1}
1818
onClick={previousPage}
1919
>
@@ -26,7 +26,7 @@ function PrevNext({ pageNumber, allPages, changePage }) {
2626
{pageNumber || (allPages ? 1 : "--")} of {allPages || "--"}
2727
</span>
2828
<button
29-
className="op-btn op-btn-secondary op-btn-xs md:op-btn-sm font-semibold text-xs"
29+
className="op-btn op-btn-neutral op-btn-xs md:op-btn-sm font-semibold text-xs"
3030
disabled={pageNumber >= allPages}
3131
onClick={nextPage}
3232
>

apps/OpenSign/src/index.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ body {
4949
.op-text-warning {
5050
@apply text-warning;
5151
}
52-
52+
.op-border-primary{
53+
@apply border-primary
54+
}
5355
/* CSS for scrollbar customization */
5456
* {
5557
scrollbar-width: thin; /* For Firefox */

apps/OpenSign/tailwind.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ module.exports = {
4848
"secondary-content": "#cacccf",
4949
accent: "#E10032",
5050
"accent-content": "#ffd8d5",
51-
neutral: "#DBE8E1",
52-
"neutral-content": "#141111",
51+
neutral: "#99c2ff",
52+
"neutral-content": "#f1f1f1",
5353
"base-100": "#ffffff",
5454
"base-200": "#dedede",
5555
"base-300": "#bebebe",

0 commit comments

Comments
 (0)