Merge pull request #44 from matrix-org/kegan/vector-references

Remove all references to 'Vector'
This commit is contained in:
Kegsay 2015-12-02 09:39:34 +00:00
commit aceb85130e
11 changed files with 128 additions and 54 deletions

View file

@ -45,22 +45,4 @@ for (var i = 0; i < files.length; ++i) {
strm.uncork();
}
// Temporary Vector transition
var vectorViewsPath = path.join('src', 'skins', 'vector', 'views');
if (fs.existsSync(vectorViewsPath)) {
strm.write('\n');
strm.write('// Old, unported Vector views:\n');
var files = glob.sync('**/*.js', {cwd: vectorViewsPath});
for (var i = 0; i < files.length; ++i) {
var file = files[i].replace('.js', '');
var moduleName = (file.replace(/\//g, '.'));
strm.write("module.exports.components['"+moduleName+"'] = require('./skins/vector/views/"+file+"');");
strm.write('\n');
strm.uncork();
}
}
strm.end();

View file

@ -42,6 +42,9 @@ module.exports.components['views.elements.ProgressBar'] = require('./components/
module.exports.components['views.elements.UserSelector'] = require('./components/views/elements/UserSelector');
module.exports.components['views.login.CaptchaForm'] = require('./components/views/login/CaptchaForm');
module.exports.components['views.login.CasLogin'] = require('./components/views/login/CasLogin');
module.exports.components['views.login.CustomServerDialog'] = require('./components/views/login/CustomServerDialog');
module.exports.components['views.login.LoginFooter'] = require('./components/views/login/LoginFooter');
module.exports.components['views.login.LoginHeader'] = require('./components/views/login/LoginHeader');
module.exports.components['views.login.PasswordLogin'] = require('./components/views/login/PasswordLogin');
module.exports.components['views.login.RegistrationForm'] = require('./components/views/login/RegistrationForm');
module.exports.components['views.login.ServerConfig'] = require('./components/views/login/ServerConfig');

View file

@ -44,7 +44,7 @@ var INITIAL_SIZE = 20;
module.exports = React.createClass({
displayName: 'RoomView',
propTypes: {
ConferenceHandler: React.PropTypes.any // VectorConferenceHandler
ConferenceHandler: React.PropTypes.any
},
getInitialState: function() {

View file

@ -151,7 +151,7 @@ module.exports = React.createClass({displayName: 'Login',
return (
<div>
Sorry, this homeserver is using a login which is not
recognised by Vector ({step})
recognised ({step})
</div>
);
}
@ -159,14 +159,14 @@ module.exports = React.createClass({displayName: 'Login',
render: function() {
var Loader = sdk.getComponent("elements.Spinner");
var LoginHeader = sdk.getComponent("login.LoginHeader");
var LoginFooter = sdk.getComponent("login.LoginFooter");
var loader = this.state.busy ? <div className="mx_Login_loader"><Loader /></div> : null;
return (
<div className="mx_Login">
<div className="mx_Login_box">
<div className="mx_Login_logo">
<img src="img/logo.png" width="249" height="78" alt="vector"/>
</div>
<LoginHeader />
<div>
<h2>Sign in</h2>
{ this.componentForStep(this._getCurrentFlowStep()) }
@ -185,12 +185,7 @@ module.exports = React.createClass({displayName: 'Login',
Create a new account
</a>
<br/>
<div className="mx_Login_links">
<a href="https://medium.com/@Vector">blog</a>&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="https://twitter.com/@VectorCo">twitter</a>&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="https://github.com/vector-im/vector-web">github</a>&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="https://matrix.org">powered by Matrix</a>
</div>
<LoginFooter />
</div>
</div>
</div>

View file

@ -58,12 +58,11 @@ module.exports = React.createClass({
render: function() {
var ChangeDisplayName = sdk.getComponent('settings.ChangeDisplayName');
var ChangeAvatar = sdk.getComponent('settings.ChangeAvatar');
var LoginHeader = sdk.getComponent('login.LoginHeader');
return (
<div className="mx_Login">
<div className="mx_Login_box">
<div className="mx_Login_logo">
<img src="img/logo.png" width="249" height="78" alt="vector"/>
</div>
<LoginHeader />
<div className="mx_Login_profile">
Set a display name:
<ChangeDisplayName />

View file

@ -234,12 +234,11 @@ module.exports = React.createClass({
},
render: function() {
var LoginHeader = sdk.getComponent('login.LoginHeader');
return (
<div className="mx_Login">
<div className="mx_Login_box">
<div className="mx_Login_logo">
<img src="img/logo.png" width="249" height="78" alt="vector"/>
</div>
<LoginHeader />
{this._getRegisterContentJsx()}
</div>
</div>

View 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.
*/
var React = require("react");
module.exports = React.createClass({
displayName: 'CustomServerDialog',
render: function() {
return (
<div className="mx_ErrorDialog">
<div className="mx_ErrorDialogTitle">
Custom Server Options
</div>
<div className="mx_Dialog_content">
<span>
You can use the custom server options to log into other Matrix
servers by specifying a different Home server URL.
<br/>
This allows you to use this app with an existing Matrix account on
a different Home server.
<br/>
<br/>
You can also set a custom Identity server but this will affect
people&#39;s ability to find you if you use a server in a group other
than the main Matrix.org group.
</span>
</div>
<div className="mx_Dialog_buttons">
<button onClick={this.props.onFinished} autoFocus={true}>
Dismiss
</button>
</div>
</div>
);
}
});

View file

@ -0,0 +1,31 @@
/*
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');
module.exports = React.createClass({
displayName: 'LoginFooter',
render: function() {
return (
<div className="mx_Login_links">
<a href="https://matrix.org">powered by Matrix</a>
</div>
);
}
});

View file

@ -0,0 +1,31 @@
/*
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');
module.exports = React.createClass({
displayName: 'LoginHeader',
render: function() {
return (
<div className="mx_Login_logo">
Matrix
</div>
);
}
});

View file

@ -93,24 +93,8 @@ module.exports = React.createClass({
},
showHelpPopup: function() {
var ErrorDialog = sdk.getComponent('dialogs.ErrorDialog');
Modal.createDialog(ErrorDialog, {
title: 'Custom Server Options',
description: <span>
You can use the custom server options to log into other Matrix
servers by specifying a different Home server URL.
<br/>
This allows you to use Vector with an existing Matrix account on
a different Home server.
<br/>
<br/>
You can also set a custom Identity server but this will affect
people&#39;s ability to find you if you use a server in a group other
than the main Matrix.org group.
</span>,
button: "Dismiss",
focus: true
});
var CustomServerDialog = sdk.getComponent('login.CustomServerDialog');
Modal.createDialog(CustomServerDialog);
},
render: function() {

View file

@ -29,7 +29,7 @@ module.exports = React.createClass({
displayName: 'RoomList',
propTypes: {
ConferenceHandler: React.PropTypes.any, // e.g. VectorConferenceHandler
ConferenceHandler: React.PropTypes.any,
collapsed: React.PropTypes.bool,
currentRoom: React.PropTypes.string
},