Merge pull request #2231 from matrix-org/travis/dialog-buttons
Move all dialog buttons to the right and fix their order
This commit is contained in:
commit
9976c4eba5
7 changed files with 16 additions and 34 deletions
|
@ -222,6 +222,11 @@ textarea {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_Dialog_buttons {
|
||||||
|
padding-right: 58px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_Dialog button, .mx_Dialog input[type="submit"] {
|
.mx_Dialog button, .mx_Dialog input[type="submit"] {
|
||||||
@mixin mx_DialogButton;
|
@mixin mx_DialogButton;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
@import "./views/dialogs/_DevtoolsDialog.scss";
|
@import "./views/dialogs/_DevtoolsDialog.scss";
|
||||||
@import "./views/dialogs/_EncryptedEventDialog.scss";
|
@import "./views/dialogs/_EncryptedEventDialog.scss";
|
||||||
@import "./views/dialogs/_GroupAddressPicker.scss";
|
@import "./views/dialogs/_GroupAddressPicker.scss";
|
||||||
@import "./views/dialogs/_QuestionDialog.scss";
|
|
||||||
@import "./views/dialogs/_RoomUpgradeDialog.scss";
|
@import "./views/dialogs/_RoomUpgradeDialog.scss";
|
||||||
@import "./views/dialogs/_SetEmailDialog.scss";
|
@import "./views/dialogs/_SetEmailDialog.scss";
|
||||||
@import "./views/dialogs/_SetMxIdDialog.scss";
|
@import "./views/dialogs/_SetMxIdDialog.scss";
|
||||||
|
|
|
@ -14,14 +14,6 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_ChatInviteDialog {
|
|
||||||
/* XXX: padding-left is on mx_Dialog but padding-right has subsequently
|
|
||||||
* been added on other dialogs. Surely all our dialogs should have consistent
|
|
||||||
* right hand padding?
|
|
||||||
*/
|
|
||||||
padding-right: 58px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Using a textarea for this element, to circumvent autofill */
|
/* Using a textarea for this element, to circumvent autofill */
|
||||||
.mx_ChatInviteDialog_input,
|
.mx_ChatInviteDialog_input,
|
||||||
.mx_ChatInviteDialog_input:focus
|
.mx_ChatInviteDialog_input:focus
|
||||||
|
|
|
@ -14,6 +14,10 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.mx_DevTools_dialog {
|
||||||
|
padding-right: 58px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_DevTools_content {
|
.mx_DevTools_content {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2017 New Vector Ltd.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
.mx_QuestionDialog {
|
|
||||||
padding-right: 58px;
|
|
||||||
}
|
|
|
@ -625,7 +625,7 @@ export default class DevtoolsDialog extends React.Component {
|
||||||
let body;
|
let body;
|
||||||
|
|
||||||
if (this.state.mode) {
|
if (this.state.mode) {
|
||||||
body = <div>
|
body = <div className="mx_DevTools_dialog">
|
||||||
<div className="mx_DevTools_label_left">{ this.state.mode.getLabel() }</div>
|
<div className="mx_DevTools_label_left">{ this.state.mode.getLabel() }</div>
|
||||||
<div className="mx_DevTools_label_right">Room ID: { this.props.roomId }</div>
|
<div className="mx_DevTools_label_right">Room ID: { this.props.roomId }</div>
|
||||||
<div className="mx_DevTools_label_bottom" />
|
<div className="mx_DevTools_label_bottom" />
|
||||||
|
@ -634,7 +634,7 @@ export default class DevtoolsDialog extends React.Component {
|
||||||
} else {
|
} else {
|
||||||
const classes = "mx_DevTools_RoomStateExplorer_button";
|
const classes = "mx_DevTools_RoomStateExplorer_button";
|
||||||
body = <div>
|
body = <div>
|
||||||
<div>
|
<div className="mx_DevTools_dialog">
|
||||||
<div className="mx_DevTools_label_left">{ _t('Toolbox') }</div>
|
<div className="mx_DevTools_label_left">{ _t('Toolbox') }</div>
|
||||||
<div className="mx_DevTools_label_right">Room ID: { this.props.roomId }</div>
|
<div className="mx_DevTools_label_right">Room ID: { this.props.roomId }</div>
|
||||||
<div className="mx_DevTools_label_bottom" />
|
<div className="mx_DevTools_label_bottom" />
|
||||||
|
|
|
@ -70,6 +70,8 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="mx_Dialog_buttons">
|
<div className="mx_Dialog_buttons">
|
||||||
|
{ cancelButton }
|
||||||
|
{ this.props.children }
|
||||||
<button className={primaryButtonClassName}
|
<button className={primaryButtonClassName}
|
||||||
onClick={this.props.onPrimaryButtonClick}
|
onClick={this.props.onPrimaryButtonClick}
|
||||||
autoFocus={this.props.focus}
|
autoFocus={this.props.focus}
|
||||||
|
@ -77,8 +79,6 @@ module.exports = React.createClass({
|
||||||
>
|
>
|
||||||
{ this.props.primaryButton }
|
{ this.props.primaryButton }
|
||||||
</button>
|
</button>
|
||||||
{ this.props.children }
|
|
||||||
{ cancelButton }
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue