Add Confirm Public Encrypted Room dialog
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
64974eb3ee
commit
131f499c25
1 changed files with 24 additions and 1 deletions
|
@ -147,7 +147,7 @@ export default class SecurityRoomSettingsTab extends React.Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_onRoomAccessRadioToggle = (roomAccess) => {
|
_setRoomAccess = (roomAccess) => {
|
||||||
// join_rule
|
// join_rule
|
||||||
// INVITE | PUBLIC
|
// INVITE | PUBLIC
|
||||||
// ----------------------+----------------
|
// ----------------------+----------------
|
||||||
|
@ -191,6 +191,29 @@ export default class SecurityRoomSettingsTab extends React.Component {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
this.setState({guestAccess: beforeGuestAccess});
|
this.setState({guestAccess: beforeGuestAccess});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_onRoomAccessRadioToggle = async (roomAccess) => {
|
||||||
|
if (
|
||||||
|
this.state.encrypted &&
|
||||||
|
this.state.joinRule != "public" &&
|
||||||
|
roomAccess != "invite_only"
|
||||||
|
) {
|
||||||
|
Modal.createTrackedDialog('Confirm Public Encrypted Room', '', QuestionDialog, {
|
||||||
|
title: _t('Confirm making this room public?'),
|
||||||
|
description: _t(
|
||||||
|
"Making end-to-end encrypted rooms public renders the " +
|
||||||
|
"encryption pointless, wastes processing power, and can cause " +
|
||||||
|
"performance problems. Please consider creating a separate " +
|
||||||
|
"unencrypted public room.",
|
||||||
|
),
|
||||||
|
onFinished: (confirm) => {
|
||||||
|
if (confirm) this._setRoomAccess(roomAccess);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this._setRoomAccess(roomAccess);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_onHistoryRadioToggle = (history) => {
|
_onHistoryRadioToggle = (history) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue