diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index ab21e8828..ffb788c23 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -33,3 +33,4 @@ body: - label: I have explained the use case or scenario for this feature. - label: I have included any relevant technical details or design suggestions. - label: I understand that this is a suggestion and that there is no guarantee of implementation. + - label: I want to work on creating a PR for this issue if approved diff --git a/apps/marketing/src/app/(marketing)/open/data.ts b/apps/marketing/src/app/(marketing)/open/data.ts index 3b109ea74..a3f314d9f 100644 --- a/apps/marketing/src/app/(marketing)/open/data.ts +++ b/apps/marketing/src/app/(marketing)/open/data.ts @@ -47,6 +47,14 @@ export const TEAM_MEMBERS = [ engagement: 'Full-Time', joinDate: 'October 9th, 2023', }, + { + name: 'Adithya Krishna', + role: 'Software Engineer - II', + salary: '-', + location: 'India', + engagement: 'Full-Time', + joinDate: 'December 1st, 2023', + }, ]; export const FUNDING_RAISED = [ diff --git a/apps/web/src/app/(dashboard)/settings/security/page.tsx b/apps/web/src/app/(dashboard)/settings/security/page.tsx index 9e99b73e8..ae97e7fb5 100644 --- a/apps/web/src/app/(dashboard)/settings/security/page.tsx +++ b/apps/web/src/app/(dashboard)/settings/security/page.tsx @@ -1,3 +1,4 @@ +import { IDENTITY_PROVIDER_NAME } from '@documenso/lib/constants/auth'; import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session'; import { AuthenticatorApp } from '~/components/forms/2fa/authenticator-app'; @@ -17,28 +18,43 @@ export default async function SecuritySettingsPage() {
- + {user.identityProvider === 'DOCUMENSO' ? ( +
+ -
+
-

Two Factor Authentication

+

Two Factor Authentication

-

- Add and manage your two factor security settings to add an extra layer of security to your - account! -

+

+ Add and manage your two factor security settings to add an extra layer of security to + your account! +

-
-
Two-factor methods
+
+
Two-factor methods
- -
+ +
- {user.twoFactorEnabled && ( -
-
Recovery methods
+ {user.twoFactorEnabled && ( +
+
Recovery methods
- + +
+ )} +
+ ) : ( +
+

+ Your account is managed by {IDENTITY_PROVIDER_NAME[user.identityProvider]} +

+

+ To update your password, enable two-factor authentication, and manage other security + settings, please go to your {IDENTITY_PROVIDER_NAME[user.identityProvider]} account + settings. +

)}
diff --git a/apps/web/src/app/(signing)/sign/[token]/complete/document-preview-button.tsx b/apps/web/src/app/(signing)/sign/[token]/complete/document-preview-button.tsx new file mode 100644 index 000000000..1ac50f1c0 --- /dev/null +++ b/apps/web/src/app/(signing)/sign/[token]/complete/document-preview-button.tsx @@ -0,0 +1,39 @@ +'use client'; + +import { useState } from 'react'; + +import { FileSearch } from 'lucide-react'; + +import type { DocumentData } from '@documenso/prisma/client'; +import DocumentDialog from '@documenso/ui/components/document/document-dialog'; +import type { ButtonProps } from '@documenso/ui/primitives/button'; +import { Button } from '@documenso/ui/primitives/button'; + +export type DocumentPreviewButtonProps = { + className?: string; + documentData: DocumentData; +} & ButtonProps; + +export const DocumentPreviewButton = ({ + className, + documentData, + ...props +}: DocumentPreviewButtonProps) => { + const [showDialog, setShowDialog] = useState(false); + + return ( + <> + + + + + ); +}; diff --git a/apps/web/src/app/(signing)/sign/[token]/complete/layout.tsx b/apps/web/src/app/(signing)/sign/[token]/complete/layout.tsx new file mode 100644 index 000000000..d3d1c15c3 --- /dev/null +++ b/apps/web/src/app/(signing)/sign/[token]/complete/layout.tsx @@ -0,0 +1,17 @@ +import React from 'react'; + +import { RefreshOnFocus } from '~/components/(dashboard)/refresh-on-focus/refresh-on-focus'; + +export type SigningLayoutProps = { + children: React.ReactNode; +}; + +export default function SigningLayout({ children }: SigningLayoutProps) { + return ( +
+ {children} + + +
+ ); +} diff --git a/apps/web/src/app/(signing)/sign/[token]/complete/page.tsx b/apps/web/src/app/(signing)/sign/[token]/complete/page.tsx index 4b1aed265..ab73755ab 100644 --- a/apps/web/src/app/(signing)/sign/[token]/complete/page.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/complete/page.tsx @@ -17,6 +17,8 @@ import { SigningCard3D } from '@documenso/ui/components/signing-card'; import { truncateTitle } from '~/helpers/truncate-title'; +import { DocumentPreviewButton } from './document-preview-button'; + export type CompletedSigningPageProps = { params: { token?: string; @@ -117,12 +119,20 @@ export default async function CompletedSigningPage({
- + {document.status === DocumentStatus.COMPLETED ? ( + + ) : ( + + )}
{isLoggedIn ? ( diff --git a/apps/web/src/app/(unauthenticated)/signin/page.tsx b/apps/web/src/app/(unauthenticated)/signin/page.tsx index 0b0333b65..5fda07e70 100644 --- a/apps/web/src/app/(unauthenticated)/signin/page.tsx +++ b/apps/web/src/app/(unauthenticated)/signin/page.tsx @@ -1,5 +1,7 @@ import Link from 'next/link'; +import { IS_GOOGLE_SSO_ENABLED } from '@documenso/lib/constants/auth'; + import { SignInForm } from '~/components/forms/signin'; export default function SignInPage() { @@ -11,7 +13,7 @@ export default function SignInPage() { Welcome back, we are lucky to have you.

- + {process.env.NEXT_PUBLIC_DISABLE_SIGNUP !== 'true' && (

diff --git a/apps/web/src/components/(dashboard)/common/command-menu.tsx b/apps/web/src/components/(dashboard)/common/command-menu.tsx index 93f7fa729..0312a96d2 100644 --- a/apps/web/src/components/(dashboard)/common/command-menu.tsx +++ b/apps/web/src/components/(dashboard)/common/command-menu.tsx @@ -252,7 +252,11 @@ const ThemeCommands = ({ setTheme }: { setTheme: (_theme: string) => void }) => ); return THEMES.map((theme) => ( - setTheme(theme.theme)}> + setTheme(theme.theme)} + className="mx-2 first:mt-2 last:mb-2" + > {theme.label} diff --git a/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx b/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx index 2dcbb9864..252432b89 100644 --- a/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx +++ b/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx @@ -141,7 +141,11 @@ export const ProfileDropdown = ({ user }: ProfileDropdownProps) => { - + Star on Github diff --git a/apps/web/src/components/forms/profile.tsx b/apps/web/src/components/forms/profile.tsx index 0ce5c7f3d..7036f4e43 100644 --- a/apps/web/src/components/forms/profile.tsx +++ b/apps/web/src/components/forms/profile.tsx @@ -112,7 +112,6 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => { - { onChange(v ?? '')} /> diff --git a/apps/web/src/components/forms/signin.tsx b/apps/web/src/components/forms/signin.tsx index 4e671a569..038f9fe68 100644 --- a/apps/web/src/components/forms/signin.tsx +++ b/apps/web/src/components/forms/signin.tsx @@ -48,9 +48,10 @@ export type TSignInFormSchema = z.infer; export type SignInFormProps = { className?: string; + isGoogleSSOEnabled?: boolean; }; -export const SignInForm = ({ className }: SignInFormProps) => { +export const SignInForm = ({ className, isGoogleSSOEnabled }: SignInFormProps) => { const { toast } = useToast(); const [isTwoFactorAuthenticationDialogOpen, setIsTwoFactorAuthenticationDialogOpen] = useState(false); @@ -203,24 +204,29 @@ export const SignInForm = ({ className }: SignInFormProps) => { {isSubmitting ? 'Signing in...' : 'Sign In'} -

-
- Or continue with -
-
+ {isGoogleSSOEnabled && ( + <> +
+
+ Or continue with +
+
- + + + )} + { {isDocument && ( This document was sent using{' '} - + Documenso. diff --git a/packages/lib/constants/auth.ts b/packages/lib/constants/auth.ts index a79293b38..837ca3e3a 100644 --- a/packages/lib/constants/auth.ts +++ b/packages/lib/constants/auth.ts @@ -1 +1,12 @@ +import { IdentityProvider } from '@documenso/prisma/client'; + export const SALT_ROUNDS = 12; + +export const IDENTITY_PROVIDER_NAME: { [key in IdentityProvider]: string } = { + [IdentityProvider.DOCUMENSO]: 'Documenso', + [IdentityProvider.GOOGLE]: 'Google', +}; + +export const IS_GOOGLE_SSO_ENABLED = Boolean( + process.env.NEXT_PRIVATE_GOOGLE_CLIENT_ID && process.env.NEXT_PRIVATE_GOOGLE_CLIENT_SECRET, +); diff --git a/packages/ui/components/document/document-dialog.tsx b/packages/ui/components/document/document-dialog.tsx index 6099fecff..2693638fb 100644 --- a/packages/ui/components/document/document-dialog.tsx +++ b/packages/ui/components/document/document-dialog.tsx @@ -5,7 +5,7 @@ import { useState } from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { X } from 'lucide-react'; -import { DocumentData } from '@documenso/prisma/client'; +import type { DocumentData } from '@documenso/prisma/client'; import { cn } from '../../lib/utils'; import { Dialog, DialogOverlay, DialogPortal } from '../../primitives/dialog'; diff --git a/packages/ui/primitives/command.tsx b/packages/ui/primitives/command.tsx index 5f1ebe2e4..9c6ccd59c 100644 --- a/packages/ui/primitives/command.tsx +++ b/packages/ui/primitives/command.tsx @@ -35,7 +35,7 @@ const CommandDialog = ({ children, commandProps, ...props }: CommandDialogProps) {children} @@ -92,7 +92,7 @@ const CommandGroup = React.forwardRef<