mirror of https://github.com/vector-im/riot-web
Copy from PR feedback + use strong tags
parent
0fdb300858
commit
23bd96cdde
|
@ -1214,11 +1214,15 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
maxUserLevel === currentUserLevel &&
|
||||
userLevelValues.lastIndexOf(maxUserLevel) == userLevelValues.indexOf(maxUserLevel)
|
||||
) {
|
||||
const warning =
|
||||
maxUserLevel >= 100
|
||||
? _t("leave_room_dialog|room_leave_admin_warning")
|
||||
: _t("leave_room_dialog|room_leave_mod_warning");
|
||||
warnings.push(
|
||||
<span className="warning" key="last_admin_warning">
|
||||
<strong className="warning" key="last_admin_warning">
|
||||
{" " /* Whitespace, otherwise the sentences get smashed together */}
|
||||
{_t("leave_room_dialog|room_leave_admin_warning")}
|
||||
</span>,
|
||||
{warning}
|
||||
</strong>,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1248,6 +1252,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
</span>
|
||||
),
|
||||
button: _t("action|leave"),
|
||||
danger: warnings.length > 0,
|
||||
onFinished: async (shouldLeave) => {
|
||||
if (shouldLeave) {
|
||||
await leaveRoomBehaviour(cli, roomId);
|
||||
|
|
|
@ -1524,7 +1524,8 @@
|
|||
"leave_room_question": "Are you sure you want to leave the room '%(roomName)s'?",
|
||||
"leave_space_question": "Are you sure you want to leave the space '%(spaceName)s'?",
|
||||
"room_rejoin_warning": "This room is not public. You will not be able to rejoin without an invite.",
|
||||
"room_leave_admin_warning": "You are the sole person with the highest role in this room. If you leave, the room could become unmoderable. Consider giving another user your role.",
|
||||
"room_leave_admin_warning": "You're the only administrator in this room. If you leave, nobody will be able to change room settings or take other important actions.",
|
||||
"room_leave_mod_warning": "You're the only moderator in this room. If you leave, nobody will be able to change room settings or take other important actions.",
|
||||
"space_rejoin_warning": "This space is not public. You will not be able to rejoin without an invite."
|
||||
},
|
||||
"left_panel": {
|
||||
|
|
Loading…
Reference in New Issue