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

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix settings look
Browse files Browse the repository at this point in the history
anoadragon453 committed Nov 21, 2018
1 parent 643da63 commit db6bc54
Showing 2 changed files with 27 additions and 30 deletions.
42 changes: 18 additions & 24 deletions src/components/structures/UserSettings.js
Original file line number Diff line number Diff line change
@@ -815,33 +815,27 @@ module.exports = React.createClass({

_renderPushToTalkSettings: function() {
const id = "pushToTalk";
const buttonLabel = this.state.settingKeybinding ? 'Stop' : 'Set';
const buttonLabel = this.state.settingKeybinding ? _t('Stop') : _t('Set');
const activated = SettingsStore.getValueAt(SettingLevel.DEVICE, id).enabled;

return (
<div>
<table>
<tbody>
<tr>
<td>
<input type="checkbox"
name={id}
defaultChecked={activated}
onChange={this._onTogglePushToTalkClicked}
/>
<label htmlFor={id}>{SettingsStore.getDisplayName(id)}</label>
</td>
<td>{"Shortcut: " + this.state.pushToTalkAscii}</td>
<td>
<button key={id} className="mx_Dialog_primary"
onClick={this._onSetPushToTalkClicked}
disabled={!this.state.pushToTalkEnabled}>
{buttonLabel}
</button>
</td>
</tr>
</tbody>
</table>
<div className="mx_UserSettings_toggle" key={id}>
<span>
<input type="checkbox"
name={id}
defaultChecked={activated}
onChange={this._onTogglePushToTalkClicked}
/>
<label htmlFor={id}>{SettingsStore.getDisplayName(id)}</label>
</span>
<span>{" | Shortcut: " + this.state.pushToTalkAscii + " "}</span>
<span>
<button key={id} className="mx_textButton"
onClick={this._onSetPushToTalkClicked}
disabled={!this.state.pushToTalkEnabled}>
{buttonLabel}
</button>
</span>
</div>
);
},
15 changes: 9 additions & 6 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
@@ -223,6 +223,7 @@
"Failed to join room": "Failed to join room",
"Message Pinning": "Message Pinning",
"Increase performance by only loading room members on first view": "Increase performance by only loading room members on first view",
"Push-to-Talk": "Push-to-Talk",
"Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing",
"Use compact timeline layout": "Use compact timeline layout",
"Hide removed messages": "Hide removed messages",
@@ -249,10 +250,11 @@
"Enable URL previews for this room (only affects you)": "Enable URL previews for this room (only affects you)",
"Enable URL previews by default for participants in this room": "Enable URL previews by default for participants in this room",
"Room Colour": "Room Colour",
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
"Pin rooms I'm mentioned in to the top of the room list": "Pin rooms I'm mentioned in to the top of the room list",
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
"Show empty room list headings": "Show empty room list headings",
"Show developer tools": "Show developer tools",
"Collecting app version information": "Collecting app version information",
"Collecting logs": "Collecting logs",
"Uploading report": "Uploading report",
@@ -553,6 +555,7 @@
"Click here to fix": "Click here to fix",
"To send events of type <eventType/>, you must be a": "To send events of type <eventType/>, you must be a",
"Upgrade room to version %(ver)s": "Upgrade room to version %(ver)s",
"Open Devtools": "Open Devtools",
"Who can access this room?": "Who can access this room?",
"Only people who have been invited": "Only people who have been invited",
"Anyone who knows the room's link, apart from guests": "Anyone who knows the room's link, apart from guests",
@@ -927,9 +930,7 @@
"Username available": "Username available",
"To get started, please pick a username!": "To get started, please pick a username!",
"This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.": "This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.",
"If you would like to create a Matrix account you can <a>register</a> now.": "If you would like to create a Matrix account you can <a>register</a> now.",
"If you already have a Matrix account you can <a>log in</a> instead.": "If you already have a Matrix account you can <a>log in</a> instead.",
"You are currently using Riot anonymously as a guest.": "You are currently using Riot anonymously as a guest.",
"You have successfully set a password!": "You have successfully set a password!",
"You have successfully set a password and an email address!": "You have successfully set a password and an email address!",
"You can now return to your account after signing out, and sign in on other devices.": "You can now return to your account after signing out, and sign in on other devices.",
@@ -1036,6 +1037,8 @@
"This Home server does not support communities": "This Home server does not support communities",
"Failed to load %(groupId)s": "Failed to load %(groupId)s",
"Couldn't load home page": "Couldn't load home page",
"You are currently using Riot anonymously as a guest.": "You are currently using Riot anonymously as a guest.",
"If you would like to create a Matrix account you can <a>register</a> now.": "If you would like to create a Matrix account you can <a>register</a> now.",
"Login": "Login",
"Failed to reject invitation": "Failed to reject invitation",
"This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.",
@@ -1140,6 +1143,8 @@
"Unable to remove contact information": "Unable to remove contact information",
"Refer a friend to Riot:": "Refer a friend to Riot:",
"Interface Language": "Interface Language",
"Stop": "Stop",
"Set": "Set",
"User Interface": "User Interface",
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
"<not supported>": "<not supported>",
@@ -1272,7 +1277,5 @@
"Import": "Import",
"Failed to set direct chat tag": "Failed to set direct chat tag",
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
"Open Devtools": "Open Devtools",
"Show developer tools": "Show developer tools"
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room"
}

0 comments on commit db6bc54

Please sign in to comment.