Skip to content
Merged

v2.13.1 #1604

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 67 additions & 161 deletions apps/OpenSign/package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions apps/OpenSign/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@lottiefiles/dotlottie-react": "^0.12.3",
"@lottiefiles/dotlottie-react": "^0.13.0",
"@pdf-lib/fontkit": "^1.1.1",
"@radix-ui/themes": "^3.1.6",
"@react-pdf/renderer": "^4.1.6",
Expand Down Expand Up @@ -42,7 +42,7 @@
"react-redux": "^9.2.0",
"react-rnd": "^10.4.14",
"react-router": "^7.1.5",
"react-scripts": "5.0.1",
"react-scripts": "^5.0.1",
"react-scrollbars-custom": "^4.1.1",
"react-select": "^5.10.0",
"react-signature-canvas": "^1.0.7",
Expand All @@ -58,7 +58,7 @@
"styled-components": "^5.3.0",
"web-vitals": "^4.2.4",
"ws": "^8.18.0",
"xlsx": "^0.18.5"
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"scripts": {
"build": "npm run version && react-scripts build",
Expand Down Expand Up @@ -96,10 +96,10 @@
}
},
"devDependencies": {
"@babel/core": "^7.26.8",
"@babel/preset-env": "^7.26.8",
"@babel/core": "^7.26.9",
"@babel/preset-env": "^7.26.9",
"@babel/preset-react": "^7.26.3",
"@babel/runtime-corejs2": "^7.26.7",
"@babel/runtime-corejs2": "^7.26.9",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"commitizen": "^4.3.1",
Expand Down
5 changes: 3 additions & 2 deletions apps/OpenSign/public/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en" data-theme="opensigncss">

<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
Expand All @@ -11,8 +12,8 @@
<link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.opensignlabs.com/fonts.css" />
<title>OpenSign™</title>
<link rel="stylesheet" href="https://cdn.opensignlabs.com/fonts.css" />
<title>...Loading</title>
</head>
<body>
<div id="root" style="touch-action:pan-x pan-y;"></div>
Expand Down
75 changes: 44 additions & 31 deletions apps/OpenSign/public/locales/de/translation.json

Large diffs are not rendered by default.

75 changes: 44 additions & 31 deletions apps/OpenSign/public/locales/en/translation.json

Large diffs are not rendered by default.

76 changes: 45 additions & 31 deletions apps/OpenSign/public/locales/es/translation.json

Large diffs are not rendered by default.

81 changes: 46 additions & 35 deletions apps/OpenSign/public/locales/fr/translation.json

Large diffs are not rendered by default.

75 changes: 44 additions & 31 deletions apps/OpenSign/public/locales/it/translation.json

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions apps/OpenSign/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Loader from "./primitives/Loader";
import UserList from "./pages/UserList";
import { serverUrl_fn } from "./constant/appinfo";
import DocSuccessPage from "./pages/DocSuccessPage";
import ValidateSession from "./primitives/ValidateSession";
const DebugPdf = lazy(() => import("./pages/DebugPdf"));
const ForgetPassword = lazy(() => import("./pages/ForgetPassword"));
const GuestLogin = lazy(() => import("./pages/GuestLogin"));
Expand All @@ -29,6 +30,7 @@ const ManageSign = lazy(() => import("./pages/Managesign"));
const AddAdmin = lazy(() => import("./pages/AddAdmin"));
const UpdateExistUserAdmin = lazy(() => import("./pages/UpdateExistUserAdmin"));
const Preferences = lazy(() => import("./pages/Preferences"));

pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
const AppLoader = () => {
return (
Expand Down Expand Up @@ -108,7 +110,13 @@ function App() {
path="/forgetpassword"
element={<LazyPage Page={ForgetPassword} />}
/>
<Route element={<HomeLayout />}>
<Route
element={
<ValidateSession>
<HomeLayout />
</ValidateSession>
}
>
<Route
path="/changepassword"
element={<LazyPage Page={ChangePassword} />}
Expand All @@ -121,7 +129,7 @@ function App() {
element={<LazyPage Page={UserProfile} />}
/>
<Route
path="/opensigndrive"
path="/drive"
element={<LazyPage Page={Opensigndrive} />}
/>
<Route
Expand Down
2 changes: 1 addition & 1 deletion apps/OpenSign/src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import axios from "axios";
import { openInNewTab } from "../constant/Utils";
import { useTranslation } from "react-i18next";
const Footer = () => {
const appName = "OpenSign™";
const { t } = useTranslation();
const [showButton, setShowButton] = useState(false);
const [version, setVersion] = useState("");
Expand Down Expand Up @@ -39,7 +40,6 @@ const Footer = () => {
};
}, []);

const appName = "OpenSign™";
const openUrl = () => {
openInNewTab(
"https://github.com/OpenSignLabs/OpenSign/releases/tag/" + version
Expand Down
99 changes: 56 additions & 43 deletions apps/OpenSign/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import {
saveLanguageInLocal
} from "../constant/Utils";
import { useTranslation } from "react-i18next";
const Header = ({ showSidebar, setIsMenu }) => {
import { appInfo } from "../constant/appinfo";

const Header = ({ showSidebar, setIsMenu, isConsole }) => {
const { t, i18n } = useTranslation();
const navigate = useNavigate();
const { width } = useWindowSize();
const username = localStorage.getItem("username") || "";
const image = localStorage.getItem("profileImg") || dp;
const [isOpen, setIsOpen] = useState(false);
const [applogo, setAppLogo] = useState(
localStorage.getItem("appLogo") || " "
);
const [applogo, setAppLogo] = useState("");

const toggleDropdown = () => {
setIsOpen(!isOpen);
Expand All @@ -36,7 +36,8 @@ const Header = ({ showSidebar, setIsMenu }) => {
if (applogo?.logo) {
setAppLogo(applogo?.logo);
} else {
setAppLogo(localStorage.getItem("appLogo") || "");
const logo = localStorage.getItem("appLogo") || appInfo.applogo;
setAppLogo(logo);
}
}

Expand Down Expand Up @@ -95,11 +96,13 @@ const Header = ({ showSidebar, setIsMenu }) => {
</div>
<div className="flex-1 ml-2">
<div className="h-[25px] md:h-[40px] w-auto overflow-hidden">
<img
className="object-contain h-full w-auto"
src={applogo}
alt="img"
/>
{applogo && (
<img
className="object-contain h-full w-auto"
src={applogo}
alt="logo"
/>
)}
</div>
</div>
<div id="profile-menu" className="flex-none gap-2">
Expand All @@ -121,55 +124,65 @@ const Header = ({ showSidebar, setIsMenu }) => {
{width >= 768 && (
<div
onClick={toggleDropdown}
role="button"
tabIndex="0"
className="cursor-pointer text-base-content text-sm"
>
{username && username}
</div>
)}
<div className="op-dropdown op-dropdown-end" id="profile-menu">
<div
className="op-dropdown op-dropdown-open op-dropdown-end"
id="profile-menu"
>
<div
tabIndex={0}
role="button"
onClick={toggleDropdown}
className="op-btn op-btn-ghost op-btn-xs w-[10px] h-[20px] hover:bg-transparent"
>
<i
tabIndex={0}
role="button"
onClick={toggleDropdown}
className="fa-light fa-angle-down text-base-content"
></i>
<i className="fa-light fa-angle-down text-base-content"></i>
</div>
<ul
tabIndex={0}
className={`mt-3 z-[1] p-2 shadow op-menu op-menu-sm op-dropdown-content text-base-content bg-base-100 rounded-box w-52 ${
className={`mt-3 z-[1] p-2 shadow op-dropdown-open op-menu op-menu-sm op-dropdown-content text-base-content bg-base-100 rounded-box w-52 ${
isOpen ? "" : "hidden"
}`}
>
<li onClick={() => openInNewTab("https://docs.opensignlabs.com")}>
<span>
<i className="fa-light fa-book"></i> {t("docs")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/profile");
}}
>
<span>
<i className="fa-light fa-user"></i> {t("profile")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/changepassword");
}}
>
<span>
<i className="fa-light fa-lock"></i> {t("change-password")}
</span>
</li>
{!isConsole && (
<>
<li
onClick={() =>
openInNewTab("https://docs.opensignlabs.com")
}
>
<span>
<i className="fa-light fa-book"></i> {t("docs")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/profile");
}}
>
<span>
<i className="fa-light fa-user"></i> {t("profile")}
</span>
</li>
<li
onClick={() => {
setIsOpen(false);
navigate("/changepassword");
}}
>
<span>
<i className="fa-light fa-lock"></i>{" "}
{t("change-password")}
</span>
</li>
</>
)}
<li onClick={closeDropdown}>
<span>
<i className="fa-light fa-arrow-right-from-bracket"></i>{" "}
Expand Down
6 changes: 4 additions & 2 deletions apps/OpenSign/src/components/Title.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import React from "react";
import { Helmet } from "react-helmet";

function Title({ title, drive }) {
const appName =
"OpenSign™";
return (
<Helmet>
<title>{drive ? title : `${title} - OpenSign™`}</title>
<meta name="description" content={`${title} - OpenSign™`} />
<title>{drive ? title : `${title} - ${appName}`}</title>
<meta name="description" content={`${title} - ${appName}`} />
<link
rel="icon"
type="image/png"
Expand Down
1 change: 0 additions & 1 deletion apps/OpenSign/src/components/dashboard/DashboardCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ const DashboardCard = (props) => {
id={props.Label}
iconColor={"white"}
message={t(`tour-mssg.${props.Label}`)}
// {props?.Data?.tourMessage}
/>
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions apps/OpenSign/src/components/opensigndrive/DriveBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,14 @@ function DriveBody(props) {
}

const signersName = () => {
const getSignersName = signerExist.map((data) => data.Name);
const signerName = getSignersName.join(", ");
const getSignersName =
signerExist?.length > 0 && signerExist?.map((data) => data?.Name || "");
const signerName =
getSignersName?.length > 0 ? getSignersName?.join(", ") : "";

return (
<span className="text-[12px] font-medium w-[90%] break-words">
{signerName}
{signerName && signerName}
</span>
);
};
Expand Down Expand Up @@ -626,7 +628,7 @@ function DriveBody(props) {
</tr>
</thead>
<tbody>
{props.pdfData.map((data, ind) => {
{props?.pdfData?.map((data, ind) => {
return (
<React.Fragment key={ind}>
{handleFolderData(data, ind, "table")}
Expand Down
Loading