From 0f28692a39ae2d0d13f858c38725397421b1e971 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Sun, 7 May 2023 11:25:12 +0000 Subject: [PATCH 1/6] Update readme --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a6c0ab8ad..e0e46d0d3 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ The current project goal is to [release a production ready version](https://g - To contribute please see our [contribution guide](https://github.com/documenso/documenso/blob/main/CONTRIBUTING.md). -## Tools + # Tech @@ -86,7 +86,7 @@ Documenso is built using awesome open source tech including: - [Node SignPDF (Digital Signature)](https://github.com/vbuch/node-signpdf) - [React-PDF for viewing PDFs](https://github.com/wojtekmaj/react-pdf) - [PDF-Lib for PDF manipulation](https://github.com/Hopding/pdf-lib) -- Check out /packages.json and /apps/web/package.json for more +- Check out `/packages.json` and `/apps/web/package.json` for more - Support for [opensignpdf (requires Java on server)](https://github.com/open-pdf-sign) is currently planned. # Getting Started @@ -111,7 +111,7 @@ Want to get up and running quickly? Follow these steps: git clone https://github.com/documenso/documenso ``` -- Set up your .env file using the recommendations in the .env.example file. +- Set up your `.env` file using the recommendations in the `.env.example` file. - Run `npm run dx` in the root directory - This will spin up a postgres database and inbucket mail server in docker containers. - Run `npm run dev` in the root directory @@ -124,7 +124,7 @@ That's it! You should now be able to access the app at http://localhost:3000 Incoming mail will be available at http://localhost:9000 -Your database will also be available on port `5432`. You can connect to it using your favorite database client. +Your database will also be available on port `54320`. You can connect to it using your favorite database client. ## Developer Setup @@ -150,24 +150,24 @@ Follow these steps to setup documenso on you local machine: --- - Optional: Seed the database using npm run db-seed to create a test user and document -- Optional: Upload and sign apps\web\ressources\example.pdf manually to test your setup +- Optional: Upload and sign apps/web/ressources/example.pdf manually to test your setup - Optional: Create your own signing certificate - - A demo certificate is provided in /app/web/ressources/certificate.p12 - - To generate your own using these steps and a linux Terminal or Windows Linux Subsystem see **Create your own signing certificate**. + - A demo certificate is provided in `/app/web/ressources/certificate.p12` + - To generate your own using these steps and a Linux Terminal or Windows Subsystem for Linux (WSL) see **[Create your own signing certificate](#creating-your-own-signing-certificate)**. ## Updating - If you pull the newest version from main, using git pull, it may be necessary to regenerate your database client -- You can do this by running the generate command in /packages/prisma: +- You can do this by running the generate command in `/packages/prisma`: ```sh npx prisma generate ``` -- This is not necessary on first clone +- This is not necessary on first clone. # Creating your own signing certificate -For the digital signature of your documents you need a signing certificate in .p12 formate (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one: +For the digital signature of your documents you need a signing certificate in .p12 format (public and private key). You can buy one (not recommended for dev) or use the steps to create a self-signed one: 1. Generate a private key using the OpenSSL command. You can run the following command to generate a 2048-bit RSA key:\ openssl genrsa -out private.key 2048 From 85c593d8e346f5650be3531aa1772b3441bfef96 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan <55143799+dephraiim@users.noreply.github.com> Date: Tue, 9 May 2023 07:24:38 +0000 Subject: [PATCH 2/6] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0e46d0d3..c70655905 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Documenso is built using awesome open source tech including: - [Node SignPDF (Digital Signature)](https://github.com/vbuch/node-signpdf) - [React-PDF for viewing PDFs](https://github.com/wojtekmaj/react-pdf) - [PDF-Lib for PDF manipulation](https://github.com/Hopding/pdf-lib) -- Check out `/packages.json` and `/apps/web/package.json` for more +- Check out `/package.json` and `/apps/web/package.json` for more - Support for [opensignpdf (requires Java on server)](https://github.com/open-pdf-sign) is currently planned. # Getting Started From 825231fe2a35f770a9425a06a5f131235e58f91a Mon Sep 17 00:00:00 2001 From: Piyush Maurya Date: Thu, 11 May 2023 12:15:41 +0530 Subject: [PATCH 3/6] Adds tooltip to recipient action buttons --- apps/web/pages/documents.tsx | 21 +++--- apps/web/pages/documents/[id]/recipients.tsx | 72 +++++++++++--------- packages/ui/components/tooltip/Tooltip.tsx | 34 +++++++++ packages/ui/components/tooltip/index.ts | 1 + packages/ui/index.ts | 1 + 5 files changed, 87 insertions(+), 42 deletions(-) create mode 100644 packages/ui/components/tooltip/Tooltip.tsx create mode 100644 packages/ui/components/tooltip/index.ts diff --git a/apps/web/pages/documents.tsx b/apps/web/pages/documents.tsx index af6752d47..3bda20aff 100644 --- a/apps/web/pages/documents.tsx +++ b/apps/web/pages/documents.tsx @@ -303,16 +303,17 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
- { - event.preventDefault(); - event.stopPropagation(); - router.push("/documents/" + document.id); - }} - disabled={document.status === "COMPLETED"} - /> + {document.status !== "COMPLETED" && ( + { + event.preventDefault(); + event.stopPropagation(); + router.push("/documents/" + document.id); + }} + /> + )} {
{props.document.status !== DocumentStatus.COMPLETED && (
- { - if (confirm("Resend this signing request?")) { - setLoading(true); - sendSigningRequests(props.document, [item.id]).finally(() => { - setLoading(false); - }); + + - Resend - - { - const removedItem = { ...fields }[index]; - remove(index); - deleteRecipient(item)?.catch((err) => { - append(removedItem); - }); - }} - className="group-hover:text-neon-dark group-hover:disabled:text-gray-400" - /> + className="my-auto mr-4 h-9" + onClick={(event: any) => { + event.preventDefault(); + event.stopPropagation(); + if (confirm("Resend this signing request?")) { + setLoading(true); + sendSigningRequests(props.document, [item.id]).finally(() => { + setLoading(false); + }); + } + }}> + + + + { + event.preventDefault(); + event.stopPropagation(); + if (confirm("Delete this signing request?")) { + const removedItem = { ...fields }[index]; + remove(index); + deleteRecipient(item)?.catch((err) => { + append(removedItem); + }); + } + }} + className="group-hover:text-neon-dark group-hover:disabled:text-gray-400" + /> +
)} diff --git a/packages/ui/components/tooltip/Tooltip.tsx b/packages/ui/components/tooltip/Tooltip.tsx new file mode 100644 index 000000000..b7b3749e0 --- /dev/null +++ b/packages/ui/components/tooltip/Tooltip.tsx @@ -0,0 +1,34 @@ +import React, { useState } from "react"; + +export function Tooltip(props: any) { + let timeout: NodeJS.Timeout; + const [active, setActive] = useState(false); + + const showTip = () => { + timeout = setTimeout(() => { + setActive(true); + }, props.delay || 40); + }; + + const hideTip = () => { + clearInterval(timeout); + setActive(false); + }; + + return ( +
+ {props.children} + {active && ( +
+ + {props.label} + +
+ )} +
+ ); +}; diff --git a/packages/ui/components/tooltip/index.ts b/packages/ui/components/tooltip/index.ts new file mode 100644 index 000000000..3d7eea698 --- /dev/null +++ b/packages/ui/components/tooltip/index.ts @@ -0,0 +1 @@ +export { Tooltip } from "./Tooltip"; \ No newline at end of file diff --git a/packages/ui/index.ts b/packages/ui/index.ts index 1cb0c6752..a320043be 100644 --- a/packages/ui/index.ts +++ b/packages/ui/index.ts @@ -2,3 +2,4 @@ export { Button, IconButton } from "./components/button/index"; export { SelectBox } from "./components/selectBox/index"; export { Breadcrumb } from "./components/breadcrumb/index"; export { Dialog } from "./components/dialog/index"; +export { Tooltip } from "./components/tooltip/index"; From 4f47bbb5526f3186c46aaf83c79e6720206ceb78 Mon Sep 17 00:00:00 2001 From: Piyush Maurya Date: Thu, 11 May 2023 14:03:13 +0530 Subject: [PATCH 4/6] Adds consistent 'className' to action buttons --- apps/web/pages/documents/[id]/recipients.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/pages/documents/[id]/recipients.tsx b/apps/web/pages/documents/[id]/recipients.tsx index 838a8be45..9e59cb731 100644 --- a/apps/web/pages/documents/[id]/recipients.tsx +++ b/apps/web/pages/documents/[id]/recipients.tsx @@ -273,7 +273,6 @@ const RecipientsPage: NextPageWithLayout = (props: any) => { item.signingStatus === "SIGNED" || loading } - className="my-auto mr-4 h-9" onClick={(event: any) => { event.preventDefault(); event.stopPropagation(); @@ -283,8 +282,9 @@ const RecipientsPage: NextPageWithLayout = (props: any) => { setLoading(false); }); } - }}> - + }} + className="mx-1 group-hover:text-neon-dark group-hover:disabled:text-gray-400" + /> { }); } }} - className="group-hover:text-neon-dark group-hover:disabled:text-gray-400" + className="mx-1 group-hover:text-neon-dark group-hover:disabled:text-gray-400" /> From 826704c21fdc0cb6006fe11b92ae01c1080ebb74 Mon Sep 17 00:00:00 2001 From: Piyush Maurya Date: Thu, 11 May 2023 21:00:05 +0530 Subject: [PATCH 5/6] Adds animation to tooltip --- apps/web/pages/documents.tsx | 21 +++++++++---------- packages/ui/components/tooltip/Tooltip.tsx | 24 +++++++++++----------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/apps/web/pages/documents.tsx b/apps/web/pages/documents.tsx index 3bda20aff..af6752d47 100644 --- a/apps/web/pages/documents.tsx +++ b/apps/web/pages/documents.tsx @@ -303,17 +303,16 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
- {document.status !== "COMPLETED" && ( - { - event.preventDefault(); - event.stopPropagation(); - router.push("/documents/" + document.id); - }} - /> - )} + { + event.preventDefault(); + event.stopPropagation(); + router.push("/documents/" + document.id); + }} + disabled={document.status === "COMPLETED"} + /> +
{props.children} - {active && ( -
- - {props.label} - -
- )} +
+ + {props.label} + +
); }; From f34813e4509fac94de1515df6dacc5aeb830c08f Mon Sep 17 00:00:00 2001 From: Abiel Zulio M <7030944+abielzulio@users.noreply.github.com> Date: Sun, 14 May 2023 20:13:45 +0700 Subject: [PATCH 6/6] Update login.tsx --- apps/web/components/login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/components/login.tsx b/apps/web/components/login.tsx index bd968ddc6..2d9262c2a 100644 --- a/apps/web/components/login.tsx +++ b/apps/web/components/login.tsx @@ -151,7 +151,7 @@ export default function Login(props: any) { - Hosted Documenso will be availible soon™ + Hosted Documenso will be available soon™

)}