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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user