mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(console): should hide filters from app list empty placeholder (#4358)
This commit is contained in:
parent
66c75cb0af
commit
8b013ce979
3 changed files with 32 additions and 28 deletions
|
@ -3,6 +3,7 @@
|
||||||
.guideGroup {
|
.guideGroup {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
max-width: 1876px;
|
||||||
container-type: inline-size;
|
container-type: inline-size;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
|
|
@ -24,9 +24,10 @@ import * as styles from './index.module.scss';
|
||||||
type Props = {
|
type Props = {
|
||||||
className?: string;
|
className?: string;
|
||||||
hasCardBorder?: boolean;
|
hasCardBorder?: boolean;
|
||||||
|
hasFilters?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
function GuideLibrary({ className, hasCardBorder }: Props) {
|
function GuideLibrary({ className, hasCardBorder, hasFilters }: Props) {
|
||||||
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.applications.guide' });
|
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.applications.guide' });
|
||||||
const { navigate } = useTenantPathname();
|
const { navigate } = useTenantPathname();
|
||||||
const [keyword, setKeyword] = useState<string>('');
|
const [keyword, setKeyword] = useState<string>('');
|
||||||
|
@ -68,6 +69,7 @@ function GuideLibrary({ className, hasCardBorder }: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames(styles.container, className)}>
|
<div className={classNames(styles.container, className)}>
|
||||||
|
{hasFilters && (
|
||||||
<div className={styles.filters}>
|
<div className={styles.filters}>
|
||||||
<label>{t('filter.title')}</label>
|
<label>{t('filter.title')}</label>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
@ -97,6 +99,7 @@ function GuideLibrary({ className, hasCardBorder }: Props) {
|
||||||
{isM2mDisabledForCurrentPlan && <ProTag className={styles.proTag} />}
|
{isM2mDisabledForCurrentPlan && <ProTag className={styles.proTag} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
{keyword && (
|
{keyword && (
|
||||||
<GuideGroup
|
<GuideGroup
|
||||||
className={styles.guideGroup}
|
className={styles.guideGroup}
|
||||||
|
|
|
@ -30,7 +30,7 @@ function GuideLibraryModal({ isOpen, onClose }: Props) {
|
||||||
>
|
>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<GuideHeader onClose={onClose} />
|
<GuideHeader onClose={onClose} />
|
||||||
<GuideLibrary className={styles.content} />
|
<GuideLibrary hasFilters className={styles.content} />
|
||||||
<nav className={styles.actionBar}>
|
<nav className={styles.actionBar}>
|
||||||
<span className={styles.text}>{t('do_not_need_tutorial')}</span>
|
<span className={styles.text}>{t('do_not_need_tutorial')}</span>
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Reference in a new issue