Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Resolved the nits and added the knocking svg
Browse files Browse the repository at this point in the history
Signed-off-by: ankur12-1610 <[email protected]>
  • Loading branch information
ankur12-1610 committed Jul 24, 2022
1 parent ea01bc7 commit d695cc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/components/views/dialogs/CreateRoomDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IProps {
defaultName?: string;
parentSpace?: Room;
defaultEncrypted?: boolean;
onFinished(proceed: boolean, opts?: IOpts): void;
onFinished(proceed: boolean, opts?: IOpts): void;
}

interface IState {
Expand Down Expand Up @@ -75,8 +75,6 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
joinRule = JoinRule.Public;
} else if (this.supportsRestricted) {
joinRule = JoinRule.Restricted;
} else if (this.knockingEnabled) {
joinRule = JoinRule.Knock;
}

this.state = {
Expand Down Expand Up @@ -276,7 +274,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
</p>;
} else if (this.state.joinRule === JoinRule.Knock && this.knockingEnabled) {
publicPrivateLabel = <p>
{ _t("Anyone can knock on this room to join.") }
{ _t("This room type requires users to be granted access in order to join.") }
&nbsp;
{ _t("You can change this at any time from room settings.") }
</p>;
Expand Down Expand Up @@ -358,7 +356,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
<JoinRuleDropdown
label={_t("Room visibility")}
labelInvite={_t("Private room (invite only)")}
labelKnock={this.knockingEnabled ? _t("Anyone can knock to join") : undefined}
labelKnock={this.knockingEnabled ? _t("Ask to join (Anyone can knock to join)") : undefined}
labelPublic={_t("Public room")}
labelRestricted={this.supportsRestricted ? _t("Visible to space members") : undefined}
value={this.state.joinRule}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/JoinRuleDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface IProps {
label: string;
width?: number;
labelInvite: string;
labelKnock: string;
labelKnock?: string;
labelPublic: string;
labelRestricted?: string; // if omitted then this option will be hidden, e.g if unsupported
onChange(value: JoinRule): void;
Expand Down
5 changes: 4 additions & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@
"Report to moderators prototype. In rooms that support moderation, the `report` button will let you report abuse to room moderators": "Report to moderators prototype. In rooms that support moderation, the `report` button will let you report abuse to room moderators",
"Render LaTeX maths in messages": "Render LaTeX maths in messages",
"Message Pinning": "Message Pinning",
"Knocking": "Knocking",
"Let users knock on a room to join it.": "Let users knock on a room to join it.",
"Threaded messaging": "Threaded messaging",
"Keep discussions organised with threads.": "Keep discussions organised with threads.",
"Threads help keep conversations on-topic and easy to track. <a>Learn more</a>.": "Threads help keep conversations on-topic and easy to track. <a>Learn more</a>.",
Expand Down Expand Up @@ -2465,6 +2467,7 @@
"Anyone will be able to find and join this room, not just members of <SpaceName/>.": "Anyone will be able to find and join this room, not just members of <SpaceName/>.",
"Anyone will be able to find and join this room.": "Anyone will be able to find and join this room.",
"Only people invited will be able to find and join this room.": "Only people invited will be able to find and join this room.",
"This room type requires users to be granted access in order to join.": "This room type requires users to be granted access in order to join.",
"You can't disable this later. The room will be encrypted but the embedded call will not.": "You can't disable this later. The room will be encrypted but the embedded call will not.",
"You can't disable this later. Bridges & most bots won't work yet.": "You can't disable this later. Bridges & most bots won't work yet.",
"Your server requires encryption to be enabled in private rooms.": "Your server requires encryption to be enabled in private rooms.",
Expand All @@ -2478,7 +2481,7 @@
"Topic (optional)": "Topic (optional)",
"Room visibility": "Room visibility",
"Private room (invite only)": "Private room (invite only)",
"Anyone can knock to join" : "Anyone can knock to join",
"Ask to join (Anyone can knock to join)": "Ask to join (Anyone can knock to join)",
"Visible to space members": "Visible to space members",
"Block anyone not part of %(serverName)s from ever joining this room.": "Block anyone not part of %(serverName)s from ever joining this room.",
"Create video room": "Create video room",
Expand Down

0 comments on commit d695cc9

Please sign in to comment.