vector wireframes
This commit is contained in:
parent
98baa0cb0a
commit
bfe0cdcfd1
43 changed files with 741 additions and 128 deletions
50
skins/base/views/molecules/DirectoryMenu.js
Normal file
50
skins/base/views/molecules/DirectoryMenu.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
Copyright 2015 OpenMarket 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var classNames = require('classnames');
|
||||
|
||||
//var DirectoryMenuController = require("../../../../src/controllers/molecules/DirectoryMenuController");
|
||||
|
||||
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'DirectoryMenu',
|
||||
// mixins: [DirectoryMenuController],
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_DirectoryMenu">
|
||||
<h2>Directory</h2>
|
||||
<div className="mx_DirectoryMenu_options">
|
||||
<div className="mx_RoomTile">
|
||||
<div className="mx_RoomTile_avatar">
|
||||
<img src="img/placeholder.png" width="32" height="32" alt="(+)"/>
|
||||
</div>
|
||||
<div className="mx_RoomTile_name">Users</div>
|
||||
</div>
|
||||
<div className="mx_RoomTile">
|
||||
<div className="mx_RoomTile_avatar">
|
||||
<img src="img/placeholder.png" width="32" height="32" alt="(+)"/>
|
||||
</div>
|
||||
<div className="mx_RoomTile_name">Rooms</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
|
@ -26,6 +26,7 @@ module.exports = React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
<div className="mx_MemberTile">
|
||||
<div className="mx_MemberTile_avatar"><img src="img/placeholder.png" width="32" height="32" alt="()"/></div>
|
||||
<div className="mx_MemberTile_name">{this.props.member.name}</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -27,7 +27,16 @@ module.exports = React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
<div className="mx_MessageComposer">
|
||||
<textarea ref="textarea" onKeyDown={this.onKeyDown} />
|
||||
<div className="mx_MessageComposer_wrapper">
|
||||
<div className="mx_MessageComposer_row">
|
||||
<div className="mx_MessageComposer_avatar">
|
||||
<img src="img/placeholder.png" width="32" height="32" alt="(+)"/>
|
||||
</div>
|
||||
<div className="mx_MessageComposer_input">
|
||||
<textarea ref="textarea" onKeyDown={this.onKeyDown} placeholder="Type a message" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
|
|
@ -56,6 +56,9 @@ module.exports = React.createClass({
|
|||
});
|
||||
return (
|
||||
<div className={classes}>
|
||||
<div className="mx_MessageTile_avatar">
|
||||
<img src="/img/placeholder.png" width="32" height="32"/>
|
||||
</div>
|
||||
<MessageTimestamp ts={this.props.mxEvent.getTs()} />
|
||||
<SenderProfile mxEvent={this.props.mxEvent} />
|
||||
<TileType mxEvent={this.props.mxEvent} />
|
||||
|
|
43
skins/base/views/molecules/RoomCreate.js
Normal file
43
skins/base/views/molecules/RoomCreate.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
Copyright 2015 OpenMarket 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var classNames = require('classnames');
|
||||
|
||||
//var RoomCreateController = require("../../../../src/controllers/molecules/RoomCreateController");
|
||||
|
||||
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'RoomCreate',
|
||||
// mixins: [RoomCreateController],
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_RoomCreate">
|
||||
<div className="mx_RoomCreate_table">
|
||||
<div className="mx_RoomTile">
|
||||
<div className="mx_RoomTile_avatar">
|
||||
<img src="img/create.png" width="32" height="32" alt="(+)"/>
|
||||
</div>
|
||||
<div className="mx_RoomTile_name">Create new room</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
36
skins/base/views/molecules/RoomDropTarget.js
Normal file
36
skins/base/views/molecules/RoomDropTarget.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
Copyright 2015 OpenMarket 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var classNames = require('classnames');
|
||||
|
||||
//var RoomDropTargetController = require("../../../../src/controllers/molecules/RoomDropTargetController");
|
||||
|
||||
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'RoomDropTarget',
|
||||
// mixins: [RoomDropTargetController],
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_RoomDropTarget">
|
||||
{this.props.text}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
|
@ -27,7 +27,28 @@ module.exports = React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
<div className="mx_RoomHeader">
|
||||
{this.props.room.name}
|
||||
<div className="mx_RoomHeader_wrapper">
|
||||
<div className="mx_RoomHeader_leftRow">
|
||||
<div className="mx_RoomHeader_avatar">
|
||||
<img src="img/placeholder.png" width="32" height="32" alt="(+)"/>
|
||||
</div>
|
||||
<div className="mx_RoomHeader_name">{this.props.room.name}</div>
|
||||
<div className="mx_RoomHeader_button">
|
||||
<img src="img/info.png" width="32" height="32"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx_RoomHeader_rightRow">
|
||||
<div className="mx_RoomHeader_button">
|
||||
<img src="img/search.png" width="32" height="32"/>
|
||||
</div>
|
||||
<div className="mx_RoomHeader_button">
|
||||
<img src="img/video.png" width="32" height="32"/>
|
||||
</div>
|
||||
<div className="mx_RoomHeader_button">
|
||||
<img src="img/voip.png" width="32" height="32"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
|
|
@ -30,13 +30,14 @@ module.exports = React.createClass({
|
|||
var myUserId = MatrixClientPeg.get().credentials.userId;
|
||||
var classes = classNames({
|
||||
'mx_RoomTile': true,
|
||||
'selected': this.props.selected,
|
||||
'unread': this.props.unread,
|
||||
'highlight': this.props.highlight,
|
||||
'invited': this.props.room.currentState.members[myUserId].membership == 'invite'
|
||||
'mx_RoomTile_selected': this.props.selected,
|
||||
'mx_RoomTile_unread': this.props.unread,
|
||||
'mx_RoomTile_highlight': this.props.highlight,
|
||||
'mx_RoomTile_invited': this.props.room.currentState.members[myUserId].membership == 'invite'
|
||||
});
|
||||
return (
|
||||
<div className={classes} onClick={this.onClick}>
|
||||
<div className="mx_RoomTile_avatar"><img src="img/placeholder.png" width="32" height="32" alt="()"/></div>
|
||||
<div className="mx_RoomTile_name">{this.props.room.name}</div>
|
||||
</div>
|
||||
);
|
||||
|
|
40
skins/base/views/organisms/LeftPanel.js
Normal file
40
skins/base/views/organisms/LeftPanel.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
Copyright 2015 OpenMarket 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var ComponentBroker = require('../../../../src/ComponentBroker');
|
||||
|
||||
var RoomList = ComponentBroker.get('organisms/RoomList');
|
||||
var DirectoryMenu = ComponentBroker.get('molecules/DirectoryMenu');
|
||||
var RoomCreate = ComponentBroker.get('molecules/RoomCreate');
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'LeftPanel',
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_LeftPanel">
|
||||
<img className="mx_LeftPanel_hideButton" src="img/hide.png" width="32" height="32" alt="<"/>
|
||||
<RoomList selectedRoom={this.props.currentRoom} />
|
||||
<RoomCreate/>
|
||||
<DirectoryMenu />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -34,11 +34,7 @@ module.exports = React.createClass({
|
|||
return Object.keys(that.state.memberDict).map(function(userId) {
|
||||
var m = that.state.memberDict[userId];
|
||||
return (
|
||||
<li key={userId}>
|
||||
<MemberTile
|
||||
member={m}
|
||||
/>
|
||||
</li>
|
||||
<MemberTile key={userId} member={m} />
|
||||
);
|
||||
});
|
||||
},
|
||||
|
@ -46,9 +42,17 @@ module.exports = React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
<div className="mx_MemberList">
|
||||
<ul>
|
||||
<div className="mx_MemberList_chevron">
|
||||
<img src="img/chevron.png" width="24" height="13"/>
|
||||
</div>
|
||||
<div className="mx_MemberList_wrapper">
|
||||
<h2>Members</h2>
|
||||
{this.makeMemberTiles()}
|
||||
</ul>
|
||||
<div className="mx_MemberTile">
|
||||
<div className="mx_MemberTile_avatar"><img src="img/create.png" width="32" height="32" alt="()"/></div>
|
||||
<div className="mx_MemberTile_name">Invite</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
39
skins/base/views/organisms/RightPanel.js
Normal file
39
skins/base/views/organisms/RightPanel.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
Copyright 2015 OpenMarket 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var ComponentBroker = require('../../../../src/ComponentBroker');
|
||||
|
||||
var MemberList = ComponentBroker.get('organisms/MemberList');
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'RightPanel',
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_RightPanel">
|
||||
<div className="mx_RightPanel_header">
|
||||
<img className="mx_RightPanel_headerButton" src="img/file.png" width="32" height="32" alt="Files"/>
|
||||
<img className="mx_RightPanel_headerButton" src="img/members.png" width="32" height="32" alt="Members"/>
|
||||
</div>
|
||||
<MemberList roomId={this.props.roomId} key={this.props.roomId} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -17,10 +17,12 @@ limitations under the License.
|
|||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var ComponentBroker = require('../../../../src/ComponentBroker');
|
||||
|
||||
var RoomDropTarget = ComponentBroker.get('molecules/RoomDropTarget');
|
||||
|
||||
var RoomListController = require("../../../../src/controllers/organisms/RoomList");
|
||||
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'RoomList',
|
||||
mixins: [RoomListController],
|
||||
|
@ -28,7 +30,16 @@ module.exports = React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
<div className="mx_RoomList">
|
||||
{this.makeRoomTiles()}
|
||||
<h2>Favourites</h2>
|
||||
<RoomDropTarget text="Drop here to favourite"/>
|
||||
|
||||
<h2>Recents</h2>
|
||||
<div className="mx_RoomList_recents">
|
||||
{this.makeRoomTiles()}
|
||||
</div>
|
||||
|
||||
<h2>Archive</h2>
|
||||
<RoomDropTarget text="Drop here to archive"/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ var classNames = require("classnames");
|
|||
|
||||
var MessageTile = ComponentBroker.get('molecules/MessageTile');
|
||||
var RoomHeader = ComponentBroker.get('molecules/RoomHeader');
|
||||
var MemberList = ComponentBroker.get('organisms/MemberList');
|
||||
var MessageComposer = ComponentBroker.get('molecules/MessageComposer');
|
||||
|
||||
var RoomViewController = require("../../../../src/controllers/organisms/RoomView");
|
||||
|
@ -68,19 +67,16 @@ module.exports = React.createClass({
|
|||
return (
|
||||
<div className="mx_RoomView">
|
||||
<RoomHeader room={this.state.room} />
|
||||
<div className="mx_RoomView_roomWrapper">
|
||||
<div className="mx_RoomView_messagePanel">
|
||||
<div ref="messageWrapper" className="mx_RoomView_messageListWrapper" onScroll={this.onMessageListScroll}>
|
||||
<div className="mx_RoomView_MessageList" aria-live="polite">
|
||||
<div className={scrollheader_classes}>
|
||||
</div>
|
||||
{this.getEventTiles()}
|
||||
<div ref="messageWrapper" className="mx_RoomView_messagePanel" onScroll={this.onMessageListScroll}>
|
||||
<div className="mx_RoomView_messageListWrapper">
|
||||
<div className="mx_RoomView_MessageList" aria-live="polite">
|
||||
<div className={scrollheader_classes}>
|
||||
</div>
|
||||
{this.getEventTiles()}
|
||||
</div>
|
||||
<MessageComposer roomId={this.props.roomId} />
|
||||
</div>
|
||||
<MemberList roomId={this.props.roomId} key={this.props.roomId} />
|
||||
</div>
|
||||
<MessageComposer roomId={this.props.roomId} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,9 +19,9 @@ limitations under the License.
|
|||
var React = require('react');
|
||||
var ComponentBroker = require('../../../../src/ComponentBroker');
|
||||
|
||||
var RoomList = ComponentBroker.get('organisms/RoomList');
|
||||
var LeftPanel = ComponentBroker.get('organisms/LeftPanel');
|
||||
var RoomView = ComponentBroker.get('organisms/RoomView');
|
||||
var MatrixToolbar = ComponentBroker.get('molecules/MatrixToolbar');
|
||||
var RightPanel = ComponentBroker.get('organisms/RightPanel');
|
||||
var Login = ComponentBroker.get('templates/Login');
|
||||
|
||||
var MatrixChatController = require("../../../../src/controllers/pages/MatrixChat");
|
||||
|
@ -38,13 +38,9 @@ module.exports = React.createClass({
|
|||
if (this.state.logged_in && this.state.ready) {
|
||||
return (
|
||||
<div className="mx_MatrixChat">
|
||||
<div className="mx_MatrixChat_chatWrapper">
|
||||
<div className="mx_MatrixChat_leftPanel">
|
||||
<RoomList selectedRoom={this.state.currentRoom} />
|
||||
<MatrixToolbar />
|
||||
</div>
|
||||
<RoomView roomId={this.state.currentRoom} key={this.state.currentRoom} />
|
||||
</div>
|
||||
<LeftPanel selectedRoom={this.state.currentRoom} />
|
||||
<RoomView roomId={this.state.currentRoom} key={this.state.currentRoom} />
|
||||
<RightPanel roomId={this.state.currentRoom} />
|
||||
</div>
|
||||
);
|
||||
} else if (this.state.logged_in) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue