0
Fork 0
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:
Xiao Yijun 2022-03-23 18:34:25 +08:00 committed by GitHub
parent d9670fd709
commit 847e018b02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 2 deletions

View file

@ -11,6 +11,7 @@ import BackLink from '@/components/BackLink';
import Button from '@/components/Button';
import Card from '@/components/Card';
import CopyToClipboard from '@/components/CopyToClipboard';
import Drawer from '@/components/Drawer';
import FormField from '@/components/FormField';
import ImagePlaceholder from '@/components/ImagePlaceholder';
import TabNav, { TabNavLink } from '@/components/TabNav';
@ -43,6 +44,7 @@ const ApiResourceDetails = () => {
const api = useApi();
const [isDeleteFormOpen, setIsDeleteFormOpen] = useState(false);
const [isReadmeOpen, setIsReadmeOpen] = useState(false);
useEffect(() => {
if (!data) {
@ -86,7 +88,21 @@ const ApiResourceDetails = () => {
</div>
</div>
<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
buttonProps={{ icon: <More /> }}
title={t('api_resource_details.more_options')}

View file

@ -11,6 +11,7 @@ import BackLink from '@/components/BackLink';
import Button from '@/components/Button';
import Card from '@/components/Card';
import CopyToClipboard from '@/components/CopyToClipboard';
import Drawer from '@/components/Drawer';
import FormField from '@/components/FormField';
import ImagePlaceholder from '@/components/ImagePlaceholder';
import MultilineInput from '@/components/MultilineInput';
@ -44,6 +45,8 @@ const ApplicationDetails = () => {
);
const isLoading = !data && !error && !oidcConfig && !fetchOidcConfigError;
const [isReadmeOpen, setIsReadmeOpen] = useState(false);
const [isDeleteFormOpen, setIsDeleteFormOpen] = useState(false);
const { control, handleSubmit, register, reset } = useForm<Application>();
@ -156,7 +159,21 @@ const ApplicationDetails = () => {
</div>
</div>
<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
buttonProps={{ icon: <More /> }}
title={t('application_details.more_options')}