mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-07 22:44:08 +00:00
minor: domain owner edit icon and display of announcement message (#19593)
(cherry picked from commit 060ab6e6acc20b2faf775058149aa49eff028d2f)
This commit is contained in:
parent
459e1daa69
commit
6b039ad76d
@ -197,26 +197,32 @@ const DocumentationTab = ({
|
||||
<Typography.Text className="right-panel-label">
|
||||
{t('label.owner-plural')}
|
||||
</Typography.Text>
|
||||
{editOwnerPermission && domain.owners && (
|
||||
<UserTeamSelectableList
|
||||
hasPermission
|
||||
multiple={{ team: false, user: true }}
|
||||
owner={domain.owners}
|
||||
onUpdate={(updatedUser) => handleUpdatedOwner(updatedUser)}>
|
||||
<Tooltip
|
||||
title={t('label.edit-entity', {
|
||||
entity: t('label.owner-plural'),
|
||||
})}>
|
||||
<Button
|
||||
className="cursor-pointer flex-center m-l-xss"
|
||||
data-testid="edit-owner"
|
||||
icon={<EditIcon color={DE_ACTIVE_COLOR} width="14px" />}
|
||||
size="small"
|
||||
type="text"
|
||||
/>
|
||||
</Tooltip>
|
||||
</UserTeamSelectableList>
|
||||
)}
|
||||
{editOwnerPermission &&
|
||||
domain.owners &&
|
||||
domain.owners.length > 0 && (
|
||||
<UserTeamSelectableList
|
||||
hasPermission
|
||||
multiple={{ team: false, user: true }}
|
||||
owner={domain.owners}
|
||||
onUpdate={(updatedUser) =>
|
||||
handleUpdatedOwner(updatedUser)
|
||||
}>
|
||||
<Tooltip
|
||||
title={t('label.edit-entity', {
|
||||
entity: t('label.owner-plural'),
|
||||
})}>
|
||||
<Button
|
||||
className="cursor-pointer flex-center m-l-xss"
|
||||
data-testid="edit-owner"
|
||||
icon={
|
||||
<EditIcon color={DE_ACTIVE_COLOR} width="14px" />
|
||||
}
|
||||
size="small"
|
||||
type="text"
|
||||
/>
|
||||
</Tooltip>
|
||||
</UserTeamSelectableList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Space className="m-r-xss" size={4}>
|
||||
|
||||
@ -15,6 +15,7 @@ import { Card, Space, Typography } from 'antd';
|
||||
import React, { FC, useMemo } from 'react';
|
||||
import { ReactComponent as AnnouncementIcon } from '../../../../assets/svg/announcements-v1.svg';
|
||||
import { Thread } from '../../../../generated/entity/feed/thread';
|
||||
import RichTextEditorPreviewerV1 from '../../RichTextEditor/RichTextEditorPreviewerV1';
|
||||
import './AnnouncementCard.less';
|
||||
|
||||
interface Props {
|
||||
@ -50,12 +51,12 @@ const AnnouncementCard: FC<Props> = ({ onClick, announcement }) => {
|
||||
</Typography.Paragraph>
|
||||
</Space>
|
||||
{message && (
|
||||
<Typography.Paragraph
|
||||
ellipsis
|
||||
className="text-grey-muted m-0 text-xs"
|
||||
data-testid="announcement-message">
|
||||
{message}
|
||||
</Typography.Paragraph>
|
||||
<RichTextEditorPreviewerV1
|
||||
className="text-grey-muted m-0 text-xss"
|
||||
data-testid="announcement-message"
|
||||
markdown={message}
|
||||
reducePreviewLineClass="max-one-line"
|
||||
/>
|
||||
)}
|
||||
</Card>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user