mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
feat(console): add default domain content for domains page (#3961)
This commit is contained in:
parent
df8dc69f69
commit
1ad17bcb38
3 changed files with 60 additions and 2 deletions
|
@ -0,0 +1,15 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
|
||||
.container {
|
||||
padding: _.unit(5) _.unit(6);
|
||||
border: 1px solid var(--color-divider);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: _.unit(1);
|
||||
|
||||
.domain {
|
||||
font: var(--font-title-2);
|
||||
max-width: max-content;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
import { useContext } from 'react';
|
||||
|
||||
import CopyToClipboard from '@/components/CopyToClipboard';
|
||||
import DynamicT from '@/components/DynamicT';
|
||||
import Tag from '@/components/Tag';
|
||||
import { AppEndpointsContext } from '@/contexts/AppEndpointsProvider';
|
||||
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
function DefaultDomain() {
|
||||
const { userEndpoint } = useContext(AppEndpointsContext);
|
||||
|
||||
if (!userEndpoint) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<CopyToClipboard className={styles.domain} value={userEndpoint.host} variant="text" />
|
||||
<Tag status="success" type="state" variant="plain">
|
||||
<DynamicT forKey="domain.status.in_used" />
|
||||
</Tag>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default DefaultDomain;
|
|
@ -1,6 +1,22 @@
|
|||
import FormCard from '@/components/FormCard';
|
||||
import FormField from '@/components/FormField';
|
||||
|
||||
import DefaultDomain from './components/DefaultDomain';
|
||||
|
||||
function TenantDomainSettings() {
|
||||
// TODO @xiaoyijun implement this page
|
||||
return <div>TenantDomainSettings (WIP)</div>;
|
||||
return (
|
||||
<div>
|
||||
{/* TODO: @xiaoyijun add the custom domain form card */}
|
||||
<FormCard
|
||||
title="domain.default.default_domain"
|
||||
description="domain.default.default_domain_description"
|
||||
>
|
||||
<FormField title="domain.default.default_domain_field">
|
||||
<DefaultDomain />
|
||||
</FormField>
|
||||
</FormCard>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default TenantDomainSettings;
|
||||
|
|
Loading…
Add table
Reference in a new issue