Skip to content

Commit fe34001

Browse files
style: change default theme and ui changes in components
1 parent fcdd7e2 commit fe34001

33 files changed

+515
-690
lines changed

apps/OpenSign/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en" data-theme="cupcake">
2+
<html lang="en" data-theme="opensigncss">
33

44
<head>
55
<meta charset="utf-8" />

apps/OpenSign/src/App.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,8 @@ const Webhook = lazy(() => import("./pages/Webhook"));
3232
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.min.mjs`;
3333
const Loader = () => {
3434
return (
35-
<div
36-
style={{
37-
height: "100vh",
38-
display: "flex",
39-
alignItems: "center",
40-
justifyContent: "center"
41-
}}
42-
>
43-
<div
44-
style={{
45-
fontSize: "45px",
46-
color: "#3dd3e0"
47-
}}
48-
className="loader-37"
49-
></div>
35+
<div className="flex justify-center items-center h-[100vh] text-[45px] text-[#3dd3e0]">
36+
<div className="loader-37"></div>
5037
</div>
5138
);
5239
};

apps/OpenSign/src/components/AddSigner.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,8 @@ const AddSigner = (props) => {
225225
return (
226226
<div className="h-full p-[20px]">
227227
{isLoader && (
228-
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30">
229-
<div
230-
style={{
231-
fontSize: "45px",
232-
color: "#3dd3e0"
233-
}}
234-
className="loader-37"
235-
></div>
228+
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30 text-[45px] text-[#3dd3e0]">
229+
<div className="loader-37"></div>
236230
</div>
237231
)}
238232
<div className="w-full mx-auto p-2">
@@ -257,7 +251,7 @@ const AddSigner = (props) => {
257251
className="block text-xs text-gray-700 font-semibold"
258252
>
259253
Name
260-
<span style={{ color: "red", fontSize: 13 }}> *</span>
254+
<span className="text-[red] text-[13px]"> *</span>
261255
</label>
262256
<input
263257
type="text"
@@ -275,7 +269,7 @@ const AddSigner = (props) => {
275269
className="block text-xs text-gray-700 font-semibold"
276270
>
277271
Email
278-
<span style={{ color: "red", fontSize: 13 }}> *</span>
272+
<span className="text-[red] text-[13px]"> *</span>
279273
</label>
280274
<input
281275
type="email"

apps/OpenSign/src/components/AddUser.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,8 @@ const AddUser = (props) => {
194194
<Title title={"Add User"} />
195195
{isUserExist && <Alert type="danger">User already exists!</Alert>}
196196
{isLoader && (
197-
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30 z-50">
198-
<div
199-
style={{
200-
fontSize: "45px",
201-
color: "#3dd3e0"
202-
}}
203-
className="loader-37"
204-
></div>
197+
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30 z-50 text-[45px] text-[#3dd3e0]">
198+
<div className="loader-37"></div>
205199
</div>
206200
)}
207201
<div className="w-full mx-auto">
@@ -213,7 +207,7 @@ const AddUser = (props) => {
213207
className="block text-xs text-gray-700 font-semibold"
214208
>
215209
Name
216-
<span style={{ color: "red", fontSize: 13 }}> *</span>
210+
<span className="text-[red] text-[13px]"> *</span>
217211
</label>
218212
<input
219213
type="text"
@@ -230,7 +224,7 @@ const AddUser = (props) => {
230224
className="block text-xs text-gray-700 font-semibold"
231225
>
232226
Email
233-
<span style={{ color: "red", fontSize: 13 }}> *</span>
227+
<span className="text-[red] text-[13px]"> *</span>
234228
</label>
235229
<input
236230
type="email"
@@ -247,7 +241,7 @@ const AddUser = (props) => {
247241
className="block text-xs text-gray-700 font-semibold"
248242
>
249243
Phone
250-
<span style={{ color: "red", fontSize: 13 }}> *</span>
244+
<span className="text-[red] text-[13px]"> *</span>
251245
</label>
252246
<input
253247
type="text"

apps/OpenSign/src/components/Header.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ const Header = ({ showSidebar }) => {
4545
const closeDropdown = () => {
4646
setIsOpen(false);
4747
if (Parse?.User?.current()) {
48-
Parse.User.logOut();
48+
try {
49+
Parse.User.logOut();
50+
} catch (err) {
51+
console.log("Err", err);
52+
}
4953
}
5054
let appdata = localStorage.getItem("userSettings");
5155
let applogo = localStorage.getItem("appLogo");

apps/OpenSign/src/components/LoginFacebook.js

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,29 +112,10 @@ const LoginFacebook = ({
112112
}
113113
};
114114
return (
115-
<div style={{ position: "relative" }}>
115+
<div className="relative">
116116
{thirdpartyLoader && (
117-
<div
118-
style={{
119-
position: "fixed",
120-
width: "100vw",
121-
height: "100vh",
122-
backgroundColor: "rgba(0,0,0,0.2)",
123-
top: 0,
124-
left: 0,
125-
zIndex: 2
126-
}}
127-
>
128-
<div
129-
style={{
130-
position: "fixed",
131-
fontSize: "50px",
132-
color: "#3ac9d6",
133-
top: "50%",
134-
left: "45%"
135-
}}
136-
className="loader-37"
137-
></div>
117+
<div className="fixed w-[100vw] h-[100vh] bg-black bg-opacity-30 left-0 top-0 z-[20] text-[50px] text-[#3ac9d6]">
118+
<div className="loader-37 fixed top-[45%] left-[45%]"></div>
138119
</div>
139120
)}
140121
{/* <FacebookLogin
@@ -168,8 +149,7 @@ const LoginFacebook = ({
168149
style={{ display: "flex" }}
169150
className="col-form-label"
170151
>
171-
Phone{" "}
172-
<span style={{ fontSize: 13, color: "red" }}>*</span>
152+
Phone <span className="text-[red] text-[13px]">*</span>
173153
</label>
174154
<input
175155
type="tel"
@@ -191,8 +171,7 @@ const LoginFacebook = ({
191171
style={{ display: "flex" }}
192172
className="col-form-label"
193173
>
194-
Company{" "}
195-
<span style={{ fontSize: 13, color: "red" }}>*</span>
174+
Company <span className="text-[red] text-[13px]">*</span>
196175
</label>
197176
<input
198177
type="text"

apps/OpenSign/src/components/RenderDebugPdf.js

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,11 @@ import { Stage, Layer, Rect } from "react-konva";
44
const RenderDebugPdf = (props) => {
55
return (
66
<div>
7-
<div
8-
style={{
9-
position: "sticky",
10-
top: 0,
11-
padding: 10,
12-
zIndex: 1,
13-
backgroundColor: "white",
14-
border: "1px solid grey",
15-
margin: "5px 0"
16-
}}
17-
>
7+
<div className="sticky top-0 p-[10px] z-10 bg-white border-[1px] border-[gray] my-[5px]">
188
{`Co-ordinates: X - ${props.hoverCoordinates.x}, Y - ${props.hoverCoordinates.y}`}
199
</div>
2010
<div
21-
style={{
22-
flex: 1,
23-
position: "relative",
24-
border: "1px solid grey",
25-
overflow: "auto",
26-
cursor: "crosshair"
27-
}}
11+
className="relative flex-1 cursor-crosshair border-[1px] border-[gray] overflow-auto"
2812
onMouseMove={props.handleMouseMoveDiv}
2913
>
3014
<Document
@@ -57,7 +41,7 @@ const RenderDebugPdf = (props) => {
5741
onMouseUp={props.handleMouseUp}
5842
width={props.pdfDimension.width}
5943
height={props.pdfDimension.height}
60-
style={{ position: "absolute", top: 0, left: 0 }}
44+
className="absolute top-0 right-0"
6145
>
6246
<Layer>
6347
{props.annotations

apps/OpenSign/src/components/dashboard/GetDashboard.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ const GetDashboard = (props) => {
3737
case "Card":
3838
return (
3939
<div
40-
className="op-card bg-[#2ed8b6] w-full h-[140px] px-3 pt-4 mb-3 shadow-md"
40+
className={`${
41+
col?.widget?.bgColor ? col.widget.bgColor : "bg-[#2ed8b6]"
42+
} op-card w-full h-[140px] px-3 pt-4 mb-3 shadow-md"`}
4143
data-tut={col.widget.data.tourSection}
42-
style={{ background: col.widget.bgColor }}
4344
>
4445
<Suspense
4546
fallback={
@@ -78,8 +79,9 @@ const GetDashboard = (props) => {
7879
case "Card":
7980
return (
8081
<div
81-
className="op-card bg-[#2ed8b6] w-full h-[140px] px-3 pt-4 mb-3 shadow-md"
82-
style={{ background: col.widget.bgColor }}
82+
className={`${
83+
col?.widget?.bgColor ? col.widget.bgColor : "bg-[#2ed8b6]"
84+
} op-card w-full h-[140px] px-3 pt-4 mb-3 shadow-md"`}
8385
>
8486
<Suspense fallback={<div>please wait</div>}>
8587
<DashboardCard

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

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ const AddRoleModal = (props) => {
99
handleClose={props.handleCloseRoleModal}
1010
>
1111
<div className="addusercontainer">
12-
<form
13-
style={{ display: "flex", flexDirection: "column" }}
14-
onSubmit={props.handleAddRole}
15-
>
12+
<form className="flex flex-col" onSubmit={props.handleAddRole}>
1613
<input
1714
value={props.roleName}
1815
onChange={(e) => props.setRoleName(e.target.value)}
@@ -23,37 +20,18 @@ const AddRoleModal = (props) => {
2320
}
2421
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs mt-1"
2522
/>
26-
<p
27-
style={{
28-
color: "grey",
29-
fontSize: 11,
30-
margin: "10px 0 10px 5px"
31-
}}
32-
>
23+
<p className="text-[gray] text-[11px] mt-[5px] mb-[10px] ml-[10px]">
3324
e.g: Customer, Hr, Director, Manager, Student, etc...
3425
</p>
3526
<div>
36-
<div
37-
style={{
38-
height: "1px",
39-
backgroundColor: "#9f9f9f",
40-
width: "100%",
41-
marginBottom: "15px"
42-
}}
43-
></div>
44-
<button
45-
type="submit"
46-
style={{
47-
background: "#00a2b7"
48-
}}
49-
className="finishBtn"
50-
>
27+
<div className="h-[1px] w-full bg-[#9f9f9f] mb-[10px]"></div>
28+
<button type="submit" className="op-btn op-btn-primary">
5129
Add
5230
</button>
5331
<button
5432
onClick={props.handleCloseRoleModal}
5533
type="button"
56-
className="finishBtn cancelBtn"
34+
className="op-btn op-btn-secondary ml-2"
5735
>
5836
Close
5937
</button>

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

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,29 @@ function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
1919
return (
2020
<div data-tut="reactourThird">
2121
<div
22+
className="text-white p-[5px] mt-[5px]"
2223
style={{
23-
background: themeColor,
24-
color: "white",
25-
padding: "5px",
26-
fontFamily: "sans-serif",
27-
marginTop: "5px"
24+
background: themeColor
2825
}}
2926
>
3027
Signature
3128
</div>
32-
<div
33-
style={{
34-
display: "flex",
35-
flexDirection: "column",
36-
alignItems: "center",
37-
marginTop: "10px",
38-
fontWeight: "600"
39-
}}
40-
>
41-
<>
42-
<p>Your Signature</p>
43-
<div className="defaultSignBox">
44-
<img
45-
alt="default img"
46-
style={{
47-
width: "100%",
48-
height: "100%",
49-
objectFit: "contain"
50-
}}
51-
src={defaultSignImg}
52-
/>
53-
</div>
54-
<button
55-
style={{
56-
background: themeColor,
57-
color: "white",
58-
marginTop: "20px",
59-
cursor: "pointer",
60-
marginBottom: "10px"
61-
}}
62-
type="button"
63-
className="finishBtn finishnHover"
64-
onClick={() => confirmToaddDefaultSign()}
65-
>
66-
Auto Sign All
67-
</button>
68-
</>
29+
<div className="flex flex-col items-center mt-[10px] font-semibold">
30+
<p className="text-base-content">Your Signature</p>
31+
<div className="op-card shadow-md h-[111px] w-[90%] p-2">
32+
<img
33+
alt="signature"
34+
className="w-full h-full object-contain"
35+
src={defaultSignImg}
36+
/>
37+
</div>
38+
<button
39+
type="button"
40+
className="op-btn op-btn-primary op-btn-sm mt-[10px]"
41+
onClick={() => confirmToaddDefaultSign()}
42+
>
43+
Auto Sign All
44+
</button>
6945
</div>
7046
</div>
7147
);

0 commit comments

Comments
 (0)