change(ui): some fixes
This commit is contained in:
parent
02027da02b
commit
007dc2ebfc
4 changed files with 16 additions and 16 deletions
|
|
@ -29,7 +29,7 @@ const getNotifyChannel = (alert: Record<string, any>, webhooks: Array<any>) => {
|
|||
.map((channelId: number) => {
|
||||
return (
|
||||
'#' +
|
||||
webhooks.find((hook) => hook.webhookId === channelId && hook.type === 'slack').name
|
||||
webhooks.find((hook) => hook.webhookId === channelId && hook.type === 'slack')?.name
|
||||
);
|
||||
})
|
||||
.join(', ') +
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@ function IntegrateSlackTeamsButton({ history, tenantId }) {
|
|||
<Button
|
||||
className="my-auto mt-2 mb-2 flex items-center gap-2"
|
||||
onClick={gotoPreferencesIntegrations}
|
||||
variant="text-primary"
|
||||
>
|
||||
<Icon name="integrations/slack" size={16} />
|
||||
<Icon name="integrations/teams" size={18} className="mr-2" />
|
||||
<Icon name="integrations/teams" size={24} className="mr-2" />
|
||||
|
||||
<span>Integrate Slack/MS Teams</span>
|
||||
<span>Integrate Slack or MS Teams</span>
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -91,13 +91,15 @@ export default class SharePopup extends React.PureComponent {
|
|||
const { trigger, channels, msTeamsChannels, showCopyLink = false } = this.props;
|
||||
const { comment, channelId, teamsChannel, loading } = this.state;
|
||||
|
||||
const slackOptions = channels
|
||||
.map(({ webhookId, name }) => ({ value: webhookId, label: name }))
|
||||
.toJS();
|
||||
// const slackOptions = channels
|
||||
// .map(({ webhookId, name }) => ({ value: webhookId, label: name }))
|
||||
// .toJS();
|
||||
|
||||
const msTeamsOptions = msTeamsChannels
|
||||
.map(({ webhookId, name }) => ({ value: webhookId, label: name }))
|
||||
.toJS();
|
||||
// const msTeamsOptions = msTeamsChannels
|
||||
// .map(({ webhookId, name }) => ({ value: webhookId, label: name }))
|
||||
// .toJS();
|
||||
|
||||
const slackOptions = [], msTeamsOptions = [];
|
||||
|
||||
return (
|
||||
<Popover
|
||||
|
|
@ -181,9 +183,12 @@ export default class SharePopup extends React.PureComponent {
|
|||
<IntegrateSlackButton />
|
||||
</div>
|
||||
{showCopyLink && (
|
||||
<div className={styles.footer}>
|
||||
<>
|
||||
<div className="border-t -mx-2" />
|
||||
<div>
|
||||
<SessionCopyLink />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -38,12 +38,6 @@
|
|||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: solid thin $gray-light;
|
||||
margin: 0 -8px;
|
||||
padding: 0 14px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
background-color: $gray-lightest;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue