mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
chore: implemented feedback plus some restructuring
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
Braces,
|
||||||
CreditCard,
|
CreditCard,
|
||||||
Lock,
|
Lock,
|
||||||
LogOut,
|
LogOut,
|
||||||
@ -97,6 +98,13 @@ export const ProfileDropdown = ({ user }: ProfileDropdownProps) => {
|
|||||||
</Link>
|
</Link>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|
||||||
|
<DropdownMenuItem asChild>
|
||||||
|
<Link href="/settings/tokens" className="cursor-pointer">
|
||||||
|
<Braces className="mr-2 h-4 w-4" />
|
||||||
|
API Tokens
|
||||||
|
</Link>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
|
||||||
{isBillingEnabled && (
|
{isBillingEnabled && (
|
||||||
<DropdownMenuItem asChild>
|
<DropdownMenuItem asChild>
|
||||||
<Link href="/settings/billing" className="cursor-pointer">
|
<Link href="/settings/billing" className="cursor-pointer">
|
||||||
|
|||||||
@ -48,12 +48,12 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link href="/settings/token">
|
<Link href="/settings/tokens">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full justify-start',
|
'w-full justify-start',
|
||||||
pathname?.startsWith('/settings/token') && 'bg-secondary',
|
pathname?.startsWith('/settings/tokens') && 'bg-secondary',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Braces className="mr-2 h-5 w-5" />
|
<Braces className="mr-2 h-5 w-5" />
|
||||||
|
|||||||
@ -51,12 +51,12 @@ export const MobileNav = ({ className, ...props }: MobileNavProps) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link href="/settings/token">
|
<Link href="/settings/tokens">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full justify-start',
|
'w-full justify-start',
|
||||||
pathname?.startsWith('/settings/token') && 'bg-secondary',
|
pathname?.startsWith('/settings/tokens') && 'bg-secondary',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Braces className="mr-2 h-5 w-5" />
|
<Braces className="mr-2 h-5 w-5" />
|
||||||
|
|||||||
@ -148,7 +148,7 @@ export default function DeleteTokenDialog({ token, onDelete, children }: DeleteT
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<div className="flex w-full flex-1 flex-nowrap gap-4">
|
<div className="flex w-full flex-nowrap gap-4">
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
@ -161,6 +161,7 @@ export default function DeleteTokenDialog({ token, onDelete, children }: DeleteT
|
|||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="destructive"
|
variant="destructive"
|
||||||
|
className="flex-1"
|
||||||
disabled={!form.formState.isValid}
|
disabled={!form.formState.isValid}
|
||||||
loading={form.formState.isSubmitting}
|
loading={form.formState.isSubmitting}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export const createApiToken = async ({ userId, tokenName }: CreateApiTokenInput)
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!dbToken) {
|
if (!dbToken) {
|
||||||
throw new Error(`Failed to create the API token`);
|
throw new Error('Failed to create the API token');
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user