Skip to content

Commit 19d5063

Browse files
committed
Merge branch 'develop' into fix-emoji
2 parents bd9f5d3 + ee2329d commit 19d5063

57 files changed

Lines changed: 955 additions & 264 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ Vector is a Matrix web client built using the Matrix React SDK (https://github.c
66
Getting Started
77
===============
88

9-
Vector is a modular webapp built with modern ES6 and requires and npm build system to build.
10-
Instructions for building are below, but building from source shouldn't be necessary
11-
for simple deployments.
9+
The easiest way to test Vector is to just use the hosted copy at https://vector.im/beta.
10+
The develop branch is continuously deployed by Jenkins at https://vector.im/develop for
11+
those who like living dangerously.
12+
13+
To host your own copy of Vector, the quickest bet is to use a pre-built released version
14+
of Vector:
1215

1316
1. Download the latest version from https://vector.im/packages/
1417
1. Untar the tarball on your web server
@@ -20,7 +23,7 @@ for simple deployments.
2023
Building From Source
2124
====================
2225

23-
If you do wish to build vector from source:
26+
Vector is a modular webapp built with modern ES6 and requires a npm build system to build.
2427

2528
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
2629
1. Clone the repo: `git clone https://github.com/vector-im/vector-web.git`
@@ -50,8 +53,32 @@ You can configure the app by copying `vector/config.sample.json` to
5053
1. `default_hs_url` is the default home server url.
5154
1. `default_is_url` is the default identity server url (this is the server used
5255
for verifying third party identifiers like email addresses). If this is blank,
53-
registering with an email address or adding an email address to your account
54-
will not work.
56+
registering with an email address, adding an email address to your account,
57+
or inviting users via email address will not work. Matrix identity servers are
58+
very simple web services which map third party identifiers (currently only email
59+
addresses) to matrix IDs: see http://matrix.org/docs/spec/identity_service/unstable.html
60+
for more details. Currently the only public matrix identity servers are https://matrix.org
61+
and https://vector.im. In future identity servers will be decentralised.
62+
63+
64+
Running as a Desktop app
65+
========================
66+
67+
In future we'll do an official distribution of Vector as an desktop app. Meanwhile,
68+
there are a few options:
69+
70+
@asdf:matrix.org points out that you can use nativefier and it just works(tm):
71+
72+
```
73+
sudo npm install nativefier -g
74+
nativefier https://vector.im/beta/
75+
```
76+
77+
krisa has a dedicated electron project at https://github.com/krisak/vector-electron-desktop
78+
(although you should swap out the 'vector' folder for the latest vector tarball you want to run)
79+
80+
There's also a (much) older electron distribution at https://github.com/stevenhammerton/vector-desktop
81+
5582

5683
Development
5784
===========

‎package.json‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@
1818
"build:compile": "babel --source-maps -d lib src",
1919
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
2020
"build:bundle:dev": "NODE_ENV=production webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js",
21-
"build": "npm run build:css && npm run build:emojione && npm run build:compile && npm run build:bundle",
22-
"build:dev": "npm run build:css && npm run build:compile && npm run build:bundle:dev",
21+
"build:staticfiles": "scripts/staticfiles.js",
22+
"build": "npm run build:staticfiles && npm run build:emojione && npm run build:css && npm run build:compile && npm run build:bundle",
23+
"build:dev": "npm run build:staticfiles && npm run build:emojione && npm run build:css && npm run build:compile && npm run build:bundle:dev",
2324
"package": "scripts/package.sh",
2425
"start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/ -w",
2526
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
2627
"start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js",
2728
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",
2829
"//cache": "Note the -c 1 below due to https://code.google.com/p/chromium/issues/detail?id=508270",
29-
"start": "parallelshell \"npm run start:js\" \"npm run start:emojione\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
30-
"start:prod": "parallelshell \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
31-
"clean": "rimraf lib vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css* vector/emojione",
30+
"start": "parallelshell \"npm run build:staticfiles\" \"npm run start:emojione\" \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
31+
"start:prod": "parallelshell \"npm run build:staticfiles\" \"npm run start:emojione\" \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
32+
"clean": "rimraf lib vector/olm.js vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css* vector/emojione",
3233
"prepublish": "npm run build:css && npm run build:compile",
3334
"test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",
3435
"test:multi": "karma start"
@@ -41,7 +42,7 @@
4142
"extract-text-webpack-plugin": "^0.9.1",
4243
"filesize": "^3.1.2",
4344
"flux": "~2.0.3",
44-
"gemini-scrollbar": "matrix-org/gemini-scrollbar#468544d",
45+
"gemini-scrollbar": "matrix-org/gemini-scrollbar#b302279",
4546
"gfm.css": "^1.1.1",
4647
"highlight.js": "^9.0.0",
4748
"linkifyjs": "^2.0.0-beta.4",
@@ -53,7 +54,7 @@
5354
"react-dnd": "^2.1.4",
5455
"react-dnd-html5-backend": "^2.1.2",
5556
"react-dom": "^15.2.1",
56-
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#dbf0abf",
57+
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef",
5758
"sanitize-html": "^1.11.1"
5859
},
5960
"devDependencies": {
@@ -65,6 +66,7 @@
6566
"css-raw-loader": "^0.1.1",
6667
"emojione": "^2.2.3",
6768
"expect": "^1.16.0",
69+
"fs-extra": "^0.30.0",
6870
"http-server": "^0.8.4",
6971
"json-loader": "^0.5.3",
7072
"karma": "^0.13.22",

‎scripts/staticfiles.js‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env node
2+
3+
// copy static files from node_modules to the vector directory
4+
//
5+
6+
var fs = require('fs-extra');
7+
8+
function exists(f) {
9+
try {
10+
fs.statSync(f);
11+
return true;
12+
} catch(e) {
13+
return false;
14+
}
15+
}
16+
17+
const olm = 'node_modules/olm/olm.js';
18+
if (exists(olm)) {
19+
console.log("copy", olm, "-> vector");
20+
fs.copySync(olm, 'vector/olm.js');
21+
}

‎src/component-index.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ module.exports.components['structures.RoomDirectory'] = require('./components/st
3434
module.exports.components['structures.RoomSubList'] = require('./components/structures/RoomSubList');
3535
module.exports.components['structures.SearchBox'] = require('./components/structures/SearchBox');
3636
module.exports.components['structures.ViewSource'] = require('./components/structures/ViewSource');
37+
module.exports.components['views.context_menus.MessageContextMenu'] = require('./components/views/context_menus/MessageContextMenu');
38+
module.exports.components['views.context_menus.NotificationStateContextMenu'] = require('./components/views/context_menus/NotificationStateContextMenu');
3739
module.exports.components['views.elements.ImageView'] = require('./components/views/elements/ImageView');
3840
module.exports.components['views.elements.Spinner'] = require('./components/views/elements/Spinner');
3941
module.exports.components['views.globals.GuestWarningBar'] = require('./components/views/globals/GuestWarningBar');
@@ -45,9 +47,9 @@ module.exports.components['views.login.VectorLoginHeader'] = require('./componen
4547
module.exports.components['views.messages.DateSeparator'] = require('./components/views/messages/DateSeparator');
4648
module.exports.components['views.messages.MessageTimestamp'] = require('./components/views/messages/MessageTimestamp');
4749
module.exports.components['views.rooms.BottomLeftMenuTile'] = require('./components/views/rooms/BottomLeftMenuTile');
48-
module.exports.components['views.rooms.MessageContextMenu'] = require('./components/views/rooms/MessageContextMenu');
4950
module.exports.components['views.rooms.RoomDNDView'] = require('./components/views/rooms/RoomDNDView');
5051
module.exports.components['views.rooms.RoomDropTarget'] = require('./components/views/rooms/RoomDropTarget');
5152
module.exports.components['views.rooms.RoomTooltip'] = require('./components/views/rooms/RoomTooltip');
5253
module.exports.components['views.rooms.SearchBar'] = require('./components/views/rooms/SearchBar');
54+
module.exports.components['views.settings.IntegrationsManager'] = require('./components/views/settings/IntegrationsManager');
5355
module.exports.components['views.settings.Notifications'] = require('./components/views/settings/Notifications');

‎src/components/structures/BottomLeftMenu.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ module.exports = React.createClass({
5252
<div className="mx_BottomLeftMenu">
5353
<div className="mx_BottomLeftMenu_options">
5454
<div className="mx_BottomLeftMenu_createRoom" title="Start chat" onClick={ this.onCreateRoomClick }>
55-
<TintableSvg src="img/icons-create-room.svg" width="24" height="24"/>
55+
<TintableSvg src="img/icons-create-room.svg" width="25" height="25"/>
5656
</div>
5757
<div className="mx_BottomLeftMenu_directory" title="Room directory" onClick={ this.onRoomDirectoryClick }>
58-
<TintableSvg src="img/icons-directory.svg" width="24" height="24"/>
58+
<TintableSvg src="img/icons-directory.svg" width="25" height="25"/>
5959
</div>
6060
<div className="mx_BottomLeftMenu_settings" title="Settings" onClick={ this.onSettingsClick }>
61-
<TintableSvg src="img/icons-settings.svg" width="24" height="24"/>
61+
<TintableSvg src="img/icons-settings.svg" width="25" height="25"/>
6262
</div>
6363
</div>
6464
</div>

‎src/components/structures/RightPanel.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ module.exports = React.createClass({
136136
buttonGroup =
137137
<div className="mx_RightPanel_headerButtonGroup">
138138
<div className="mx_RightPanel_headerButton" title="Members" onClick={ this.onMemberListButtonClick }>
139-
<TintableSvg src="img/members.svg" width="17" height="22"/>
140139
{ membersBadge }
140+
<TintableSvg src="img/icons-people.svg" width="25" height="25"/>
141141
{ membersHighlight }
142142
</div>
143143
<div className="mx_RightPanel_headerButton mx_RightPanel_filebutton" title="Files">

‎src/components/structures/RoomDirectory.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var React = require('react');
2121
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
2222
var ContentRepo = require("matrix-js-sdk").ContentRepo;
2323
var Modal = require('matrix-react-sdk/lib/Modal');
24-
var sdk = require('matrix-react-sdk')
24+
var sdk = require('matrix-react-sdk');
2525
var dis = require('matrix-react-sdk/lib/dispatcher');
2626
var GeminiScrollbar = require('react-gemini-scrollbar');
2727

@@ -282,8 +282,7 @@ module.exports = React.createClass({
282282
<SimpleRoomHeader title="Directory" />
283283
<div className="mx_RoomDirectory_list">
284284
<input ref="roomAlias" placeholder="Join a room (e.g. #foo:domain.com)" className="mx_RoomDirectory_input" size="64" onKeyUp={ this.onKeyUp }/>
285-
<GeminiScrollbar className="mx_RoomDirectory_tableWrapper"
286-
relayoutOnUpdate={false} >
285+
<GeminiScrollbar className="mx_RoomDirectory_tableWrapper">
287286
<table ref="directory_table" className="mx_RoomDirectory_table">
288287
<tbody>
289288
{ this.getRows(this.state.roomAlias) }

‎src/components/structures/RoomSubList.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ var RoomSubList = React.createClass({
6161
label: React.PropTypes.string.isRequired,
6262
tagName: React.PropTypes.string,
6363
editable: React.PropTypes.bool,
64+
6465
order: React.PropTypes.string.isRequired,
65-
selectedRoom: React.PropTypes.string.isRequired,
66+
67+
// undefined if no room is selected (eg we are showing settings)
68+
selectedRoom: React.PropTypes.string,
69+
6670
startAsHidden: React.PropTypes.bool,
6771
showSpinner: React.PropTypes.bool, // true to show a spinner if 0 elements when expanded
6872
collapsed: React.PropTypes.bool.isRequired, // is LeftPanel collapsed?

‎src/components/structures/SearchBox.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module.exports = React.createClass({
9494
<TintableSvg
9595
key="button"
9696
className="mx_SearchBox_searchButton"
97-
src="img/right_search.svg" width="24" height="24"
97+
src="img/icons-search-copy.svg" width="13" height="13"
9898
/>,
9999
<input
100100
key="searchfield"

src/components/views/rooms/MessageContextMenu.js renamed to src/components/views/context_menus/MessageContextMenu.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,38 +95,38 @@ module.exports = React.createClass({
9595

9696
if (eventStatus === 'not_sent') {
9797
resendButton = (
98-
<div className="mx_ContextualMenu_field" onClick={this.onResendClick}>
98+
<div className="mx_MessageContextMenu_field" onClick={this.onResendClick}>
9999
Resend
100100
</div>
101101
);
102102
}
103103

104104
if (!eventStatus) { // sent
105105
redactButton = (
106-
<div className="mx_ContextualMenu_field" onClick={this.onRedactClick}>
106+
<div className="mx_MessageContextMenu_field" onClick={this.onRedactClick}>
107107
Redact
108108
</div>
109109
);
110110
}
111111

112112
if (eventStatus === "queued" || eventStatus === "not_sent") {
113113
cancelButton = (
114-
<div className="mx_ContextualMenu_field" onClick={this.onCancelSendClick}>
114+
<div className="mx_MessageContextMenu_field" onClick={this.onCancelSendClick}>
115115
Cancel Sending
116116
</div>
117117
);
118118
}
119119

120120
viewSourceButton = (
121-
<div className="mx_ContextualMenu_field" onClick={this.onViewSourceClick}>
121+
<div className="mx_MessageContextMenu_field" onClick={this.onViewSourceClick}>
122122
View Source
123123
</div>
124124
);
125125

126126
if (this.props.eventTileOps) {
127127
if (this.props.eventTileOps.isWidgetHidden()) {
128128
unhidePreviewButton = (
129-
<div className="mx_ContextualMenu_field" onClick={this.onUnhidePreviewClick}>
129+
<div className="mx_MessageContextMenu_field" onClick={this.onUnhidePreviewClick}>
130130
Unhide Preview
131131
</div>
132132
)
@@ -136,7 +136,7 @@ module.exports = React.createClass({
136136
// XXX: this should be https://matrix.to.
137137
// XXX: if we use room ID, we should also include a server where the event can be found (other than in the domain of the event ID)
138138
permalinkButton = (
139-
<div className="mx_ContextualMenu_field">
139+
<div className="mx_MessageContextMenu_field">
140140
<a href={ "#/room/" + this.props.mxEvent.getRoomId() +"/"+ this.props.mxEvent.getId() }
141141
onClick={ this.onPermalinkClick }>Permalink</a>
142142
</div>

0 commit comments

Comments
 (0)