mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-24 17:59:52 +00:00
fix(ui): add beta tag for notifications (#9471)
This commit is contained in:
parent
247014bbc7
commit
66a6e5e9a9
@ -47,7 +47,8 @@ const GlobalSettingLeftPanel = () => {
|
||||
'',
|
||||
'',
|
||||
curr.items,
|
||||
'group'
|
||||
'group',
|
||||
curr.isBeta
|
||||
);
|
||||
if (menuItem.children?.length) {
|
||||
return [...acc, menuItem];
|
||||
|
@ -11,6 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Badge } from 'antd';
|
||||
import { ItemType } from 'antd/lib/menu/hooks/useItems';
|
||||
import i18next from 'i18next';
|
||||
import { camelCase } from 'lodash';
|
||||
@ -44,6 +45,7 @@ export interface MenuListItem {
|
||||
export interface MenuList {
|
||||
category: string;
|
||||
items: MenuListItem[];
|
||||
isBeta?: boolean;
|
||||
}
|
||||
|
||||
export const getGlobalSettingsMenuWithPermission = (
|
||||
@ -157,6 +159,7 @@ export const getGlobalSettingsMenuWithPermission = (
|
||||
},
|
||||
{
|
||||
category: i18next.t('label.notification-plural'),
|
||||
isBeta: true,
|
||||
items: [
|
||||
{
|
||||
label: i18next.t('label.activity-feeds'),
|
||||
@ -253,12 +256,13 @@ export const getGlobalSettingMenuItem = (
|
||||
isProtected: boolean;
|
||||
icon: React.ReactNode;
|
||||
}[],
|
||||
type?: string
|
||||
type?: string,
|
||||
isBeta?: boolean
|
||||
): {
|
||||
key: string;
|
||||
icon: React.ReactNode;
|
||||
children: ItemType[] | undefined;
|
||||
label: string;
|
||||
label: ReactNode;
|
||||
type: string | undefined;
|
||||
} => {
|
||||
const subItems = children
|
||||
@ -273,7 +277,13 @@ export const getGlobalSettingMenuItem = (
|
||||
key: `${category}.${key}`,
|
||||
icon,
|
||||
children: subItems,
|
||||
label,
|
||||
label: isBeta ? (
|
||||
<Badge color="#7147e8" count="beta" offset={[30, 8]} size="small">
|
||||
{label}
|
||||
</Badge>
|
||||
) : (
|
||||
label
|
||||
),
|
||||
type,
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user