🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: public profile user name already exist issue
RaktimaNXG9666e418808d
diff --git a/apps/OpenSign/src/components/Header.js b/apps/OpenSign/src/components/Header.jsindex 20a8ff6d7..d6905caac 100644--- a/apps/OpenSign/src/components/Header.js+++ b/apps/OpenSign/src/components/Header.js@@ -5,7 +5,7 @@ import { useNavigate } from "react-router-dom";import Parse from "parse";import { useWindowSize } from "../hook/useWindowSize";import { checkIsSubscribed, getAppLogo, openInNewTab } from "../constant/Utils";-import { isEnableSubscription } from "../constant/const";+import { isEnableSubscription, isStaging } from "../constant/const";const Header = ({ showSidebar }) => {const navigate = useNavigate();@@ -86,7 +86,7 @@ const Header = ({ showSidebar }) => {};}, [isOpen]);const handleConsoleRedirect = () => {- if (window.location.host === "staging-app.opensignlabs.com") {+ if (isStaging) {window.open(" https://staging-console.opensignlabs.com/");} else {window.open("https://console.opensignlabs.com/");diff --git a/apps/OpenSign/src/pages/UserProfile.js b/apps/OpenSign/src/pages/UserProfile.jsindex 2e945fe7b..4dc0b36dc 100644--- a/apps/OpenSign/src/pages/UserProfile.js+++ b/apps/OpenSign/src/pages/UserProfile.js@@ -185,6 +185,7 @@ function UserProfile() {const json = JSON.parse(JSON.stringify([res]));const extRes = JSON.stringify(json);localStorage.setItem("Extand_Class", extRes);+ previousPublicUserName.current = publicUserName;// console.log("updateRes ", updateRes);};// file upload functiondiff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.jsindex 79e2c625e..26492e078 100644--- a/apps/OpenSign/src/primitives/GetReportDisplay.js+++ b/apps/OpenSign/src/primitives/GetReportDisplay.js@@ -1240,42 +1240,18 @@ const ReportTable = (props) => {<p className="text-lg">{props.isPublic[item.objectId]? `Are you sure you want to make this template public ?`- : `Are you sure you want to make this template private ? This will remove it from your public profile ?`}+ : `Are you sure you want to make this template private? This will remove it from your public profile.`}</p>{props.isPublic[item.objectId] && (<div className="flex mt-2 gap-2 md:items-center"><p className="text-[15px]">Public role :{" "}</p>- {/* {item?.Placeholders?.length > 1 ? (- <select- className="w-[60%] md:w-[70%] border-[1px] border-gray-200 rounded-sm p-[2px]"- name="textvalidate"- value={selectedPublicRole}- onChange={(e) =>- setSelectedPublicRole(- e.target.value- )- }- >- <option- disabled- style={{ fontSize: "13px" }}- value=""- >- Select...- </option>- {handleShowRole(item)}- </select>- ) : ( */}+<inputclassName="op-input op-input-bordered focus:outline-none hover:border-base-content op-input-sm"value={handleShowRole(item)}/>- {/* {item?.Placeholders[0]?.Role} */}- {/* {handleShowRole(item)} */}- {/* </div> */}- {/* )} */}</div>)}</div>@@ -1306,27 +1282,24 @@ const ReportTable = (props) => {handleClose={() => {setIsPublicProfile({});}}- reduceWidth={- "md:min-w-[440px] md:max-w-[550px]"- }><div className="m-[20px]">{publicUserName ? (<div className="font-normal text-black"><p>- Here’s your public URL. Copy or share- it with the signer, and you will be- able to see all your publicly set+ Here’s your public URL: Copy it or+ share it with the signer, and you will+ be able to see all your publicly settemplates.</p>- <div className=" flex items-center gap-5 mt-2 p-[2px] w-[75%]">+ <div className=" flex items-center gap-3 mt-2 p-[2px] "><span className="font-bold">Public URL :{" "}</span><spanonClick={() => copytoProfileLink()}className="underline underline-offset-2 cursor-pointer"- >{`https://opensign-me.vercel.app/${publicUserName}`}</span>+ >{`https://opensign.me/${publicUserName}`}</span></div></div>) : (diff --git a/apps/OpenSign/src/script/PublicTemplate.js b/apps/OpenSign/src/script/PublicTemplate.jsindex 8dddb4743..54f48d0ef 100644--- a/apps/OpenSign/src/script/PublicTemplate.js+++ b/apps/OpenSign/src/script/PublicTemplate.js@@ -23,7 +23,7 @@ const appId = process.env.REACT_APP_APPID: "opensign";const serverUrl = process.env.REACT_APP_SERVERURL? process.env.REACT_APP_SERVERURL- : window.location.origin + "/api/app";+ : "https://staging-app.opensignlabs.com/api/app";localStorage.setItem("baseUrl", `${serverUrl}/`);localStorage.setItem("parseAppId", appId);Parse.initialize(appId);@@ -33,7 +33,7 @@ const scriptComponent = document.createElement("div");scriptComponent.id = "script-component";document.body.appendChild(scriptComponent);const link = document.createElement("link");-link.href = `${process.env.PUBLIC_URL}/css/fonts.css`;+link.href = "https://staging-app.opensignlabs.com/css/fonts.css";link.rel = "stylesheet";document.head.appendChild(link);