fix assignment in expression
This commit is contained in:
parent
9a8264ec6c
commit
90be7416d7
@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
|
|||||||
import { defineMessages, injectIntl } from 'react-intl';
|
import { defineMessages, injectIntl } from 'react-intl';
|
||||||
import { withModalMounter } from '/imports/ui/components/common/modal/service';
|
import { withModalMounter } from '/imports/ui/components/common/modal/service';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import BBBMenu from "/imports/ui/components/common/menu/component";
|
import BBBMenu from '/imports/ui/components/common/menu/component';
|
||||||
import Button from '/imports/ui/components/common/button/component';
|
import Button from '/imports/ui/components/common/button/component';
|
||||||
|
|
||||||
import { alertScreenReader } from '/imports/utils/dom-utils';
|
import { alertScreenReader } from '/imports/utils/dom-utils';
|
||||||
@ -66,13 +66,13 @@ class ChatDropdown extends PureComponent {
|
|||||||
const copyIcon = 'copy';
|
const copyIcon = 'copy';
|
||||||
|
|
||||||
this.menuItems = [];
|
this.menuItems = [];
|
||||||
ENABLE_SAVE_AND_COPY_PUBLIC_CHAT
|
|
||||||
&& (
|
if (ENABLE_SAVE_AND_COPY_PUBLIC_CHAT) {
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
{
|
{
|
||||||
key: this.actionsKey[0],
|
key: this.actionsKey[0],
|
||||||
icon: saveIcon,
|
icon: saveIcon,
|
||||||
dataTest: "chatSave",
|
dataTest: 'chatSave',
|
||||||
label: intl.formatMessage(intlMessages.save),
|
label: intl.formatMessage(intlMessages.save),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
@ -87,41 +87,41 @@ class ChatDropdown extends PureComponent {
|
|||||||
+ `${encodeURIComponent(ChatService.exportChat(timeWindowsValues, users, intl))}`,
|
+ `${encodeURIComponent(ChatService.exportChat(timeWindowsValues, users, intl))}`,
|
||||||
);
|
);
|
||||||
link.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }));
|
link.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
if (ENABLE_SAVE_AND_COPY_PUBLIC_CHAT) {
|
||||||
),
|
|
||||||
ENABLE_SAVE_AND_COPY_PUBLIC_CHAT
|
|
||||||
&& (
|
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
{
|
{
|
||||||
key: this.actionsKey[1],
|
key: this.actionsKey[1],
|
||||||
icon: copyIcon,
|
icon: copyIcon,
|
||||||
id: "clipboardButton",
|
id: 'clipboardButton',
|
||||||
dataTest: "chatCopy",
|
dataTest: 'chatCopy',
|
||||||
label: intl.formatMessage(intlMessages.copy),
|
label: intl.formatMessage(intlMessages.copy),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
let chatHistory = ChatService.exportChat(timeWindowsValues, users, intl);
|
const chatHistory = ChatService.exportChat(timeWindowsValues, users, intl);
|
||||||
navigator.clipboard.writeText(chatHistory).then(() => {
|
navigator.clipboard.writeText(chatHistory).then(() => {
|
||||||
alertScreenReader(intl.formatMessage(intlMessages.copySuccess));
|
alertScreenReader(intl.formatMessage(intlMessages.copySuccess));
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
alertScreenReader(intl.formatMessage(intlMessages.copyErr));
|
alertScreenReader(intl.formatMessage(intlMessages.copyErr));
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if (!meetingIsBreakout && amIModerator && isMeteorConnected) {
|
if (!meetingIsBreakout && amIModerator && isMeteorConnected) {
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
{
|
{
|
||||||
key: this.actionsKey[2],
|
key: this.actionsKey[2],
|
||||||
icon: clearIcon,
|
icon: clearIcon,
|
||||||
dataTest: "chatClear",
|
dataTest: 'chatClear',
|
||||||
label: intl.formatMessage(intlMessages.clear),
|
label: intl.formatMessage(intlMessages.clear),
|
||||||
onClick: () => ChatService.clearPublicChatHistory()
|
onClick: () => ChatService.clearPublicChatHistory(),
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.menuItems;
|
return this.menuItems;
|
||||||
@ -137,7 +137,7 @@ class ChatDropdown extends PureComponent {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<BBBMenu
|
<BBBMenu
|
||||||
trigger={
|
trigger={(
|
||||||
<Button
|
<Button
|
||||||
data-test="chatOptionsMenu"
|
data-test="chatOptionsMenu"
|
||||||
icon="more"
|
icon="more"
|
||||||
@ -150,14 +150,14 @@ class ChatDropdown extends PureComponent {
|
|||||||
aria-label={intl.formatMessage(intlMessages.options)}
|
aria-label={intl.formatMessage(intlMessages.options)}
|
||||||
onClick={() => null}
|
onClick={() => null}
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
opts={{
|
opts={{
|
||||||
id: "default-dropdown-menu",
|
id: 'default-dropdown-menu',
|
||||||
keepMounted: true,
|
keepMounted: true,
|
||||||
transitionDuration: 0,
|
transitionDuration: 0,
|
||||||
elevation: 3,
|
elevation: 3,
|
||||||
getContentAnchorEl: null,
|
getContentAnchorEl: null,
|
||||||
fullwidth: "true",
|
fullwidth: 'true',
|
||||||
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
||||||
transformorigin: { vertical: 'bottom', horizontal: 'left' },
|
transformorigin: { vertical: 'bottom', horizontal: 'left' },
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user