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