mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
feat(console): add doc link of pat (#6496)
This commit is contained in:
parent
19d3aa787a
commit
00c2581668
2 changed files with 21 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import { type PersonalAccessToken as Token } from '@logto/schemas';
|
||||
import { useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
import useSWR from 'swr';
|
||||
|
||||
import CirclePlus from '@/assets/icons/circle-plus.svg?react';
|
||||
|
@ -12,6 +12,7 @@ import CopyToClipboard from '@/ds-components/CopyToClipboard';
|
|||
import FormField from '@/ds-components/FormField';
|
||||
import Table from '@/ds-components/Table';
|
||||
import { type Column } from '@/ds-components/Table/types';
|
||||
import TextLink from '@/ds-components/TextLink';
|
||||
import useApi, { type RequestError } from '@/hooks/use-api';
|
||||
|
||||
import CreateTokenModal from './CreateTokenModal';
|
||||
|
@ -78,7 +79,24 @@ function PersonalAccessTokens({ userId }: Props) {
|
|||
);
|
||||
|
||||
return (
|
||||
<FormField title="user_details.personal_access_tokens.title_other">
|
||||
<FormField
|
||||
title="user_details.personal_access_tokens.title_other"
|
||||
tip={(closeTipHandler) => (
|
||||
<Trans
|
||||
components={{
|
||||
a: (
|
||||
<TextLink
|
||||
targetBlank
|
||||
href="https://docs.logto.io/docs/recipes/manage-users/management-api/personal-access-token/"
|
||||
onClick={closeTipHandler}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
>
|
||||
{t('user_details.personal_access_tokens.tip')}
|
||||
</Trans>
|
||||
)}
|
||||
>
|
||||
{data?.length === 0 && !error ? (
|
||||
<>
|
||||
<div className={styles.empty}>
|
||||
|
|
|
@ -101,6 +101,7 @@ const user_details = {
|
|||
title: 'Personal access token',
|
||||
title_other: 'Personal access tokens',
|
||||
title_short: 'token',
|
||||
tip: 'Personal access tokens (PATs) provide a secure way for users to grant access tokens without using their credentials and interactive sign-in. This is useful for CI/CD, scripts, or applications that need to access resources programmatically. <a>Learn more</a>',
|
||||
value: 'Value',
|
||||
created_at: 'Created at',
|
||||
expires_at: 'Expires at',
|
||||
|
|
Loading…
Reference in a new issue