Merge branch 'main' into update-documents-avatar

This commit is contained in:
Ashraf Chowdury
2024-01-04 20:45:39 +06:00
committed by GitHub
12 changed files with 702 additions and 356 deletions

View File

@ -15,11 +15,10 @@ jobs:
- uses: actions/stale@v4 - uses: actions/stale@v4
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-pr-stale: 30 days-before-pr-stale: 90
days-before-issue-stale: 30 days-before-issue-stale: 90
stale-issue-message: 'This issue has not seen activity for a while. It will be closed in 30 days unless further activity is detected' days-before-issue-close: 180
stale-pr-message: 'This PR has not seen activitiy for a while. It will be closed in 30 days unless further activity is detected.' stale-pr-message: 'This PR has not seen activitiy for a while. It will be closed in 30 days unless further activity is detected.'
close-issue-message: 'This issue has been closed because of inactivity.'
close-pr-message: 'This PR has been closed because of inactivity.' close-pr-message: 'This PR has been closed because of inactivity.'
exempt-pr-labels: 'WIP,on-hold,needs review' exempt-pr-labels: 'WIP,on-hold,needs review'
exempt-issue-labels: 'WIP,on-hold,needs review,roadmap,assigned' exempt-issue-labels: 'WIP,on-hold,needs review,roadmap,assigned,needs triage'

View File

@ -115,10 +115,12 @@ To run Documenso locally, you will need
Want to get up and running quickly? Follow these steps: Want to get up and running quickly? Follow these steps:
1. [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device. 1. [Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) to your GitHub account.
After forking the repository, clone it to your local device by using the following command:
```sh ```sh
git clone https://github.com/documenso/documenso git clone https://github.com/<your-username>/documenso
``` ```
2. Set up your `.env` file using the recommendations in the `.env.example` file. Alternatively, just run `cp .env.example .env` to get started with our handpicked defaults. 2. Set up your `.env` file using the recommendations in the `.env.example` file. Alternatively, just run `cp .env.example .env` to get started with our handpicked defaults.
@ -152,10 +154,12 @@ npm run d
Follow these steps to setup Documenso on your local machine: Follow these steps to setup Documenso on your local machine:
1. [Clone the repository](https://help.github.com/articles/cloning-a-repository/) it to your local device. 1. [Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) to your GitHub account.
After forking the repository, clone it to your local device by using the following command:
```sh ```sh
git clone https://github.com/documenso/documenso git clone https://github.com/<your-username>/documenso
``` ```
2. Run `npm i` in the root directory 2. Run `npm i` in the root directory
@ -280,12 +284,16 @@ WantedBy=multi-user.target
### Railway ### Railway
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/DjrRRX) [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/bG6D4p)
### Render ### Render
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/documenso/documenso) [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/documenso/documenso)
### Koyeb
[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/documenso/documenso&branch=main&name=documenso-app&builder=dockerfile&dockerfile=/docker/Dockerfile)
## Troubleshooting ## Troubleshooting
### I'm not receiving any emails when using the developer quickstart. ### I'm not receiving any emails when using the developer quickstart.

View File

@ -36,7 +36,7 @@
"react-hook-form": "^7.43.9", "react-hook-form": "^7.43.9",
"react-icons": "^4.11.0", "react-icons": "^4.11.0",
"recharts": "^2.7.2", "recharts": "^2.7.2",
"sharp": "0.32.5", "sharp": "0.33.1",
"typescript": "5.2.2", "typescript": "5.2.2",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },

View File

@ -39,7 +39,7 @@ export const Footer = ({ className, ...props }: FooterProps) => {
return ( return (
<div className={cn('border-t py-12', className)} {...props}> <div className={cn('border-t py-12', className)} {...props}>
<div className="mx-auto flex w-full max-w-screen-xl flex-wrap items-start justify-between gap-8 px-8"> <div className="mx-auto flex w-full max-w-screen-xl flex-wrap items-start justify-between gap-8 px-8">
<div> <div className="flex-shrink-0">
<Link href="/"> <Link href="/">
<Image <Image
src={LogoImage} src={LogoImage}
@ -64,13 +64,13 @@ export const Footer = ({ className, ...props }: FooterProps) => {
</div> </div>
</div> </div>
<div className="grid max-w-xs flex-1 grid-cols-2 gap-x-4 gap-y-2"> <div className="grid w-full max-w-sm grid-cols-2 gap-x-4 gap-y-2 md:w-auto md:gap-x-8">
{FOOTER_LINKS.map((link, index) => ( {FOOTER_LINKS.map((link, index) => (
<Link <Link
key={index} key={index}
href={link.href} href={link.href}
target={link.target} target={link.target}
className="text-muted-foreground hover:text-muted-foreground/80 flex-shrink-0 text-sm" className="text-muted-foreground hover:text-muted-foreground/80 flex-shrink-0 break-words text-sm"
> >
{link.text} {link.text}
</Link> </Link>

View File

@ -42,7 +42,7 @@
"react-hotkeys-hook": "^4.4.1", "react-hotkeys-hook": "^4.4.1",
"react-icons": "^4.11.0", "react-icons": "^4.11.0",
"react-rnd": "^10.4.1", "react-rnd": "^10.4.1",
"sharp": "0.32.5", "sharp": "0.33.1",
"ts-pattern": "^5.0.5", "ts-pattern": "^5.0.5",
"typescript": "5.2.2", "typescript": "5.2.2",
"uqr": "^0.1.2", "uqr": "^0.1.2",

979
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
"eslint-config-next": "13.4.19", "eslint-config-next": "13.4.19",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.3", "eslint-config-turbo": "^1.9.3",
"eslint-plugin-package-json": "^0.1.4", "eslint-plugin-package-json": "^0.2.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2", "eslint-plugin-react": "^7.32.2",
"eslint-plugin-unused-imports": "^3.0.0", "eslint-plugin-unused-imports": "^3.0.0",

View File

@ -8,6 +8,7 @@ export type CreateDocumentMetaOptions = {
message: string; message: string;
timezone: string; timezone: string;
dateFormat: string; dateFormat: string;
userId: number;
}; };
export const upsertDocumentMeta = async ({ export const upsertDocumentMeta = async ({
@ -16,7 +17,15 @@ export const upsertDocumentMeta = async ({
timezone, timezone,
dateFormat, dateFormat,
documentId, documentId,
userId,
}: CreateDocumentMetaOptions) => { }: CreateDocumentMetaOptions) => {
await prisma.document.findFirstOrThrow({
where: {
id: documentId,
userId,
},
});
return await prisma.documentMeta.upsert({ return await prisma.documentMeta.upsert({
where: { where: {
documentId, documentId,

View File

@ -8,7 +8,7 @@
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"postcss": "^8.4.21", "postcss": "^8.4.32",
"tailwindcss": "3.3.2", "tailwindcss": "3.3.2",
"tailwindcss-animate": "^1.0.5" "tailwindcss-animate": "^1.0.5"
}, },

View File

@ -188,6 +188,7 @@ export const documentRouter = router({
message: meta.message, message: meta.message,
dateFormat: meta.dateFormat, dateFormat: meta.dateFormat,
timezone: meta.timezone, timezone: meta.timezone,
userId: ctx.user.id,
}); });
} }

View File

@ -160,14 +160,14 @@ export const AddSubjectFormPartial = ({
</ul> </ul>
</div> </div>
<Accordion type="multiple" className="mt-8 border-none"> {hasDateField && (
<AccordionItem value="advanced-options" className="border-none"> <Accordion type="multiple" className="mt-8 border-none">
<AccordionTrigger className="mb-2 border-b text-left hover:no-underline"> <AccordionItem value="advanced-options" className="border-none">
Advanced Options <AccordionTrigger className="mb-2 border-b text-left hover:no-underline">
</AccordionTrigger> Advanced Options
</AccordionTrigger>
<AccordionContent className="text-muted-foreground -mx-1 flex max-w-prose flex-col px-1 text-sm leading-relaxed"> <AccordionContent className="text-muted-foreground -mx-1 flex max-w-prose flex-col px-1 text-sm leading-relaxed">
{hasDateField && (
<div className="mt-2 flex flex-col"> <div className="mt-2 flex flex-col">
<Label htmlFor="date-format"> <Label htmlFor="date-format">
Date Format <span className="text-muted-foreground">(Optional)</span> Date Format <span className="text-muted-foreground">(Optional)</span>
@ -194,9 +194,7 @@ export const AddSubjectFormPartial = ({
)} )}
/> />
</div> </div>
)}
{hasDateField && (
<div className="mt-4 flex flex-col"> <div className="mt-4 flex flex-col">
<Label htmlFor="time-zone"> <Label htmlFor="time-zone">
Time Zone <span className="text-muted-foreground">(Optional)</span> Time Zone <span className="text-muted-foreground">(Optional)</span>
@ -216,10 +214,10 @@ export const AddSubjectFormPartial = ({
)} )}
/> />
</div> </div>
)} </AccordionContent>
</AccordionContent> </AccordionItem>
</AccordionItem> </Accordion>
</Accordion> )}
</div> </div>
</div> </div>
</DocumentFlowFormContainerContent> </DocumentFlowFormContainerContent>

4
railway.toml Normal file
View File

@ -0,0 +1,4 @@
[build]
builder = "DOCKERFILE"
dockerfilePath = "/docker/Dockerfile"