1
1
import { conform , useForm } from "@conform-to/react" ;
2
2
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" ;
4
4
import { ShieldExclamationIcon } from "@heroicons/react/24/solid" ;
5
+ import { DialogClose } from "@radix-ui/react-dialog" ;
5
6
import { Form , useActionData , useFetcher } from "@remix-run/react" ;
6
7
import { ActionFunction , LoaderFunctionArgs , json } from "@remix-run/server-runtime" ;
7
8
import { typedjson , useTypedLoaderData } from "remix-typedjson" ;
8
9
import { z } from "zod" ;
9
10
import { PageBody , PageContainer } from "~/components/layout/AppLayout" ;
10
- import { Button } from "~/components/primitives/Buttons" ;
11
+ import { Button , LinkButton } from "~/components/primitives/Buttons" ;
11
12
import { Callout } from "~/components/primitives/Callout" ;
12
13
import { ClipboardField } from "~/components/primitives/ClipboardField" ;
13
14
import { DateTime } from "~/components/primitives/DateTime" ;
@@ -42,8 +43,7 @@ import {
42
43
revokePersonalAccessToken ,
43
44
} from "~/services/personalAccessToken.server" ;
44
45
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" ;
47
47
48
48
export const loader = async ( { request, params } : LoaderFunctionArgs ) => {
49
49
const userId = await requireUserId ( request ) ;
@@ -130,6 +130,13 @@ export default function Page() {
130
130
< NavBar >
131
131
< PageTitle title = "Personal Access Tokens" />
132
132
< 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 >
133
140
< Dialog >
134
141
< DialogTrigger asChild >
135
142
< Button variant = "primary/small" > Create new token</ Button >
@@ -294,7 +301,7 @@ function RevokePersonalAccessToken({ token }: { token: ObfuscatedPersonalAccessT
294
301
< DialogContent className = "max-w-md" >
295
302
< DialogHeader > Revoke Personal Access Token</ DialogHeader >
296
303
< div className = "flex flex-col gap-3 pt-3" >
297
- < Paragraph >
304
+ < Paragraph spacing >
298
305
Are you sure you want to revoke "{ token . name } "? This can't be reversed.
299
306
</ Paragraph >
300
307
< FormButtons
@@ -317,7 +324,7 @@ function RevokePersonalAccessToken({ token }: { token: ObfuscatedPersonalAccessT
317
324
</ DialogContent >
318
325
</ Dialog >
319
326
}
320
- content = "Revoke token"
327
+ content = "Revoke token… "
321
328
side = "left"
322
329
disableHoverableContent
323
330
/>
0 commit comments