Corrected ts and tsx files
This commit is contained in:
@@ -12,7 +12,7 @@ If you plan to contribute to Documenso, please take a moment to feel awesome ✨
|
|||||||
|
|
||||||
- The development branch is <code>main</code>. All pull request should be made against this branch.
|
- The development branch is <code>main</code>. All pull request should be made against this branch.
|
||||||
- If you need help getting started, [join us on Slack](https://documen.so/slack).
|
- If you need help getting started, [join us on Slack](https://documen.so/slack).
|
||||||
- Use [Convential Commits](https://www.conventionalcommits.org/) to keep everything nice and clean.
|
- Use [Conventional Commits](https://www.conventionalcommits.org/) to keep everything nice and clean.
|
||||||
- Choose your branch name using the issue you are working on and a coventional commit type.
|
- Choose your branch name using the issue you are working on and a coventional commit type.
|
||||||
|
|
||||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your
|
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export const BillingPlans = () => {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p className="mt-4 text-center text-sm text-gray-500">
|
<p className="mt-4 text-center text-sm text-gray-500">
|
||||||
All you need for easy signing. <br></br>Includes everthing we build this year.
|
All you need for easy signing. <br></br>Includes everything we build this year.
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default function PDFEditor(props: any) {
|
|||||||
movedField.positionY = position.y.toFixed(0);
|
movedField.positionY = position.y.toFixed(0);
|
||||||
createOrUpdateField(props.document, movedField);
|
createOrUpdateField(props.document, movedField);
|
||||||
|
|
||||||
// no instant redraw neccessary, position information for saving or later rerender is enough
|
// no instant redraw necessary, position information for saving or later rerender is enough
|
||||||
// setFields(newFields);
|
// setFields(newFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function SignatureDialog(props: any) {
|
|||||||
const [typedSignature, setTypedSignature] = useState("");
|
const [typedSignature, setTypedSignature] = useState("");
|
||||||
const [signatureEmpty, setSignatureEmpty] = useState(true);
|
const [signatureEmpty, setSignatureEmpty] = useState(true);
|
||||||
// This is a workaround to prevent the canvas from being rendered when the dialog is closed
|
// This is a workaround to prevent the canvas from being rendered when the dialog is closed
|
||||||
// we also need the debounce to avoid rendering while transitions are occuring.
|
// we also need the debounce to avoid rendering while transitions are occurring.
|
||||||
const showCanvas = useDebouncedValue<boolean>(props.open, 1);
|
const showCanvas = useDebouncedValue<boolean>(props.open, 1);
|
||||||
let signCanvasRef: any | undefined;
|
let signCanvasRef: any | undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
return res.status(200).send(recipients.length);
|
return res.status(200).send(recipients.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.status(502).end("Coud not send request for signing.");
|
return res.status(502).end("Could not send request for signing.");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return res.status(502).end("Coud not send request for signing.");
|
return res.status(502).end("Could not send request for signing.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
for (const signature of signaturesFromBody) {
|
for (const signature of signaturesFromBody) {
|
||||||
if (!signature.signatureImage && !signature.typedSignature) {
|
if (!signature.signatureImage && !signature.typedSignature) {
|
||||||
documentWithInserts = document.document;
|
documentWithInserts = document.document;
|
||||||
throw new Error("Cant't save invalid signature.");
|
throw new Error("Can't save invalid signature.");
|
||||||
}
|
}
|
||||||
|
|
||||||
await saveSignature(signature);
|
await saveSignature(signature);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function getServerErrorFromUnknown(cause: unknown): HttpError {
|
|||||||
return new Error(cause, { cause });
|
return new Error(cause, { cause });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Catch-All if none of the above triggered and something (even more) unexpected happend
|
// Catch-All if none of the above triggered and something (even more) unexpected happened
|
||||||
return new HttpError({
|
return new HttpError({
|
||||||
statusCode: 500,
|
statusCode: 500,
|
||||||
message: `Unhandled error of type '${typeof cause}'. Please reach out for our customer support.`,
|
message: `Unhandled error of type '${typeof cause}'. Please reach out for our customer support.`,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { PDFDocument, PDFHexString, PDFName, PDFNumber, PDFString } from "pdf-lib";
|
import { PDFDocument, PDFHexString, PDFName, PDFNumber, PDFString } from "pdf-lib";
|
||||||
|
|
||||||
// Local copy of Node SignPDF because https://github.com/vbuch/node-signpdf/pull/187 was not published in NPM yet. Can be switched to npm packge.
|
// Local copy of Node SignPDF because https://github.com/vbuch/node-signpdf/pull/187 was not published in NPM yet. Can be switched to npm package.
|
||||||
const signer = require("./node-signpdf/dist/signpdf");
|
const signer = require("./node-signpdf/dist/signpdf");
|
||||||
|
|
||||||
export const addDigitalSignature = async (documentAsBase64: string): Promise<string> => {
|
export const addDigitalSignature = async (documentAsBase64: string): Promise<string> => {
|
||||||
|
|||||||
Reference in New Issue
Block a user