Make the app name configurable even after the project is built (#731)

### What problem does this PR solve?

Make the app name configurable even after the project is built #730 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-05-11 16:03:07 +08:00
committed by GitHub
parent 33eaf6fa2e
commit 91b4a18c47
12 changed files with 104 additions and 83 deletions

View File

@@ -46,6 +46,7 @@ const FileToolbar = ({
const { handleInputChange, searchString } = useHandleSearchChange();
const breadcrumbItems = useSelectBreadcrumbItems();
const { handleBreadcrumbClick } = useHandleBreadcrumbClick();
const isKnowledgeBase = breadcrumbItems.at(-1)?.title === '.knowledgebase';
const itemRender: BreadcrumbProps['itemRender'] = (
currentRoute,
@@ -128,19 +129,21 @@ const FileToolbar = ({
<div className={styles.filter}>
<Breadcrumb items={breadcrumbItems} itemRender={itemRender} />
<Space>
<Dropdown
menu={{ items }}
placement="bottom"
arrow={false}
disabled={disabled}
>
<Button>
<Space>
<b> {t('bulk')}</b>
<DownOutlined />
</Space>
</Button>
</Dropdown>
{isKnowledgeBase || (
<Dropdown
menu={{ items }}
placement="bottom"
arrow={false}
disabled={disabled}
>
<Button>
<Space>
<b> {t('bulk')}</b>
<DownOutlined />
</Space>
</Button>
</Dropdown>
)}
<Input
placeholder={t('searchFiles')}
value={searchString}
@@ -150,11 +153,13 @@ const FileToolbar = ({
prefix={<SearchOutlined />}
/>
<Dropdown menu={{ items: actionItems }} trigger={['click']}>
<Button type="primary" icon={<PlusOutlined />}>
{t('addFile')}
</Button>
</Dropdown>
{isKnowledgeBase || (
<Dropdown menu={{ items: actionItems }} trigger={['click']}>
<Button type="primary" icon={<PlusOutlined />}>
{t('addFile')}
</Button>
</Dropdown>
)}
</Space>
</div>
);