mirror of
https://github.com/logto-io/logto.git
synced 2024-12-23 20:33:16 -05:00
feat(console): readme in details (#438)
This commit is contained in:
parent
d9670fd709
commit
847e018b02
2 changed files with 35 additions and 2 deletions
|
@ -11,6 +11,7 @@ import BackLink from '@/components/BackLink';
|
||||||
import Button from '@/components/Button';
|
import Button from '@/components/Button';
|
||||||
import Card from '@/components/Card';
|
import Card from '@/components/Card';
|
||||||
import CopyToClipboard from '@/components/CopyToClipboard';
|
import CopyToClipboard from '@/components/CopyToClipboard';
|
||||||
|
import Drawer from '@/components/Drawer';
|
||||||
import FormField from '@/components/FormField';
|
import FormField from '@/components/FormField';
|
||||||
import ImagePlaceholder from '@/components/ImagePlaceholder';
|
import ImagePlaceholder from '@/components/ImagePlaceholder';
|
||||||
import TabNav, { TabNavLink } from '@/components/TabNav';
|
import TabNav, { TabNavLink } from '@/components/TabNav';
|
||||||
|
@ -43,6 +44,7 @@ const ApiResourceDetails = () => {
|
||||||
const api = useApi();
|
const api = useApi();
|
||||||
|
|
||||||
const [isDeleteFormOpen, setIsDeleteFormOpen] = useState(false);
|
const [isDeleteFormOpen, setIsDeleteFormOpen] = useState(false);
|
||||||
|
const [isReadmeOpen, setIsReadmeOpen] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
@ -86,7 +88,21 @@ const ApiResourceDetails = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.operations}>
|
<div className={styles.operations}>
|
||||||
<Button title="admin_console.api_resource_details.check_help_guide" />
|
<Button
|
||||||
|
title="admin_console.api_resource_details.check_help_guide"
|
||||||
|
onClick={() => {
|
||||||
|
setIsReadmeOpen(true);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Drawer
|
||||||
|
isOpen={isReadmeOpen}
|
||||||
|
onClose={() => {
|
||||||
|
setIsReadmeOpen(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* TODO - Implement the content when the documentation website is ready. */}
|
||||||
|
<div>TBD</div>
|
||||||
|
</Drawer>
|
||||||
<ActionMenu
|
<ActionMenu
|
||||||
buttonProps={{ icon: <More /> }}
|
buttonProps={{ icon: <More /> }}
|
||||||
title={t('api_resource_details.more_options')}
|
title={t('api_resource_details.more_options')}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import BackLink from '@/components/BackLink';
|
||||||
import Button from '@/components/Button';
|
import Button from '@/components/Button';
|
||||||
import Card from '@/components/Card';
|
import Card from '@/components/Card';
|
||||||
import CopyToClipboard from '@/components/CopyToClipboard';
|
import CopyToClipboard from '@/components/CopyToClipboard';
|
||||||
|
import Drawer from '@/components/Drawer';
|
||||||
import FormField from '@/components/FormField';
|
import FormField from '@/components/FormField';
|
||||||
import ImagePlaceholder from '@/components/ImagePlaceholder';
|
import ImagePlaceholder from '@/components/ImagePlaceholder';
|
||||||
import MultilineInput from '@/components/MultilineInput';
|
import MultilineInput from '@/components/MultilineInput';
|
||||||
|
@ -44,6 +45,8 @@ const ApplicationDetails = () => {
|
||||||
);
|
);
|
||||||
const isLoading = !data && !error && !oidcConfig && !fetchOidcConfigError;
|
const isLoading = !data && !error && !oidcConfig && !fetchOidcConfigError;
|
||||||
|
|
||||||
|
const [isReadmeOpen, setIsReadmeOpen] = useState(false);
|
||||||
|
|
||||||
const [isDeleteFormOpen, setIsDeleteFormOpen] = useState(false);
|
const [isDeleteFormOpen, setIsDeleteFormOpen] = useState(false);
|
||||||
|
|
||||||
const { control, handleSubmit, register, reset } = useForm<Application>();
|
const { control, handleSubmit, register, reset } = useForm<Application>();
|
||||||
|
@ -156,7 +159,21 @@ const ApplicationDetails = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.operations}>
|
<div className={styles.operations}>
|
||||||
<Button title="admin_console.application_details.check_help_guide" />
|
<Button
|
||||||
|
title="admin_console.application_details.check_help_guide"
|
||||||
|
onClick={() => {
|
||||||
|
setIsReadmeOpen(true);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Drawer
|
||||||
|
isOpen={isReadmeOpen}
|
||||||
|
onClose={() => {
|
||||||
|
setIsReadmeOpen(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* TODO - Implement the content when the documentation website is ready. */}
|
||||||
|
<div>TBD</div>
|
||||||
|
</Drawer>
|
||||||
<ActionMenu
|
<ActionMenu
|
||||||
buttonProps={{ icon: <More /> }}
|
buttonProps={{ icon: <More /> }}
|
||||||
title={t('application_details.more_options')}
|
title={t('application_details.more_options')}
|
||||||
|
|
Loading…
Reference in a new issue