Basic structure of user settings
This commit is contained in:
parent
844a883ad8
commit
dfd54f3b95
5 changed files with 42 additions and 10 deletions
|
@ -38,7 +38,7 @@ limitations under the License.
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.mx_MatrixChat .mx_RoomView {
|
||||
.mx_MatrixChat .mx_MainView {
|
||||
-webkit-box-ordinal-group: 2;
|
||||
-moz-box-ordinal-group: 2;
|
||||
-ms-flex-order: 2;
|
||||
|
@ -47,7 +47,7 @@ limitations under the License.
|
|||
|
||||
background-color: #f3f8fa;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mx_MatrixChat .mx_RightPanel {
|
||||
|
@ -60,5 +60,5 @@ limitations under the License.
|
|||
background-color: #f3f8fa;
|
||||
-webkit-flex: 0 0 230px;
|
||||
flex: 0 0 230px;
|
||||
height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
var React = require('react');
|
||||
var classNames = require('classnames');
|
||||
|
||||
var dis = require("../../../../src/dispatcher");
|
||||
|
||||
//var DirectoryMenuController = require("../../../../src/controllers/molecules/DirectoryMenuController");
|
||||
|
||||
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
||||
|
@ -26,6 +28,11 @@ var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
|||
module.exports = React.createClass({
|
||||
displayName: 'DirectoryMenu',
|
||||
// mixins: [DirectoryMenuController],
|
||||
|
||||
onSettingsClick: function() {
|
||||
dis.dispatch({action: 'view_user_settings'});
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_DirectoryMenu">
|
||||
|
@ -42,7 +49,7 @@ module.exports = React.createClass({
|
|||
</div>
|
||||
<div className="mx_RoomTile_name">Directory</div>
|
||||
</div>
|
||||
<div className="mx_RoomTile">
|
||||
<div className="mx_RoomTile" onClick={this.onSettingsClick}>
|
||||
<div className="mx_RoomTile_avatar">
|
||||
<img src="img/settings-big.png" width="42" height="42"/>
|
||||
</div>
|
||||
|
|
|
@ -23,6 +23,7 @@ var LeftPanel = ComponentBroker.get('organisms/LeftPanel');
|
|||
var RoomView = ComponentBroker.get('organisms/RoomView');
|
||||
var RightPanel = ComponentBroker.get('organisms/RightPanel');
|
||||
var Login = ComponentBroker.get('templates/Login');
|
||||
var UserSettings = ComponentBroker.get('organisms/UserSettings');
|
||||
|
||||
var MatrixChatController = require("../../../../src/controllers/pages/MatrixChat");
|
||||
|
||||
|
@ -36,11 +37,24 @@ module.exports = React.createClass({
|
|||
|
||||
render: function() {
|
||||
if (this.state.logged_in && this.state.ready) {
|
||||
|
||||
var page_element;
|
||||
var right_panel = "";
|
||||
|
||||
if (this.state.page_type == this.PageTypes.RoomView) {
|
||||
page_element = <RoomView roomId={this.state.currentRoom} key={this.state.currentRoom} />
|
||||
right_panel = <RightPanel roomId={this.state.currentRoom} />
|
||||
} else if (this.state.page_type == this.PageTypes.UserSettings) {
|
||||
page_element = <UserSettings />
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mx_MatrixChat">
|
||||
<LeftPanel selectedRoom={this.state.currentRoom} />
|
||||
<RoomView roomId={this.state.currentRoom} key={this.state.currentRoom} />
|
||||
<RightPanel roomId={this.state.currentRoom} />
|
||||
<div className="mx_MainView">
|
||||
{page_element}
|
||||
</div>
|
||||
{right_panel}
|
||||
</div>
|
||||
);
|
||||
} else if (this.state.logged_in) {
|
||||
|
@ -54,4 +68,3 @@ module.exports = React.createClass({
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue