Merge remote-tracking branch 'origin/develop' into develop
commit
1fd6155163
|
@ -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";
|
||||||
|
|
|
@ -19,6 +19,7 @@ limitations under the License.
|
||||||
height: unset !important;
|
height: unset !important;
|
||||||
padding-top: 13px !important;
|
padding-top: 13px !important;
|
||||||
padding-bottom: 14px !important;
|
padding-bottom: 14px !important;
|
||||||
|
order: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_LoginBox_loginButton_wrapper {
|
.mx_LoginBox_loginButton_wrapper {
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -56,3 +56,7 @@ limitations under the License.
|
||||||
.mx_RoomPreviewBar_warningIcon {
|
.mx_RoomPreviewBar_warningIcon {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_RoomPreviewBar_spinnerIntro {
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
|
@ -181,14 +181,8 @@ var LeftPanel = React.createClass({
|
||||||
const BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu');
|
const BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu');
|
||||||
const CallPreview = sdk.getComponent('voip.CallPreview');
|
const CallPreview = sdk.getComponent('voip.CallPreview');
|
||||||
|
|
||||||
let topBox;
|
const SearchBox = sdk.getComponent('structures.SearchBox');
|
||||||
if (this.context.matrixClient.isGuest()) {
|
const topBox = <SearchBox collapsed={ this.props.collapsed } onSearch={ this.onSearch } />;
|
||||||
const LoginBox = sdk.getComponent('structures.LoginBox');
|
|
||||||
topBox = <LoginBox collapsed={ this.props.collapsed }/>;
|
|
||||||
} else {
|
|
||||||
const SearchBox = sdk.getComponent('structures.SearchBox');
|
|
||||||
topBox = <SearchBox collapsed={ this.props.collapsed } onSearch={ this.onSearch } />;
|
|
||||||
}
|
|
||||||
|
|
||||||
const classes = classNames(
|
const classes = classNames(
|
||||||
"mx_LeftPanel",
|
"mx_LeftPanel",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017 Vector Creations Ltd
|
Copyright 2017 Vector Creations Ltd
|
||||||
|
Copyright 2018 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -16,31 +17,15 @@ limitations under the License.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react');
|
const React = require('react');
|
||||||
import { _t } from '../../languageHandler';
|
import { _t } from '../../languageHandler';
|
||||||
var sdk = require('../../index')
|
const dis = require('../../dispatcher');
|
||||||
var dis = require('../../dispatcher');
|
const AccessibleButton = require('../../components/views/elements/AccessibleButton');
|
||||||
var rate_limited_func = require('../../ratelimitedfunc');
|
|
||||||
var AccessibleButton = require('../../components/views/elements/AccessibleButton');
|
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'LoginBox',
|
displayName: 'LoginBox',
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
collapsed: React.PropTypes.bool,
|
|
||||||
},
|
|
||||||
|
|
||||||
onToggleCollapse: function(show) {
|
|
||||||
if (show) {
|
|
||||||
dis.dispatch({
|
|
||||||
action: 'show_left_panel',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dis.dispatch({
|
|
||||||
action: 'hide_left_panel',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoginClick: function() {
|
onLoginClick: function() {
|
||||||
|
@ -52,41 +37,20 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var TintableSvg = sdk.getComponent('elements.TintableSvg');
|
const loginButton = (
|
||||||
|
<div className="mx_LoginBox_loginButton_wrapper">
|
||||||
var toggleCollapse;
|
<AccessibleButton className="mx_LoginBox_loginButton" element="button" onClick={this.onLoginClick}>
|
||||||
if (this.props.collapsed) {
|
{ _t("Login") }
|
||||||
toggleCollapse =
|
|
||||||
<AccessibleButton className="mx_SearchBox_maximise" onClick={ this.onToggleCollapse.bind(this, true) }>
|
|
||||||
<TintableSvg src="img/maximise.svg" width="10" height="16" alt="Expand panel"/>
|
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
}
|
<AccessibleButton className="mx_LoginBox_registerButton" element="button" onClick={this.onRegisterClick}>
|
||||||
else {
|
{ _t("Register") }
|
||||||
toggleCollapse =
|
|
||||||
<AccessibleButton className="mx_SearchBox_minimise" onClick={ this.onToggleCollapse.bind(this, false) }>
|
|
||||||
<TintableSvg src="img/minimise.svg" width="10" height="16" alt="Collapse panel"/>
|
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
}
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
var loginButton;
|
|
||||||
if (!this.props.collapsed) {
|
|
||||||
loginButton = (
|
|
||||||
<div className="mx_LoginBox_loginButton_wrapper">
|
|
||||||
<AccessibleButton className="mx_LoginBox_loginButton" element="button" onClick={this.onLoginClick}>
|
|
||||||
{ _t("Login") }
|
|
||||||
</AccessibleButton>
|
|
||||||
<AccessibleButton className="mx_LoginBox_registerButton" element="button" onClick={this.onRegisterClick}>
|
|
||||||
{ _t("Register") }
|
|
||||||
</AccessibleButton>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
var self = this;
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_SearchBox mx_LoginBox">
|
<div className="mx_LoginBox">
|
||||||
{ loginButton }
|
{ loginButton }
|
||||||
{ toggleCollapse }
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1514,6 +1514,7 @@ module.exports = React.createClass({
|
||||||
canPreview={false} error={this.state.roomLoadError}
|
canPreview={false} error={this.state.roomLoadError}
|
||||||
roomAlias={roomAlias}
|
roomAlias={roomAlias}
|
||||||
spinner={this.state.joining}
|
spinner={this.state.joining}
|
||||||
|
spinnerState="joining"
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
invitedEmail={invitedEmail}
|
invitedEmail={invitedEmail}
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
|
@ -1558,6 +1559,7 @@ module.exports = React.createClass({
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
canPreview={false}
|
canPreview={false}
|
||||||
spinner={this.state.joining}
|
spinner={this.state.joining}
|
||||||
|
spinnerState="joining"
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1645,6 +1647,7 @@ module.exports = React.createClass({
|
||||||
onForgetClick={this.onForgetClick}
|
onForgetClick={this.onForgetClick}
|
||||||
onRejectClick={this.onRejectThreepidInviteButtonClicked}
|
onRejectClick={this.onRejectThreepidInviteButtonClicked}
|
||||||
spinner={this.state.joining}
|
spinner={this.state.joining}
|
||||||
|
spinnerState="joining"
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
invitedEmail={invitedEmail}
|
invitedEmail={invitedEmail}
|
||||||
canPreview={this.state.canPeek}
|
canPreview={this.state.canPeek}
|
||||||
|
@ -1670,7 +1673,7 @@ module.exports = React.createClass({
|
||||||
let messageComposer, searchInfo;
|
let messageComposer, searchInfo;
|
||||||
const canSpeak = (
|
const canSpeak = (
|
||||||
// joined and not showing search results
|
// joined and not showing search results
|
||||||
myMembership == 'join' && !this.state.searchResults
|
myMembership === 'join' && !this.state.searchResults
|
||||||
);
|
);
|
||||||
if (canSpeak) {
|
if (canSpeak) {
|
||||||
messageComposer =
|
messageComposer =
|
||||||
|
@ -1684,6 +1687,11 @@ module.exports = React.createClass({
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MatrixClientPeg.get().isGuest()) {
|
||||||
|
const LoginBox = sdk.getComponent('structures.LoginBox');
|
||||||
|
messageComposer = <LoginBox/>;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Why aren't we storing the term/scope/count in this format
|
// TODO: Why aren't we storing the term/scope/count in this format
|
||||||
// in this.state if this is what RoomHeader desires?
|
// in this.state if this is what RoomHeader desires?
|
||||||
if (this.state.searchResults) {
|
if (this.state.searchResults) {
|
||||||
|
|
|
@ -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,15 +70,15 @@ 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}
|
||||||
disabled={this.props.disabled}
|
disabled={this.props.disabled}
|
||||||
>
|
>
|
||||||
{ this.props.primaryButton }
|
{ this.props.primaryButton }
|
||||||
</button>
|
</button>
|
||||||
{ this.props.children }
|
|
||||||
{ cancelButton }
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,9 +44,13 @@ module.exports = React.createClass({
|
||||||
error: PropTypes.object,
|
error: PropTypes.object,
|
||||||
|
|
||||||
canPreview: PropTypes.bool,
|
canPreview: PropTypes.bool,
|
||||||
spinner: PropTypes.bool,
|
|
||||||
room: PropTypes.object,
|
room: PropTypes.object,
|
||||||
|
|
||||||
|
// When a spinner is present, a spinnerState can be specified to indicate the
|
||||||
|
// purpose of the spinner.
|
||||||
|
spinner: PropTypes.bool,
|
||||||
|
spinnerState: PropTypes.oneOf(["joining"]),
|
||||||
|
|
||||||
// The alias that was used to access this room, if appropriate
|
// The alias that was used to access this room, if appropriate
|
||||||
// If given, this will be how the room is referred to (eg.
|
// If given, this will be how the room is referred to (eg.
|
||||||
// in error messages).
|
// in error messages).
|
||||||
|
@ -93,7 +97,12 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
if (this.props.spinner || this.state.busy) {
|
if (this.props.spinner || this.state.busy) {
|
||||||
const Spinner = sdk.getComponent("elements.Spinner");
|
const Spinner = sdk.getComponent("elements.Spinner");
|
||||||
|
let spinnerIntro = "";
|
||||||
|
if (this.props.spinnerState === "joining") {
|
||||||
|
spinnerIntro = _t("Joining room...");
|
||||||
|
}
|
||||||
return (<div className="mx_RoomPreviewBar">
|
return (<div className="mx_RoomPreviewBar">
|
||||||
|
<p className="mx_RoomPreviewBar_spinnerIntro">{ spinnerIntro }</p>
|
||||||
<Spinner />
|
<Spinner />
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,6 +512,7 @@
|
||||||
"You have no historical rooms": "You have no historical rooms",
|
"You have no historical rooms": "You have no historical rooms",
|
||||||
"Historical": "Historical",
|
"Historical": "Historical",
|
||||||
"System Alerts": "System Alerts",
|
"System Alerts": "System Alerts",
|
||||||
|
"Joining room...": "Joining room...",
|
||||||
"Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.",
|
"Unable to ascertain that the address this invite was sent to matches one associated with your account.": "Unable to ascertain that the address this invite was sent to matches one associated with your account.",
|
||||||
"This invitation was sent to an email address which is not associated with this account:": "This invitation was sent to an email address which is not associated with this account:",
|
"This invitation was sent to an email address which is not associated with this account:": "This invitation was sent to an email address which is not associated with this account:",
|
||||||
"You may wish to login with a different account, or add this email to this account.": "You may wish to login with a different account, or add this email to this account.",
|
"You may wish to login with a different account, or add this email to this account.": "You may wish to login with a different account, or add this email to this account.",
|
||||||
|
|
Loading…
Reference in New Issue