From 81d70a921df18ac86291a95b3b95f725668647c7 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 16 Nov 2016 23:10:51 +0000 Subject: [PATCH 01/13] Add a 'View decrypted source' button --- src/components/structures/ViewSource.js | 6 +++--- .../views/context_menus/MessageContextMenu.js | 21 ++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/components/structures/ViewSource.js b/src/components/structures/ViewSource.js index 1dbc5319..a0e198ce 100644 --- a/src/components/structures/ViewSource.js +++ b/src/components/structures/ViewSource.js @@ -22,7 +22,8 @@ module.exports = React.createClass({ displayName: 'ViewSource', propTypes: { - onFinished: React.PropTypes.func.isRequired + content: React.PropTypes.object.isRequired, + onFinished: React.PropTypes.func.isRequired, }, componentDidMount: function() { @@ -45,10 +46,9 @@ module.exports = React.createClass({ return (
-                    {JSON.stringify(this.props.mxEvent.event, null, 2)}
+                    {JSON.stringify(this.props.content, null, 2)}
                 
); } }); - diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 7786b9bd..4b62b87e 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -47,7 +47,16 @@ module.exports = React.createClass({ onViewSourceClick: function() { var ViewSource = sdk.getComponent('structures.ViewSource'); Modal.createDialog(ViewSource, { - mxEvent: this.props.mxEvent + content: this.props.mxEvent.event, + }, 'mx_Dialog_viewsource'); + if (this.props.onFinished) this.props.onFinished(); + }, + + onViewClearSourceClick: function() { + var ViewSource = sdk.getComponent('structures.ViewSource'); + Modal.createDialog(ViewSource, { + // FIXME: _clearEvent is private + content: this.props.mxEvent._clearEvent, }, 'mx_Dialog_viewsource'); if (this.props.onFinished) this.props.onFinished(); }, @@ -97,6 +106,7 @@ module.exports = React.createClass({ var eventStatus = this.props.mxEvent.status; var resendButton; var viewSourceButton; + var viewClearSourceButton; var redactButton; var cancelButton; var permalinkButton; @@ -133,6 +143,14 @@ module.exports = React.createClass({ ); + if (this.props.mxEvent.getType() !== this.props.mxEvent.getWireType()) { + viewClearSourceButton = ( +
+ View Decrypted Source +
+ ); + } + if (this.props.eventTileOps) { if (this.props.eventTileOps.isWidgetHidden()) { unhidePreviewButton = ( @@ -174,6 +192,7 @@ module.exports = React.createClass({ {redactButton} {cancelButton} {viewSourceButton} + {viewClearSourceButton} {unhidePreviewButton} {permalinkButton} {UserSettingsStore.isFeatureEnabled('rich_text_editor') ? quoteButton : null} From 5d02c72687c7007c2914a6afb09e9b52af5aefab Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 17 Nov 2016 10:34:12 +0000 Subject: [PATCH 02/13] Bump to react 15.4 Add dependencies on react 15.4. Some of the things we pull in from matrix-react-sdk won't work properly against 15.2 / 15.0. --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 173b9e1d..9ef377a9 100644 --- a/package.json +++ b/package.json @@ -70,10 +70,10 @@ "matrix-react-sdk": "matrix-org/matrix-react-sdk#develop", "modernizr": "^3.1.0", "q": "^1.4.1", - "react": "^15.2.1", + "react": "^15.4.0", "react-dnd": "^2.1.4", "react-dnd-html5-backend": "^2.1.2", - "react-dom": "^15.2.1", + "react-dom": "^15.4.0", "react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef", "sanitize-html": "^1.11.1", "ua-parser-js": "^0.7.10", @@ -115,8 +115,8 @@ "mocha": "^2.4.5", "parallelshell": "^1.2.0", "phantomjs-prebuilt": "^2.1.7", - "react-addons-perf": "^15.0", - "react-addons-test-utils": "^15.0.1", + "react-addons-perf": "^15.4.0", + "react-addons-test-utils": "^15.4.0", "rimraf": "^2.4.3", "source-map-loader": "^0.1.5", "webpack": "^1.12.14", From 7577d2eb0570a396fe68036b7e865170516a5898 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 17 Nov 2016 10:51:09 +0000 Subject: [PATCH 03/13] s/var/const/ --- src/components/views/context_menus/MessageContextMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 4b62b87e..e3640f77 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -53,7 +53,7 @@ module.exports = React.createClass({ }, onViewClearSourceClick: function() { - var ViewSource = sdk.getComponent('structures.ViewSource'); + const ViewSource = sdk.getComponent('structures.ViewSource'); Modal.createDialog(ViewSource, { // FIXME: _clearEvent is private content: this.props.mxEvent._clearEvent, From 646608bf8b6e824ef2ecc45d017831f7c4840a1e Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 17 Nov 2016 17:27:21 +0000 Subject: [PATCH 04/13] Add a cachebuster to /version --- src/vector/platform/WebPlatform.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index b5459aec..dec15869 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -128,8 +128,18 @@ export default class WebPlatform extends VectorBasePlatform { _getVersion() { const deferred = q.defer(); + + // We add a cachebuster to the request to make sure that we know about + // the most recent version on the origin server. That might not + // actually be the version we'd get on a reload (particularly in the + // presence of intermediate caching proxies), but still: we're trying + // to tell the user that there is a new version. request( - { method: "GET", url: "version" }, + { + method: "GET", + url: "version", + qs: { cachebuster: Date.now() }, + }, (err, response, body) => { if (err || response.status < 200 || response.status >= 300) { if (err == null) err = { status: response.status }; From 8b0390f354a7e079878c72f221784932fb603579 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 18 Nov 2016 17:32:01 +0000 Subject: [PATCH 05/13] Fix a race which took us to the directory on load sometimes (#2602) Sometimes window.onload would run before loadApp had finished (specifically, if the browser had to wait for config.json to load). Avoid the race by moving all of the onload logic into loadApp. --- src/vector/index.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 9c9d48fa..0ced93d5 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -120,6 +120,8 @@ var lastLoadedScreen = null; // so a web page can update the URL bar appropriately. var onNewScreen = function(screen) { console.log("newscreen "+screen); + // just remember the most recent screen while we are loading, so that the + // user doesn't see the URL bar doing a dance if (!loaded) { lastLoadedScreen = screen; } else { @@ -156,19 +158,6 @@ function getDefaultDeviceDisplayName() { } window.addEventListener('hashchange', onHashChange); -window.onload = function() { - console.log("window.onload"); - if (!validBrowser) { - return; - } - UpdateChecker.start(); - routeUrl(window.location); - loaded = true; - if (lastLoadedScreen) { - onNewScreen(lastLoadedScreen); - lastLoadedScreen = null; - } -} function getConfig() { let deferred = q.defer(); @@ -259,6 +248,8 @@ async function loadApp() { Unable to load config file: please refresh the page to try again. , document.getElementById('matrixchat')); } else if (validBrowser) { + UpdateChecker.start(); + var MatrixChat = sdk.getComponent('structures.MatrixChat'); window.matrixChat = ReactDOM.render( @@ -275,6 +266,15 @@ async function loadApp() { />, document.getElementById('matrixchat') ); + + routeUrl(window.location); + + // we didn't propagate screen changes to the URL bar while we were loading; do it now. + loaded = true; + if (lastLoadedScreen) { + onNewScreen(lastLoadedScreen); + lastLoadedScreen = null; + } } else { console.error("Browser is missing required features."); @@ -285,7 +285,6 @@ async function loadApp() { validBrowser = true; console.log("User accepts the compatibility risks."); loadApp(); - window.onload(); // still do the same code paths for compatible clients }} />, document.getElementById('matrixchat') ); From 67c882648f7ab6e94785acc1783951dd582d6493 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 18 Nov 2016 17:52:44 +0000 Subject: [PATCH 06/13] Make sure we only pack one copy of react-dom (#2603) Fixes https://github.com/vector-im/vector-web/issues/2601 --- webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 4f350dd4..cad7b9a3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -57,7 +57,8 @@ module.exports = { alias: { // alias any requires to the react module to the one in our path, otherwise // we tend to get the react source included twice when using npm link. - react: path.resolve('./node_modules/react'), + "react": path.resolve('./node_modules/react'), + "react-dom": path.resolve('./node_modules/react-dom'), "react-addons-perf": path.resolve('./node_modules/react-addons-perf'), // same goes for js-sdk From 683ecb3326f22a118674701605e9b919f7593930 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 19 Nov 2016 02:04:31 +0200 Subject: [PATCH 07/13] Prepare changelog for v0.9.0 --- CHANGELOG.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12ebad99..31973282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,48 @@ +Changes in [0.9.0](https://github.com/vector-im/vector-web/releases/tag/v0.9.0) (2016-11-19) +============================================================================================ +[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.8.4...v0.9.0) + + * Add a cachebuster to /version + [\#2596](https://github.com/vector-im/vector-web/pull/2596) + * Add a 'View decrypted source' button + [\#2587](https://github.com/vector-im/vector-web/pull/2587) + * Fix changelog dialog to read new version format + [\#2577](https://github.com/vector-im/vector-web/pull/2577) + * Build all of the vector dir in the build process + [\#2558](https://github.com/vector-im/vector-web/pull/2558) + * Support for get_app_version + [\#2553](https://github.com/vector-im/vector-web/pull/2553) + * Add CSS for mlist truncation + [\#2565](https://github.com/vector-im/vector-web/pull/2565) + * Add menu option for `external_url` if present + [\#2560](https://github.com/vector-im/vector-web/pull/2560) + * Make auto-update configureable + [\#2555](https://github.com/vector-im/vector-web/pull/2555) + * Missed files electron windows fixes + [\#2556](https://github.com/vector-im/vector-web/pull/2556) + * Add some CSS for scalar error popup + [\#2554](https://github.com/vector-im/vector-web/pull/2554) + * Catch unhandled errors in the electron process + [\#2552](https://github.com/vector-im/vector-web/pull/2552) + * Slight grab-bag of fixes for electron on Windows + [\#2551](https://github.com/vector-im/vector-web/pull/2551) + * Electron app (take 3) + [\#2535](https://github.com/vector-im/vector-web/pull/2535) + * Use webpack-dev-server instead of http-server + [\#2542](https://github.com/vector-im/vector-web/pull/2542) + * Better support no-config when loading from file + [\#2541](https://github.com/vector-im/vector-web/pull/2541) + * Fix loading with no config from HTTP + [\#2540](https://github.com/vector-im/vector-web/pull/2540) + * Move 'new version' support into Platform + [\#2532](https://github.com/vector-im/vector-web/pull/2532) + * Add Notification support to the Web Platform + [\#2533](https://github.com/vector-im/vector-web/pull/2533) + * Use the defaults if given a blank config file + [\#2534](https://github.com/vector-im/vector-web/pull/2534) + * Implement Platforms + [\#2531](https://github.com/vector-im/vector-web/pull/2531) + hanges in [0.8.4](https://github.com/vector-im/vector-web/releases/tag/v0.8.4) (2016-11-04) ============================================================================================ [Full Changelog](https://github.com/vector-im/vector-web/compare/v0.8.4-rc.2...v0.8.4) From 5cd4f88b8c6dd5348a8414c0c9cb04d7e4ab8509 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 19 Nov 2016 02:04:32 +0200 Subject: [PATCH 08/13] v0.9.0 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9ef377a9..c1441cf4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vector-web", "productName": "Riot", "main": "electron/src/electron-main.js", - "version": "0.8.4", + "version": "0.9.0", "description": "A feature-rich client for Matrix.org", "author": "Vector Creations Ltd.", "repository": { @@ -66,8 +66,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.1.3", - "matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", - "matrix-react-sdk": "matrix-org/matrix-react-sdk#develop", + "matrix-js-sdk": "0.7.0", + "matrix-react-sdk": "0.8.0", "modernizr": "^3.1.0", "q": "^1.4.1", "react": "^15.4.0", From 9ce2adceef2851ed2b262c4ed54bfae3e58c1e2f Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 21 Nov 2016 10:40:35 +0000 Subject: [PATCH 09/13] Include config.sample.json in dist tarball Fixes https://github.com/vector-im/vector-web/issues/2607 --- scripts/package.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/package.sh b/scripts/package.sh index 05227e1b..5c1fdd5e 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -15,6 +15,11 @@ fi npm run clean npm run build$dev + +# include the sample config in the tarball. Arguably this should be done by +# `npm run build`, but it's just too painful. +cp config.sample.json webapp/ + mkdir -p dist cp -r webapp vector-$version echo $version > vector-$version/version From 10650d2cd1813d2a18d6e58c2d07507ec18e650b Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 22 Nov 2016 22:14:05 +0000 Subject: [PATCH 10/13] Unpin js-sdk and react-sdk --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c1441cf4..509e0e94 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.1.3", - "matrix-js-sdk": "0.7.0", - "matrix-react-sdk": "0.8.0", + "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", "react": "^15.4.0", From 0df242e0e9ebd60b7d6877f0ae641d2da735ce86 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 24 Nov 2016 16:20:58 +0000 Subject: [PATCH 11/13] Add Freenode & Mozilla domains So the join button works for them --- config.sample.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.sample.json b/config.sample.json index 49303769..a25bdb11 100644 --- a/config.sample.json +++ b/config.sample.json @@ -31,6 +31,8 @@ "nativePattern": "[^\\s]+/[^\\s]+$" }, "irc:freenode": { + "protocol": "irc", + "domain": "chat.freenode.net", "portalRoomPattern": "#freenode_.*:matrix.org", "name": "Freenode", "icon": "//matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX", @@ -38,6 +40,8 @@ "nativePattern": "^#[^\\s]+$" }, "irc:mozilla": { + "protocol": "irc", + "domain": "irc.mozilla.org", "portalRoomPattern": "#mozilla_.*:matrix.org", "name": "Mozilla", "icon": "//matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX", From c786980454f6648de45a8193f0ec08d41ed71c0f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 24 Nov 2016 16:46:15 +0000 Subject: [PATCH 12/13] Move getDefaultDeviceName into the Platforms So we can have a sensible device name on Electron --- src/vector/index.js | 16 +-------------- src/vector/platform/ElectronPlatform.js | 25 +++++++++++++++++++++++ src/vector/platform/VectorBasePlatform.js | 8 ++++++++ src/vector/platform/WebPlatform.js | 15 ++++++++++++++ 4 files changed, 49 insertions(+), 15 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 0ced93d5..b791783b 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -54,7 +54,6 @@ var UpdateChecker = require("./updater"); var q = require('q'); var request = require('browser-request'); -import UAParser from 'ua-parser-js'; import url from 'url'; import {parseQs, parseQsFromFragment} from './url_utils'; @@ -144,19 +143,6 @@ var makeRegistrationUrl = function() { '#/register'; } - -function getDefaultDeviceDisplayName() { - // strip query-string and fragment from uri - let u = url.parse(window.location.href); - u.search = ""; - u.hash = ""; - let app_name = u.format(); - - let ua = new UAParser(); - return app_name + " via " + ua.getBrowser().name + - " on " + ua.getOS().name; -} - window.addEventListener('hashchange', onHashChange); function getConfig() { @@ -262,7 +248,7 @@ async function loadApp() { startingFragmentQueryParams={fragparts.params} enableGuest={true} onLoadCompleted={onLoadCompleted} - defaultDeviceDisplayName={getDefaultDeviceDisplayName()} + defaultDeviceDisplayName={PlatformPeg.get().getDefaultDeviceDisplayName()} />, document.getElementById('matrixchat') ); diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index c7455a71..3894896a 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -35,6 +35,27 @@ function onUpdateDownloaded(ev, releaseNotes, ver, date, updateURL) { }); } +function platformFriendlyName() { + console.log(window.process); + switch (window.process.platform) { + case 'darwin': + return 'macOS'; + case 'freebsd': + return 'FreeBSD'; + case 'openbsd': + return 'OpenBSD'; + case 'sunos': + return 'SunOS'; + case 'win32': + return 'Windows'; + default: + // Sorry, Linux users: you get lumped into here, + // but only because Linux's capitalisation is + // normal. We do care about you. + return window.process.platform[0].toUpperCase + window.process.platform.slice(1); + } +} + export default class ElectronPlatform extends VectorBasePlatform { setNotificationCount(count: number) { super.setNotificationCount(count); @@ -101,4 +122,8 @@ export default class ElectronPlatform extends VectorBasePlatform { // it should exit. electron.ipcRenderer.send('install_update'); } + + getDefaultDeviceDisplayName() { + return "Riot Desktop on " + platformFriendlyName(); + } } diff --git a/src/vector/platform/VectorBasePlatform.js b/src/vector/platform/VectorBasePlatform.js index d2ed8c34..5240f3f5 100644 --- a/src/vector/platform/VectorBasePlatform.js +++ b/src/vector/platform/VectorBasePlatform.js @@ -39,4 +39,12 @@ export default class VectorBasePlatform extends BasePlatform { */ installUpdate() { } + + /** + * Get a sensible default display name for the + * device Vector is running on + */ + getDefaultDeviceDisplayName() { + return "Unknown device"; + } } diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index dec15869..9998f7c7 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -23,6 +23,9 @@ import request from 'browser-request'; import dis from 'matrix-react-sdk/lib/dispatcher.js'; import q from 'q'; +import url from 'url'; +import UAParser from 'ua-parser-js'; + export default class WebPlatform extends VectorBasePlatform { constructor() { super(); @@ -180,4 +183,16 @@ export default class WebPlatform extends VectorBasePlatform { installUpdate() { window.location.reload(); } + + getDefaultDeviceDisplayName() { + // strip query-string and fragment from uri + let u = url.parse(window.location.href); + u.search = ""; + u.hash = ""; + let app_name = u.format(); + + let ua = new UAParser(); + return app_name + " via " + ua.getBrowser().name + + " on " + ua.getOS().name; + } } From a870ea2389d4b9c38d5bd8ac3567b6ee34fcccda Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 24 Nov 2016 17:24:11 +0000 Subject: [PATCH 13/13] Add electron config Which has the update URL in it --- electron/config.json | 72 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 electron/config.json diff --git a/electron/config.json b/electron/config.json new file mode 100644 index 00000000..7bf4c4d8 --- /dev/null +++ b/electron/config.json @@ -0,0 +1,72 @@ +{ + "update_url": "https://riot.im/download/desktop/", + "default_hs_url": "https://matrix.org", + "default_is_url": "https://vector.im", + "brand": "Riot", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "enableLabs": true, + "roomDirectory": { + "servers": [ + "matrix.org" + ], + "serverConfig": { + "matrix.org": { + "networks": [ + "_matrix", + "gitter", + "irc:freenode", + "irc:mozilla", + "irc:snoonet", + "irc:oftc" + ] + } + }, + "networks": { + "gitter": { + "protocol": "gitter", + "portalRoomPattern": "#gitter_.*:matrix.org", + "name": "Gitter", + "icon": "https://gitter.im/favicon.ico", + "example": "org/community", + "nativePattern": "[^\\s]+/[^\\s]+$" + }, + "irc:freenode": { + "protocol": "irc", + "domain": "chat.freenode.net", + "portalRoomPattern": "#freenode_.*:matrix.org", + "name": "Freenode", + "icon": "https://matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX", + "example": "#channel", + "nativePattern": "^#[^\\s]+$" + }, + "irc:mozilla": { + "protocol": "irc", + "domain": "chat.freenode.net", + "portalRoomPattern": "#mozilla_.*:matrix.org", + "name": "Mozilla", + "icon": "https://matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX", + "example": "#channel", + "nativePattern": "^#[^\\s]+$" + }, + "irc:snoonet": { + "protocol": "irc", + "domain": "ipv6-irc.snoonet.org", + "portalRoomPattern": "#_snoonet_.*:matrix.org", + "name": "Snoonet", + "icon": "https://matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX", + "example": "#channel", + "nativePattern": "^#[^\\s]+$" + }, + "irc:oftc": { + "protocol": "irc", + "domain": "irc.oftc.net", + "portalRoomPattern": "#_oftc_.*:matrix.org", + "name": "OFTC", + "icon": "https://matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX", + "example": "#channel", + "nativePattern": "^#[^\\s]+$" + } + } + } +} diff --git a/package.json b/package.json index 509e0e94..fde6fbaa 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "build:compile": "babel --source-maps -d lib src", "build:bundle": "NODE_ENV=production webpack -p --progress", "build:bundle:dev": "webpack --optimize-occurence-order --progress", - "build:electron": "build -lwm", + "build:electron": "npm run clean && npm run build && cpx electron/config.json webapp/ && build -lwm", "build": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle", "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle:dev", "dist": "scripts/package.sh",