mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
chore: lint with oxc
This commit is contained in:
@ -147,7 +147,12 @@ export default async function OpenPage() {
|
|||||||
<p className="text-muted-foreground mt-4 max-w-[60ch] text-center text-lg leading-normal">
|
<p className="text-muted-foreground mt-4 max-w-[60ch] text-center text-lg leading-normal">
|
||||||
All our metrics, finances, and learnings are public. We believe in transparency and want
|
All our metrics, finances, and learnings are public. We believe in transparency and want
|
||||||
to share our journey with you. You can read more about why here:{' '}
|
to share our journey with you. You can read more about why here:{' '}
|
||||||
<a className="font-bold" href="https://documenso.com/blog/pre-seed" target="_blank">
|
<a
|
||||||
|
className="font-bold"
|
||||||
|
href="https://documenso.com/blog/pre-seed"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
Announcing Open Metrics
|
Announcing Open Metrics
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export default function PricingPage() {
|
|||||||
|
|
||||||
<div className="mt-4 flex justify-center">
|
<div className="mt-4 flex justify-center">
|
||||||
<Button variant="outline" size="lg" className="rounded-full hover:cursor-pointer" asChild>
|
<Button variant="outline" size="lg" className="rounded-full hover:cursor-pointer" asChild>
|
||||||
<Link href="https://github.com/documenso/documenso" target="_blank">
|
<Link href="https://github.com/documenso/documenso" target="_blank" rel="noreferrer">
|
||||||
Get Started
|
Get Started
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
@ -166,6 +166,7 @@ export default function PricingPage() {
|
|||||||
<Link
|
<Link
|
||||||
className="text-documenso-700 font-bold"
|
className="text-documenso-700 font-bold"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
href="mailto:support@documenso.com"
|
href="mailto:support@documenso.com"
|
||||||
>
|
>
|
||||||
support@documenso.com
|
support@documenso.com
|
||||||
@ -175,6 +176,7 @@ export default function PricingPage() {
|
|||||||
className="text-documenso-700 font-bold"
|
className="text-documenso-700 font-bold"
|
||||||
href="https://documen.so/discord"
|
href="https://documen.so/discord"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
in our Discord-Support-Channel
|
in our Discord-Support-Channel
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
|
|||||||
@ -123,7 +123,7 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
|
|||||||
<div className="mt-8 flex w-full flex-col divide-y">
|
<div className="mt-8 flex w-full flex-col divide-y">
|
||||||
<p className="text-foreground py-4 font-medium">
|
<p className="text-foreground py-4 font-medium">
|
||||||
{' '}
|
{' '}
|
||||||
<a href="https://documenso.com/blog/early-adopters" target="_blank">
|
<a href="https://documenso.com/blog/early-adopters" target="_blank" rel="noreferrer">
|
||||||
The Early Adopter Deal:
|
The Early Adopter Deal:
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -133,7 +133,11 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
|
|||||||
<p className="text-foreground py-4">
|
<p className="text-foreground py-4">
|
||||||
<strong>
|
<strong>
|
||||||
{' '}
|
{' '}
|
||||||
<a href="https://documenso.com/blog/early-adopters" target="_blank">
|
<a
|
||||||
|
href="https://documenso.com/blog/early-adopters"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
Includes all upcoming features
|
Includes all upcoming features
|
||||||
</a>
|
</a>
|
||||||
</strong>
|
</strong>
|
||||||
|
|||||||
@ -108,88 +108,86 @@ export const ResendDocumentActionItem = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
<DialogTrigger asChild>
|
||||||
<DialogTrigger asChild>
|
<DropdownMenuItem disabled={isDisabled} onSelect={(e) => e.preventDefault()}>
|
||||||
<DropdownMenuItem disabled={isDisabled} onSelect={(e) => e.preventDefault()}>
|
<History className="mr-2 h-4 w-4" />
|
||||||
<History className="mr-2 h-4 w-4" />
|
Resend
|
||||||
Resend
|
</DropdownMenuItem>
|
||||||
</DropdownMenuItem>
|
</DialogTrigger>
|
||||||
</DialogTrigger>
|
|
||||||
|
|
||||||
<DialogContent className="sm:max-w-sm" hideClose>
|
<DialogContent className="sm:max-w-sm" hideClose>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<h1 className="text-center text-xl">Who do you want to remind?</h1>
|
<h1 className="text-center text-xl">Who do you want to remind?</h1>
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form id={FORM_ID} onSubmit={handleSubmit(onFormSubmit)} className="px-3">
|
<form id={FORM_ID} onSubmit={handleSubmit(onFormSubmit)} className="px-3">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="recipients"
|
name="recipients"
|
||||||
render={({ field: { value, onChange } }) => (
|
render={({ field: { value, onChange } }) => (
|
||||||
<>
|
<>
|
||||||
{recipients.map((recipient) => (
|
{recipients.map((recipient) => (
|
||||||
<FormItem
|
<FormItem
|
||||||
key={recipient.id}
|
key={recipient.id}
|
||||||
className="flex flex-row items-center justify-between gap-x-3"
|
className="flex flex-row items-center justify-between gap-x-3"
|
||||||
|
>
|
||||||
|
<FormLabel
|
||||||
|
className={cn('my-2 flex items-center gap-2 font-normal', {
|
||||||
|
'opacity-50': !value.includes(recipient.id),
|
||||||
|
})}
|
||||||
>
|
>
|
||||||
<FormLabel
|
<StackAvatar
|
||||||
className={cn('my-2 flex items-center gap-2 font-normal', {
|
key={recipient.id}
|
||||||
'opacity-50': !value.includes(recipient.id),
|
type={getRecipientType(recipient)}
|
||||||
})}
|
fallbackText={recipientAbbreviation(recipient)}
|
||||||
>
|
/>
|
||||||
<StackAvatar
|
{recipient.email}
|
||||||
key={recipient.id}
|
</FormLabel>
|
||||||
type={getRecipientType(recipient)}
|
|
||||||
fallbackText={recipientAbbreviation(recipient)}
|
|
||||||
/>
|
|
||||||
{recipient.email}
|
|
||||||
</FormLabel>
|
|
||||||
|
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black "
|
className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black "
|
||||||
checkClassName="text-white"
|
checkClassName="text-white"
|
||||||
value={recipient.id}
|
value={recipient.id}
|
||||||
checked={value.includes(recipient.id)}
|
checked={value.includes(recipient.id)}
|
||||||
onCheckedChange={(checked: boolean) =>
|
onCheckedChange={(checked: boolean) =>
|
||||||
checked
|
checked
|
||||||
? onChange([...value, recipient.id])
|
? onChange([...value, recipient.id])
|
||||||
: onChange(value.filter((v) => v !== recipient.id))
|
: onChange(value.filter((v) => v !== recipient.id))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<div className="flex w-full flex-1 flex-nowrap gap-4">
|
<div className="flex w-full flex-1 flex-nowrap gap-4">
|
||||||
<DialogClose asChild>
|
<DialogClose asChild>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
|
className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
|
||||||
</DialogClose>
|
|
||||||
|
|
||||||
<Button className="flex-1" loading={isSubmitting} type="submit" form={FORM_ID}>
|
|
||||||
Send reminder
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</DialogClose>
|
||||||
</DialogFooter>
|
|
||||||
</DialogContent>
|
<Button className="flex-1" loading={isSubmitting} type="submit" form={FORM_ID}>
|
||||||
</Dialog>
|
Send reminder
|
||||||
</>
|
</Button>
|
||||||
|
</div>
|
||||||
|
</DialogFooter>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export const setupTwoFactorAuthentication = async ({
|
|||||||
|
|
||||||
const secret = crypto.randomBytes(10);
|
const secret = crypto.randomBytes(10);
|
||||||
|
|
||||||
const backupCodes = new Array(10)
|
const backupCodes = Array.from({ length: 10 })
|
||||||
.fill(null)
|
.fill(null)
|
||||||
.map(() => crypto.randomBytes(5).toString('hex'))
|
.map(() => crypto.randomBytes(5).toString('hex'))
|
||||||
.map((code) => `${code.slice(0, 5)}-${code.slice(5)}`.toUpperCase());
|
.map((code) => `${code.slice(0, 5)}-${code.slice(5)}`.toUpperCase());
|
||||||
|
|||||||
Reference in New Issue
Block a user