-
+
{ checkbox }
diff --git a/src/components/views/elements/StyledRadioGroup.tsx b/src/components/views/elements/StyledRadioGroup.tsx
index ea8f65d12b..6b9e992f92 100644
--- a/src/components/views/elements/StyledRadioGroup.tsx
+++ b/src/components/views/elements/StyledRadioGroup.tsx
@@ -25,6 +25,7 @@ interface IDefinition {
disabled?: boolean;
label: React.ReactChild;
description?: React.ReactChild;
+ checked?: boolean; // If provided it will override the value comparison done in the group
}
interface IProps {
@@ -33,7 +34,7 @@ interface IProps {
definitions: IDefinition[];
value?: T; // if not provided no options will be selected
outlined?: boolean;
- onChange(newValue: T);
+ onChange(newValue: T): void;
}
function StyledRadioGroup({name, definitions, value, className, outlined, onChange}: IProps) {
@@ -46,7 +47,7 @@ function StyledRadioGroup({name, definitions, value, className
{
constructor(props: IProps) {
super(props);
diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js
index bf4700ed97..c4f400c872 100644
--- a/src/components/views/rooms/MessageComposer.js
+++ b/src/components/views/rooms/MessageComposer.js
@@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, {createRef} from 'react';
+import classNames from 'classnames';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
import CallHandler from '../../../CallHandler';
@@ -29,7 +30,6 @@ import E2EIcon from './E2EIcon';
import SettingsStore from "../../../settings/SettingsStore";
import {aboveLeftOf, ContextMenu, ContextMenuTooltipButton, useContextMenu} from "../../structures/ContextMenu";
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
-
function ComposerAvatar(props) {
const MemberStatusMessageAvatar = sdk.getComponent('avatars.MemberStatusMessageAvatar');
return
@@ -117,9 +117,19 @@ const EmojiButton = ({addEmoji}) => {
;
}
+ const className = classNames(
+ "mx_MessageComposer_button",
+ "mx_MessageComposer_emoji",
+ {
+ "mx_MessageComposer_button_highlight": menuDisplayed,
+ },
+ );
+
+ // TODO: replace ContextMenuTooltipButton with a unified representation of
+ // the header buttons and the right panel buttons
return
;
diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js
index fb2f8fa983..48115146f1 100644
--- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js
+++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js
@@ -22,6 +22,7 @@ import * as sdk from "../../../../..";
import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch";
import Modal from "../../../../../Modal";
import QuestionDialog from "../../../dialogs/QuestionDialog";
+import StyledRadioGroup from '../../../elements/StyledRadioGroup';
import {SettingLevel} from "../../../../../settings/SettingLevel";
export default class SecurityRoomSettingsTab extends React.Component {
@@ -144,7 +145,7 @@ export default class SecurityRoomSettingsTab extends React.Component {
});
};
- _onRoomAccessRadioToggle = (ev) => {
+ _onRoomAccessRadioToggle = (roomAccess) => {
// join_rule
// INVITE | PUBLIC
// ----------------------+----------------
@@ -161,7 +162,7 @@ export default class SecurityRoomSettingsTab extends React.Component {
let joinRule = "invite";
let guestAccess = "can_join";
- switch (ev.target.value) {
+ switch (roomAccess) {
case "invite_only":
// no change - use defaults above
break;
@@ -190,11 +191,11 @@ export default class SecurityRoomSettingsTab extends React.Component {
});
};
- _onHistoryRadioToggle = (ev) => {
+ _onHistoryRadioToggle = (history) => {
const beforeHistory = this.state.history;
- this.setState({history: ev.target.value});
+ this.setState({history: history});
MatrixClientPeg.get().sendStateEvent(this.props.roomId, "m.room.history_visibility", {
- history_visibility: ev.target.value,
+ history_visibility: history,
}, "").catch((e) => {
console.error(e);
this.setState({history: beforeHistory});
@@ -257,27 +258,31 @@ export default class SecurityRoomSettingsTab extends React.Component {
{guestWarning}
{aliasWarning}
-
-
-
+
);
}
@@ -294,34 +299,33 @@ export default class SecurityRoomSettingsTab extends React.Component {
{_t('Changes to who can read history will only apply to future messages in this room. ' +
'The visibility of existing history will be unchanged.')}
-
-
-
-
+
);
}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 006e7e67bf..b636b5470e 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1787,7 +1787,7 @@
"Share Community": "Share Community",
"Share Room Message": "Share Room Message",
"Link to selected message": "Link to selected message",
- "COPY": "COPY",
+ "Copy": "Copy",
"Command Help": "Command Help",
"To help us prevent this in future, please send us logs.": "To help us prevent this in future, please send us logs.",
"Missing session data": "Missing session data",
@@ -2228,7 +2228,6 @@
"Confirm your recovery passphrase": "Confirm your recovery passphrase",
"Store your Security Key somewhere safe, like a password manager or a safe, as it’s used to safeguard your encrypted data.": "Store your Security Key somewhere safe, like a password manager or a safe, as it’s used to safeguard your encrypted data.",
"Download": "Download",
- "Copy": "Copy",
"Unable to query secret storage status": "Unable to query secret storage status",
"Retry": "Retry",
"If you cancel now, you may lose encrypted messages & data if you lose access to your logins.": "If you cancel now, you may lose encrypted messages & data if you lose access to your logins.",
diff --git a/test/end-to-end-tests/src/usecases/room-settings.js b/test/end-to-end-tests/src/usecases/room-settings.js
index fac3fa0855..11e2f52c6e 100644
--- a/test/end-to-end-tests/src/usecases/room-settings.js
+++ b/test/end-to-end-tests/src/usecases/room-settings.js
@@ -162,7 +162,7 @@ async function changeRoomSettings(session, settings) {
if (settings.visibility) {
session.log.step(`sets visibility to ${settings.visibility}`);
- const radios = await session.queryAll(".mx_RoomSettingsDialog input[type=radio]");
+ const radios = await session.queryAll(".mx_RoomSettingsDialog label");
assert.equal(radios.length, 7);
const inviteOnly = radios[0];
const publicNoGuests = radios[1];