Merge branch 'develop' into rav/update_status_bar
This commit is contained in:
commit
3263076ea6
16 changed files with 75 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ lib
|
||||||
key.pem
|
key.pem
|
||||||
cert.pem
|
cert.pem
|
||||||
vector/components.css
|
vector/components.css
|
||||||
|
packages/
|
||||||
|
|
|
@ -15,7 +15,8 @@ Getting started
|
||||||
7. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector.
|
7. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector.
|
||||||
|
|
||||||
With `npm start`, any changes you make to the source files will cause a rebuild so
|
With `npm start`, any changes you make to the source files will cause a rebuild so
|
||||||
your changes will show up when you refresh.
|
your changes will show up when you refresh. This development server also disables
|
||||||
|
caching, so do NOT use it in production.
|
||||||
|
|
||||||
For production use, run `npm run build` to build all the necessary files
|
For production use, run `npm run build` to build all the necessary files
|
||||||
into the `vector` directory and run your own server.
|
into the `vector` directory and run your own server.
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
"build:compile": "babel --source-maps -d lib src",
|
"build:compile": "babel --source-maps -d lib src",
|
||||||
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
|
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
|
||||||
"build": "npm run build:css && npm run build:compile && npm run build:bundle",
|
"build": "npm run build:css && npm run build:compile && npm run build:bundle",
|
||||||
|
"package": "npm run build && mkdir -p packages && tar chvzf packages/vector-`git describe --dirty || echo unknown`.tar.gz vector",
|
||||||
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
|
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
|
||||||
"start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js",
|
"start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js",
|
||||||
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",
|
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
"prepublish": "npm run build:css && npm run build:compile"
|
"prepublish": "npm run build:css && npm run build:compile"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"babel-polyfill": "^6.5.0",
|
||||||
"classnames": "^2.1.2",
|
"classnames": "^2.1.2",
|
||||||
"extract-text-webpack-plugin": "^0.9.1",
|
"extract-text-webpack-plugin": "^0.9.1",
|
||||||
"filesize": "^3.1.2",
|
"filesize": "^3.1.2",
|
||||||
|
@ -56,6 +58,6 @@
|
||||||
"parallelshell": "^1.2.0",
|
"parallelshell": "^1.2.0",
|
||||||
"rimraf": "^2.4.3",
|
"rimraf": "^2.4.3",
|
||||||
"source-map-loader": "^0.1.5",
|
"source-map-loader": "^0.1.5",
|
||||||
"webpack": "^1.12.6"
|
"webpack": "^1.12.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ var React = require('react');
|
||||||
var sdk = require('matrix-react-sdk')
|
var sdk = require('matrix-react-sdk')
|
||||||
var dis = require('matrix-react-sdk/lib/dispatcher');
|
var dis = require('matrix-react-sdk/lib/dispatcher');
|
||||||
var MatrixClientPeg = require("matrix-react-sdk/lib/MatrixClientPeg");
|
var MatrixClientPeg = require("matrix-react-sdk/lib/MatrixClientPeg");
|
||||||
|
var rate_limited_func = require('matrix-react-sdk/lib/ratelimitedfunc');
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'RightPanel',
|
displayName: 'RightPanel',
|
||||||
|
@ -66,15 +67,19 @@ module.exports = React.createClass({
|
||||||
onRoomStateMember: function(ev, state, member) {
|
onRoomStateMember: function(ev, state, member) {
|
||||||
// redraw the badge on the membership list
|
// redraw the badge on the membership list
|
||||||
if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) {
|
if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) {
|
||||||
this.forceUpdate();
|
this._delayedUpdate();
|
||||||
}
|
}
|
||||||
else if (this.state.phase === this.Phase.MemberInfo && member.roomId === this.props.roomId &&
|
else if (this.state.phase === this.Phase.MemberInfo && member.roomId === this.props.roomId &&
|
||||||
member.userId === this.state.member.userId) {
|
member.userId === this.state.member.userId) {
|
||||||
// refresh the member info (e.g. new power level)
|
// refresh the member info (e.g. new power level)
|
||||||
this.forceUpdate();
|
this._delayedUpdate();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_delayedUpdate: new rate_limited_func(function() {
|
||||||
|
this.forceUpdate();
|
||||||
|
}, 500),
|
||||||
|
|
||||||
onAction: function(payload) {
|
onAction: function(payload) {
|
||||||
if (payload.action === "view_user") {
|
if (payload.action === "view_user") {
|
||||||
if (payload.member) {
|
if (payload.member) {
|
||||||
|
|
|
@ -69,7 +69,7 @@ module.exports = React.createClass({
|
||||||
var rooms = this.state.publicRooms.filter(function(a) {
|
var rooms = this.state.publicRooms.filter(function(a) {
|
||||||
// FIXME: if incrementally typing, keep narrowing down the search set
|
// FIXME: if incrementally typing, keep narrowing down the search set
|
||||||
// incrementally rather than starting over each time.
|
// incrementally rather than starting over each time.
|
||||||
return (a.aliases[0].search(filter) >= 0 && a.num_joined_members > 0);
|
return (a.aliases[0].toLowerCase().search(filter.toLowerCase()) >= 0 && a.num_joined_members > 0);
|
||||||
}).sort(function(a,b) {
|
}).sort(function(a,b) {
|
||||||
return a.num_joined_members - b.num_joined_members;
|
return a.num_joined_members - b.num_joined_members;
|
||||||
});
|
});
|
||||||
|
|
|
@ -202,7 +202,9 @@ input[type=text]:focus, textarea:focus {
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_TextInputDialog_input {
|
.mx_TextInputDialog_input {
|
||||||
color: #747474;
|
|
||||||
font-weight: 300;
|
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
padding: 9px;
|
||||||
|
color: #454545;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,13 @@ limitations under the License.
|
||||||
-webkit-flex: 1;
|
-webkit-flex: 1;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
/* Experimental fix for https://github.com/vector-im/vector-web/issues/947
|
||||||
|
and https://github.com/vector-im/vector-web/issues/946.
|
||||||
|
Empirically this stops the MessagePanel's width exploding outwards when
|
||||||
|
gemini is in 'prevented' mode
|
||||||
|
*/
|
||||||
|
overflow-x: auto;
|
||||||
|
|
||||||
/* XXX: Hack: apparently if you try to nest a flex-box
|
/* XXX: Hack: apparently if you try to nest a flex-box
|
||||||
* within a non-flex-box within a flex-box, the height
|
* within a non-flex-box within a flex-box, the height
|
||||||
* of the innermost element gets miscalculated if the
|
* of the innermost element gets miscalculated if the
|
||||||
|
|
|
@ -170,6 +170,10 @@ limitations under the License.
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_UserSettings_avatarPicker_img .mx_BaseAvatar_image {
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_UserSettings_avatarPicker_edit {
|
.mx_UserSettings_avatarPicker_edit {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2015, 2016 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_SetDisplayNameDialog_input {
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
padding: 9px;
|
||||||
|
color: #454545;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
|
@ -90,19 +90,21 @@ limitations under the License.
|
||||||
/* end of overrides */
|
/* end of overrides */
|
||||||
|
|
||||||
/* this is used for the tile for the event which is selected via the URL.
|
/* this is used for the tile for the event which is selected via the URL.
|
||||||
* for now, it is just a crude color; ultimately we probably want some
|
* TODO: ultimately we probably want some transition on here.
|
||||||
* transition on here.
|
|
||||||
*/
|
*/
|
||||||
.mx_EventTile_selected {
|
.mx_EventTile_selected {
|
||||||
background-color: #76cfa6;
|
border-left: #76cfa6 5px solid;
|
||||||
color: #fff;
|
margin-left: 53px;
|
||||||
|
padding-left: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_searchHighlight {
|
.mx_EventTile_searchHighlight {
|
||||||
background-color: #76cfa6;
|
background-color: #76cfa6;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 4px;
|
padding-left: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_searchHighlight a {
|
.mx_EventTile_searchHighlight a {
|
||||||
|
|
|
@ -51,14 +51,14 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MemberList .mx_SearchableEntityList_expanded {
|
.mx_MemberList .mx_SearchableEntityList_expanded {
|
||||||
flex: 1 1 100%;
|
flex: 1 0 0;
|
||||||
-webkit-flex: 1 1 100%;
|
-webkit-flex: 1 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MemberList_joined {
|
.mx_MemberList_joined {
|
||||||
order: 2;
|
order: 2;
|
||||||
flex: 1 1 50%;
|
flex: 1 0 0;
|
||||||
-webkit-flex: 1 1 50%;
|
-webkit-flex: 1 0 0;
|
||||||
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,14 +184,9 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomHeader_leaveButton {
|
.mx_RoomHeader_leaveButton {
|
||||||
visibility: hidden;
|
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomHeader_wrapper:hover .mx_RoomHeader_leaveButton {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomHeader_placeholder {
|
.mx_RoomHeader_placeholder {
|
||||||
color: #a2a2a2 ! important;
|
color: #a2a2a2 ! important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,8 @@ limitations under the License.
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSettings .mx_RoomSettings_toggles input[type="checkbox"] {
|
.mx_RoomSettings .mx_RoomSettings_toggles input[type="checkbox"],
|
||||||
|
.mx_RoomSettings .mx_RoomSettings_toggles input[type="radio"] {
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,13 @@ limitations under the License.
|
||||||
.mx_SearchableEntityList_query::-moz-placeholder {
|
.mx_SearchableEntityList_query::-moz-placeholder {
|
||||||
color: #454545;
|
color: #454545;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_SearchableEntityList_query::-webkit-input-placeholder {
|
.mx_SearchableEntityList_query::-webkit-input-placeholder {
|
||||||
color: #454545;
|
color: #454545;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_SearchableEntityList_listWrapper {
|
.mx_SearchableEntityList_listWrapper {
|
||||||
|
|
|
@ -16,6 +16,10 @@ limitations under the License.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// for ES6 stuff like startsWith() that Safari doesn't handle
|
||||||
|
// and babel doesn't do by default
|
||||||
|
require('babel-polyfill');
|
||||||
|
|
||||||
// CSS requires: just putting them here for now as CSS is going to be
|
// CSS requires: just putting them here for now as CSS is going to be
|
||||||
// refactored soon anyway
|
// refactored soon anyway
|
||||||
require('../../vector/components.css');
|
require('../../vector/components.css');
|
||||||
|
@ -94,7 +98,8 @@ function routeUrl(location) {
|
||||||
else if (location.hash.indexOf('#/register') == 0) {
|
else if (location.hash.indexOf('#/register') == 0) {
|
||||||
window.matrixChat.showScreen('register', parseQsFromFragment(location));
|
window.matrixChat.showScreen('register', parseQsFromFragment(location));
|
||||||
} else {
|
} else {
|
||||||
window.matrixChat.showScreen(location.hash.substring(2));
|
var hashparts = location.hash.split('?');
|
||||||
|
window.matrixChat.showScreen(hashparts[0].substring(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
req.open("GET", "version");
|
var cacheBuster = "?ts=" + new Date().getTime();
|
||||||
|
req.open("GET", "version" + cacheBuster);
|
||||||
req.send(); // can't suppress 404s from being logged.
|
req.send(); // can't suppress 404s from being logged.
|
||||||
|
|
||||||
setTimeout(module.exports.run, POKE_RATE_MS);
|
setTimeout(module.exports.run, POKE_RATE_MS);
|
||||||
|
|
Loading…
Reference in a new issue