forked from matrix/element-web
Merge branch 'develop' of github.com:vector-im/vector-web into feature-rte
This commit is contained in:
commit
b2459b2dc6
|
@ -7,3 +7,4 @@
|
|||
/packages/
|
||||
/vector/bundle.*
|
||||
/vector/components.css
|
||||
/vector/config.json
|
||||
|
|
31
CHANGELOG.md
31
CHANGELOG.md
|
@ -1,3 +1,34 @@
|
|||
Changes in [0.7.3](https://github.com/vector-im/vector-web/releases/tag/v0.7.3) (2016-06-03)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.7.2...v0.7.3)
|
||||
|
||||
* Update to react-sdk 0.6.3
|
||||
|
||||
Changes in [0.7.2](https://github.com/vector-im/vector-web/releases/tag/v0.7.2) (2016-06-02)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.7.1...v0.7.2)
|
||||
|
||||
* Correctly bump the dep on new matrix-js-sdk and matrix-react-sdk
|
||||
|
||||
Changes in [0.7.1](https://github.com/vector-im/vector-web/releases/tag/v0.7.1) (2016-06-02)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.7.0...v0.7.1)
|
||||
|
||||
* Fix accidentally committed local changes to the default config.json (doh!)
|
||||
|
||||
Changes in [0.7.0](https://github.com/vector-im/vector-web/releases/tag/v0.7.0) (2016-06-02)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.6.1...v0.7.0)
|
||||
|
||||
* Update to matrix-react-sdk 0.6.0 - see
|
||||
[changelog](https://github.com/matrix-org/matrix-react-sdk/blob/v0.6.0/CHANGELOG.md)
|
||||
* Style selection color.
|
||||
[\#1557](https://github.com/vector-im/vector-web/pull/1557)
|
||||
* Fix NPE when loading the Settings page which infini-spinnered
|
||||
[\#1518](https://github.com/vector-im/vector-web/pull/1518)
|
||||
* Add option to enable email notifications
|
||||
[\#1469](https://github.com/vector-im/vector-web/pull/1469)
|
||||
|
||||
Changes in [0.6.1](https://github.com/vector-im/vector-web/releases/tag/v0.6.1) (2016-04-22)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.6.0...v0.6.1)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vector-web",
|
||||
"version": "0.6.1",
|
||||
"version": "0.7.3",
|
||||
"description": "Vector webapp",
|
||||
"author": "matrix.org",
|
||||
"repository": {
|
||||
|
@ -33,6 +33,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"babel-polyfill": "^6.5.0",
|
||||
"browser-request": "^0.3.3",
|
||||
"classnames": "^2.1.2",
|
||||
"draft-js": "^0.7.0",
|
||||
"extract-text-webpack-plugin": "^0.9.1",
|
||||
|
@ -42,7 +43,7 @@
|
|||
"gfm.css": "^1.1.1",
|
||||
"highlight.js": "^9.0.0",
|
||||
"linkifyjs": "^2.0.0-beta.4",
|
||||
"matrix-js-sdk": "^0.5.2",
|
||||
"matrix-js-sdk": "matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-react-sdk": "matrix-org/matrix-react-sdk#develop",
|
||||
"modernizr": "^3.1.0",
|
||||
"q": "^1.4.1",
|
||||
|
|
|
@ -72,6 +72,8 @@ module.exports = React.createClass({
|
|||
propTypes: {
|
||||
// The array of threepids from the JS SDK (required for email notifications)
|
||||
threepids: React.PropTypes.array.isRequired,
|
||||
// The brand string set when creating an email pusher
|
||||
brand: React.PropTypes.string,
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
|
@ -116,7 +118,9 @@ module.exports = React.createClass({
|
|||
onEnableEmailNotificationsChange: function(address, event) {
|
||||
var emailPusherPromise;
|
||||
if (event.target.checked) {
|
||||
emailPusherPromise = UserSettingsStore.addEmailPusher(address);
|
||||
var data = {}
|
||||
data['brand'] = this.props.brand || 'Vector';
|
||||
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
|
||||
} else {
|
||||
var emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address);
|
||||
emailPusher.kind = null;
|
||||
|
|
|
@ -228,3 +228,13 @@ input[type=text]:focus, textarea:focus {
|
|||
height: 1em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background-color: #76CFA6;
|
||||
color: white;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: #76CFA6;
|
||||
color: white;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,14 @@ limitations under the License.
|
|||
margin-top: 8px ! important;
|
||||
}
|
||||
|
||||
.mx_EventTile_verified {
|
||||
background-color: #eaf5f0;
|
||||
}
|
||||
|
||||
.mx_EventTile_unverified {
|
||||
background-color: #ffa0a0;
|
||||
}
|
||||
|
||||
.mx_EventTile .mx_SenderProfile {
|
||||
color: #454545;
|
||||
opacity: 0.5;
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
Copyright 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_MemberDeviceInfo {
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.mx_MemberDeviceInfo div {
|
||||
display: inline;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.mx_MemberDeviceInfo_textButton {
|
||||
color: #fff;
|
||||
background-color: #76cfa6;
|
||||
height: 20px;
|
||||
border-radius: 20px;
|
||||
text-align: center;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
|
@ -41,8 +41,9 @@ var ReactDOM = require("react-dom");
|
|||
var sdk = require("matrix-react-sdk");
|
||||
sdk.loadSkin(require('../component-index'));
|
||||
var VectorConferenceHandler = require('../VectorConferenceHandler');
|
||||
var configJson = require("../../config.json");
|
||||
var UpdateChecker = require("./updater");
|
||||
var q = require('q');
|
||||
var request = require('browser-request');
|
||||
|
||||
var qs = require("querystring");
|
||||
|
||||
|
@ -112,6 +113,8 @@ function parseQs(location) {
|
|||
// Here, we do some crude URL analysis to allow
|
||||
// deep-linking.
|
||||
function routeUrl(location) {
|
||||
if (!window.matrixChat) return;
|
||||
|
||||
console.log("Routing URL "+window.location);
|
||||
var params = parseQs(location);
|
||||
var loginToken = params.loginToken;
|
||||
|
@ -182,7 +185,25 @@ window.onload = function() {
|
|||
}
|
||||
}
|
||||
|
||||
function loadApp() {
|
||||
function getConfig() {
|
||||
let deferred = q.defer();
|
||||
|
||||
request(
|
||||
{ method: "GET", url: "config.json", json: true },
|
||||
(err, response, body) => {
|
||||
if (err || response.status < 200 || response.status >= 300) {
|
||||
deferred.reject({err: err, response: response});
|
||||
return;
|
||||
}
|
||||
|
||||
deferred.resolve(body);
|
||||
}
|
||||
);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
async function loadApp() {
|
||||
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
||||
if (confirm("Vector runs much better as an app on iOS. Get the app?")) {
|
||||
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
|
||||
|
@ -190,14 +211,32 @@ function loadApp() {
|
|||
}
|
||||
}
|
||||
else if (/Android/.test(navigator.userAgent)) {
|
||||
if (confirm("Vector runs much better as an app on Vector. Get the app?")) {
|
||||
if (confirm("Vector runs much better as an app on Android. Get the app?")) {
|
||||
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let configJson;
|
||||
let configError;
|
||||
try {
|
||||
configJson = await getConfig();
|
||||
} catch (e) {
|
||||
// On 404 errors, carry on without a config,
|
||||
// but on other errors, fail, otherwise it will
|
||||
// lead to subtle errors where the app runs with
|
||||
// the default config if it fails to fetch config.json.
|
||||
if (e.response.status != 404) {
|
||||
configError = e;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Vector starting at "+window.location);
|
||||
if (validBrowser) {
|
||||
if (configError) {
|
||||
window.matrixChat = ReactDOM.render(<div className="error">
|
||||
Unable to load config file: please refresh the page to try again.
|
||||
</div>, document.getElementById('matrixchat'));
|
||||
} else if (validBrowser) {
|
||||
var MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||
var fragParts = parseQsFromFragment(window.location);
|
||||
window.matrixChat = ReactDOM.render(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"default_hs_url": "https://matrix.org",
|
||||
"default_is_url": "https://vector.im",
|
||||
"brand": "Vector",
|
||||
"integrations_ui_url": "http://localhost:8081/",
|
||||
"integrations_rest_url": "http://localhost:5050"
|
||||
}
|
Loading…
Reference in New Issue