Skip to content

Commit d9bdc94

Browse files
committed
Added a docs button to the PAT page
1 parent c39ee74 commit d9bdc94

File tree

1 file changed

+13
-6
lines changed
  • apps/webapp/app/routes/account.tokens

1 file changed

+13
-6
lines changed

apps/webapp/app/routes/account.tokens/route.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { conform, useForm } from "@conform-to/react";
22
import { parse } from "@conform-to/zod";
3-
import { ShieldCheckIcon, TrashIcon } from "@heroicons/react/20/solid";
3+
import { BookOpenIcon, ShieldCheckIcon, TrashIcon } from "@heroicons/react/20/solid";
44
import { ShieldExclamationIcon } from "@heroicons/react/24/solid";
5+
import { DialogClose } from "@radix-ui/react-dialog";
56
import { Form, useActionData, useFetcher } from "@remix-run/react";
67
import { ActionFunction, LoaderFunctionArgs, json } from "@remix-run/server-runtime";
78
import { typedjson, useTypedLoaderData } from "remix-typedjson";
89
import { z } from "zod";
910
import { PageBody, PageContainer } from "~/components/layout/AppLayout";
10-
import { Button } from "~/components/primitives/Buttons";
11+
import { Button, LinkButton } from "~/components/primitives/Buttons";
1112
import { Callout } from "~/components/primitives/Callout";
1213
import { ClipboardField } from "~/components/primitives/ClipboardField";
1314
import { DateTime } from "~/components/primitives/DateTime";
@@ -42,8 +43,7 @@ import {
4243
revokePersonalAccessToken,
4344
} from "~/services/personalAccessToken.server";
4445
import { requireUserId } from "~/services/session.server";
45-
import { personalAccessTokensPath } from "~/utils/pathBuilder";
46-
import { DialogClose } from "@radix-ui/react-dialog";
46+
import { docsPath, personalAccessTokensPath } from "~/utils/pathBuilder";
4747

4848
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
4949
const userId = await requireUserId(request);
@@ -130,6 +130,13 @@ export default function Page() {
130130
<NavBar>
131131
<PageTitle title="Personal Access Tokens" />
132132
<PageAccessories>
133+
<LinkButton
134+
LeadingIcon={BookOpenIcon}
135+
to={docsPath("management/overview#personal-access-token-pat")}
136+
variant="docs/small"
137+
>
138+
Personal Access Token docs
139+
</LinkButton>
133140
<Dialog>
134141
<DialogTrigger asChild>
135142
<Button variant="primary/small">Create new token</Button>
@@ -294,7 +301,7 @@ function RevokePersonalAccessToken({ token }: { token: ObfuscatedPersonalAccessT
294301
<DialogContent className="max-w-md">
295302
<DialogHeader>Revoke Personal Access Token</DialogHeader>
296303
<div className="flex flex-col gap-3 pt-3">
297-
<Paragraph>
304+
<Paragraph spacing>
298305
Are you sure you want to revoke "{token.name}"? This can't be reversed.
299306
</Paragraph>
300307
<FormButtons
@@ -317,7 +324,7 @@ function RevokePersonalAccessToken({ token }: { token: ObfuscatedPersonalAccessT
317324
</DialogContent>
318325
</Dialog>
319326
}
320-
content="Revoke token"
327+
content="Revoke token"
321328
side="left"
322329
disableHoverableContent
323330
/>

0 commit comments

Comments
 (0)