diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js
index 28b15a26..b60941c2 100644
--- a/src/controllers/organisms/RoomView.js
+++ b/src/controllers/organisms/RoomView.js
@@ -350,8 +350,12 @@ module.exports = {
self.setState({
upload: undefined
});
- }).done(undefined, function() {
- // TODO: display error message
+ }).done(undefined, function(error) {
+ var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
+ Modal.createDialog(ErrorDialog, {
+ title: "Failed to upload file",
+ description: error.toString()
+ });
});
},
@@ -377,6 +381,7 @@ module.exports = {
room_events: {
search_term: term,
filter: filter,
+ order_by: "recent",
event_context: {
before_limit: 1,
after_limit: 1,
@@ -390,7 +395,11 @@ module.exports = {
searchResults: data,
});
}, function(error) {
- // TODO: show dialog or something
+ var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
+ Modal.createDialog(ErrorDialog, {
+ title: "Search failed",
+ description: error.toString()
+ });
});
},
@@ -408,7 +417,7 @@ module.exports = {
var eventIds = Object.keys(results);
// XXX: todo: merge overlapping results somehow?
// XXX: why doesn't searching on name work?
- var resultList = eventIds.map(function(key) { return results[key]; }).sort(function(a, b) { b.rank - a.rank });
+ var resultList = eventIds.map(function(key) { return results[key]; }); // .sort(function(a, b) { b.rank - a.rank });
for (var i = 0; i < resultList.length; i++) {
var ts1 = resultList[i].result.origin_server_ts;
ret.push(
); // Rank: {resultList[i].rank}
diff --git a/src/skins/vector/css/atoms/MemberAvatar.css b/src/skins/vector/css/atoms/MemberAvatar.css
index fc5fd60d..97dae35f 100644
--- a/src/skins/vector/css/atoms/MemberAvatar.css
+++ b/src/skins/vector/css/atoms/MemberAvatar.css
@@ -19,3 +19,12 @@ limitations under the License.
border-radius: 20px;
}
+.mx_MemberAvatar_initial {
+ position: absolute;
+ color: #fff;
+ text-align: center;
+}
+
+.mx_MemberAvatar_wrapper {
+ position: relative;
+}
\ No newline at end of file
diff --git a/src/skins/vector/css/atoms/RoomAvatar.css b/src/skins/vector/css/atoms/RoomAvatar.css
new file mode 100644
index 00000000..f54a93ee
--- /dev/null
+++ b/src/skins/vector/css/atoms/RoomAvatar.css
@@ -0,0 +1,25 @@
+/*
+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.
+*/
+
+.mx_RoomAvatar {
+}
+
+.mx_RoomAvatar_initial {
+ position: absolute;
+ color: #fff;
+ text-align: center;
+ font-weight: normal ! important;
+}
\ No newline at end of file
diff --git a/src/skins/vector/css/molecules/MatrixToolbar.css b/src/skins/vector/css/molecules/MatrixToolbar.css
index 99c28240..b545b1ad 100644
--- a/src/skins/vector/css/molecules/MatrixToolbar.css
+++ b/src/skins/vector/css/molecules/MatrixToolbar.css
@@ -15,20 +15,40 @@ limitations under the License.
*/
.mx_MatrixToolbar {
- text-align: center;
- background-color: #ff0064;
+ background-color: #76cfa6;
color: #fff;
- font-weight: bold;
- padding: 6px;
+
+ display: -webkit-box;
+ display: -moz-box;
+ display: -ms-flexbox;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-align-items: center;
+ align-items: center;
}
-.mx_MatrixToolbar button {
- margin-left: 12px;
+.mx_MatrixToolbar_warning {
+ margin-left: 16px;
+ margin-right: 8px;
+ margin-top: -2px;
+}
+
+.mx_MatrixToolbar_link
+{
+ color: #fff ! important;
+ text-decoration: underline ! important;
+ cursor: pointer;
}
.mx_MatrixToolbar_close {
- float: right;
- margin-top: 3px;
- margin-right: 12px;
+ -webkit-flex: 1;
+ flex: 1;
cursor: pointer;
-}
\ No newline at end of file
+ text-align: right;
+}
+
+.mx_MatrixToolbar_close img {
+ display: block;
+ float: right;
+ margin-right: 10px;
+}
diff --git a/src/skins/vector/css/pages/MatrixChat.css b/src/skins/vector/css/pages/MatrixChat.css
index 0970abf4..e6d7d30b 100644
--- a/src/skins/vector/css/pages/MatrixChat.css
+++ b/src/skins/vector/css/pages/MatrixChat.css
@@ -35,7 +35,7 @@ limitations under the License.
-webkit-order: 1;
order: 1;
- height: 21px;
+ height: 40px;
}
.mx_MatrixChat_toolbarShowing {
diff --git a/src/skins/vector/img/cancel-black2.png b/src/skins/vector/img/cancel-black2.png
new file mode 100644
index 00000000..a928c61b
Binary files /dev/null and b/src/skins/vector/img/cancel-black2.png differ
diff --git a/src/skins/vector/img/warning.png b/src/skins/vector/img/warning.png
new file mode 100644
index 00000000..c5553530
Binary files /dev/null and b/src/skins/vector/img/warning.png differ
diff --git a/src/skins/vector/views/atoms/MemberAvatar.js b/src/skins/vector/views/atoms/MemberAvatar.js
index 69652e1a..c4153b85 100644
--- a/src/skins/vector/views/atoms/MemberAvatar.js
+++ b/src/skins/vector/views/atoms/MemberAvatar.js
@@ -40,6 +40,25 @@ module.exports = React.createClass({
},
render: function() {
+ // XXX: recalculates default avatar url constantly
+ if (this.state.imageUrl === this.defaultAvatarUrl(this.props.member)) {
+ var initial;
+ if (this.props.member.name[0])
+ initial = this.props.member.name[0].toUpperCase();
+ if (initial === '@' && this.props.member.name[1])
+ initial = this.props.member.name[1].toUpperCase();
+
+ return (
+
+ { initial }
+
+
+ );
+ }
return (
- );
+
+ // XXX: recalculates fallback avatar constantly
+ if (this.state.imageUrl === this.getFallbackAvatar()) {
+ var initial;
+ if (this.props.room.name[0])
+ initial = this.props.room.name[0].toUpperCase();
+ if ((initial === '@' || initial === '#') && this.props.room.name[1])
+ initial = this.props.room.name[1].toUpperCase();
+
+ return (
+
+ { initial }
+
+
+ );
+ }
+ else {
+ return
+ }
+
}
});
diff --git a/src/skins/vector/views/molecules/MatrixToolbar.js b/src/skins/vector/views/molecules/MatrixToolbar.js
index 4a299f14..361e39d6 100644
--- a/src/skins/vector/views/molecules/MatrixToolbar.js
+++ b/src/skins/vector/views/molecules/MatrixToolbar.js
@@ -28,12 +28,20 @@ module.exports = React.createClass({
Notifier.setToolbarHidden(true);
},
+ onClick: function() {
+ var Notifier = sdk.getComponent('organisms.Notifier');
+ Notifier.setEnabled(true);
+ },
+
render: function() {
var EnableNotificationsButton = sdk.getComponent("atoms.EnableNotificationsButton");
return (
- You are not receiving desktop notifications.
-
+
+
+
);
}