From 6da2f88dc5c99caac600434da076936e8cb8ef40 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 30 Oct 2017 13:32:31 +0000 Subject: [PATCH] Devtools styling tweaks Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/dialogs/DevtoolsDialog.js | 47 ++++++++------- src/i18n/strings/en_EN.json | 4 +- .../views/dialogs/_DevtoolsDialog.scss | 58 ++++++++++++++++--- 3 files changed, 79 insertions(+), 30 deletions(-) diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 2c854f99b..a7155ad12 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -55,12 +55,12 @@ class GenericEditor extends DevtoolsComponent { } textInput(id, label) { - return
-
- + return
+
+
-
- +
+
; } @@ -148,8 +148,8 @@ class SendCustomEvent extends GenericEditor { { !this.state.message && } { !this.state.message && !this.props.forceStateEvent &&
- -
}
; @@ -233,8 +233,8 @@ class SendAccountData extends GenericEditor { { !this.state.message && } { !this.state.message &&
- -
}
; @@ -489,8 +489,8 @@ class AccountDataExplorer extends DevtoolsComponent {
{ !this.state.message &&
- -
}
; @@ -557,19 +557,26 @@ export default class DevtoolsDialog extends React.Component { if (this.state.mode) { body =
-
{ this.state.mode.getLabel() }
-
Room ID: { this.props.roomId }
-
+
{ this.state.mode.getLabel() }
+
Room ID: { this.props.roomId }
+
; } else { + const classes = "mx_DevTools_RoomStateExplorer_button"; body =
-
-
Room ID: { this.props.roomId }
- { Entries.map((Entry) => { - const label = Entry.getLabel(); - return ; - }) } +
+
{ _t('Toolbox') }
+
Room ID: { this.props.roomId }
+
+ +
+ { Entries.map((Entry) => { + const label = Entry.getLabel(); + const onClick = this._setMode(Entry); + return ; + }) } +
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 2ed6b204c..4702ae93a 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -70,6 +70,7 @@ "What's new?": "What's new?", "A new version of Riot is available.": "A new version of Riot is available.", "To return to your account in future you need to set a password": "To return to your account in future you need to set a password", + "Toolbox": "Toolbox", "Set Password": "Set Password", "Error encountered (%(errorDetail)s).": "Error encountered (%(errorDetail)s).", "Checking for an update...": "Checking for an update...", @@ -106,12 +107,9 @@ "Edit": "Edit", "Filter results": "Filter results", "Send Custom Event": "Send Custom Event", - "Send Custom State Event": "Send Custom State Event", "Send Account Data": "Send Account Data", - "Send Room Account Data": "Send Room Account Data", "Explore Account Data": "Explore Account Data", "Explore Room State": "Explore Room State", - "Explore Room Account Data": "Explore Room Account Data", "Developer Tools": "Developer Tools", "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!", diff --git a/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss b/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss index 46cdf10ac..8918373ec 100644 --- a/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss +++ b/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss @@ -18,7 +18,51 @@ limitations under the License. margin-bottom: 10px; } -.tgl { +.mx_DevTools_label_left { + float: left; +} + +.mx_DevTools_label_right { + float: right; +} + +.mx_DevTools_label_bottom { + clear: both; + border-bottom: 1px solid #e5e5e5; +} + +.mx_DevTools_inputRow +{ + display: table-row; +} + +.mx_DevTools_inputLabelCell +{ + padding-bottom: 21px; + display: table-cell; + font-weight: bold; + padding-right: 24px; +} + +.mx_DevTools_inputCell { + display: table-cell; + padding-bottom: 21px; + width: 240px; +} + +.mx_DevTools_inputCell input +{ + display: inline-block; + border: 0; + border-bottom: 1px solid $input-underline-color; + padding: 0; + width: 240px; + color: $input-fg-color; + font-family: 'Open Sans', Helvetica, Arial, Sans-Serif; + font-size: 16px; +} + +.mx_DevTools_tgl { display: none; // add default box-sizing for this scope @@ -28,14 +72,14 @@ limitations under the License. & *, & *:after, & *:before, - & + .tgl-btn { + & + .mx_DevTools_tgl-btn { box-sizing: border-box; &::selection { background: none; } } - + .tgl-btn { + + .mx_DevTools_tgl-btn { outline: 0; display: block; width: 7em; @@ -61,13 +105,13 @@ limitations under the License. } } - &:checked + .tgl-btn:after { + &:checked + .mx_DevTools_tgl-btn:after { left: 50%; } } -.tgl-flip { - + .tgl-btn { +.mx_DevTools_tgl-flip { + + .mx_DevTools_tgl-btn { padding: 2px; transition: all .2s ease; font-family: sans-serif; @@ -104,7 +148,7 @@ limitations under the License. } } - &:checked + .tgl-btn { + &:checked + .mx_DevTools_tgl-btn { &:before { transform: rotateY(180deg); }