diff --git a/.gitignore b/.gitignore
index 6dd2b988c..7f753927c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,13 +5,12 @@
/key.pem
/lib
/node_modules
-/electron/node_modules
+/electron_app/node_modules
+/electron_app/dist
/packages/
/webapp
/.npmrc
.DS_Store
npm-debug.log
-electron/dist
-electron/pub
/config.json
/src/component-index.js
diff --git a/.modernizr.json b/.modernizr.json
index 29e620a5b..06be8b4fa 100644
--- a/.modernizr.json
+++ b/.modernizr.json
@@ -9,6 +9,8 @@
"test/css/flexbox",
"test/es5/specification",
"test/css/objectfit",
- "test/storage/localstorage"
+ "test/storage/localstorage",
+ "test/workers/webworkers",
+ "test/indexeddb"
]
-}
\ No newline at end of file
+}
diff --git a/.travis.yml b/.travis.yml
index 9720d8872..ff58bf374 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,5 @@ language: node_js
node_js:
- 6 # node v6, to match jenkins
install:
+ - scripts/fetch-develop.deps.sh
- npm install
- - (cd node_modules/matrix-js-sdk && npm install)
- - (cd node_modules/matrix-react-sdk && npm install)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea63ee66a..216570052 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,111 @@
+Changes in [0.9.10](https://github.com/vector-im/riot-web/releases/tag/v0.9.10) (2017-05-22)
+============================================================================================
+[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.10-rc.1...v0.9.10)
+
+ * No changes
+
+
+Changes in [0.9.10-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.9.10-rc.1) (2017-05-19)
+======================================================================================================
+[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.9...v0.9.10-rc.1)
+
+ * CSS for left_aligned Dropdowns, and adjustments for Country dd in Login
+ [\#3959](https://github.com/vector-im/riot-web/pull/3959)
+ * Add square flag pngs /w genflags.sh script
+ [\#3953](https://github.com/vector-im/riot-web/pull/3953)
+ * Add config for riot-bot on desktop app build
+ [\#3954](https://github.com/vector-im/riot-web/pull/3954)
+ * Desktop: 'copy link address'
+ [\#3952](https://github.com/vector-im/riot-web/pull/3952)
+ * Reduce rageshake log size to 1MB
+ [\#3943](https://github.com/vector-im/riot-web/pull/3943)
+ * CSS for putting country dd on same line as phone input
+ [\#3942](https://github.com/vector-im/riot-web/pull/3942)
+ * fix #3894
+ [\#3919](https://github.com/vector-im/riot-web/pull/3919)
+ * change vector->riot on the surface
+ [\#3894](https://github.com/vector-im/riot-web/pull/3894)
+ * move manifest.json outward so it is scoped properly
+ [\#3888](https://github.com/vector-im/riot-web/pull/3888)
+ * add to manifest
+ [\#3799](https://github.com/vector-im/riot-web/pull/3799)
+ * Automatically update component-index
+ [\#3886](https://github.com/vector-im/riot-web/pull/3886)
+ * move electron -> electron_app because npm smart
+ [\#3877](https://github.com/vector-im/riot-web/pull/3877)
+ * Fix bug report endpoint in config.sample.json.
+ [\#3863](https://github.com/vector-im/riot-web/pull/3863)
+ * Update 2 missed icons to the new icon
+ [\#3851](https://github.com/vector-im/riot-web/pull/3851)
+ * Make left panel better for new users (mk II)
+ [\#3804](https://github.com/vector-im/riot-web/pull/3804)
+ * match primary package.json
+ [\#3839](https://github.com/vector-im/riot-web/pull/3839)
+ * Re-add productName
+ [\#3829](https://github.com/vector-im/riot-web/pull/3829)
+ * Remove leading v in /version file, for SemVer and to match Electron ver
+ [\#3683](https://github.com/vector-im/riot-web/pull/3683)
+ * Fix scope of callback
+ [\#3790](https://github.com/vector-im/riot-web/pull/3790)
+ * Remember and Recall window layout/position state
+ [\#3622](https://github.com/vector-im/riot-web/pull/3622)
+ * Remove babelcheck
+ [\#3808](https://github.com/vector-im/riot-web/pull/3808)
+ * Include MXID and device id in rageshakes
+ [\#3809](https://github.com/vector-im/riot-web/pull/3809)
+ * import Modal
+ [\#3791](https://github.com/vector-im/riot-web/pull/3791)
+ * Pin filesize ver to fix break upstream
+ [\#3775](https://github.com/vector-im/riot-web/pull/3775)
+ * Improve Room Directory Look & Feel
+ [\#3751](https://github.com/vector-im/riot-web/pull/3751)
+ * Fix emote RRs alignment
+ [\#3742](https://github.com/vector-im/riot-web/pull/3742)
+ * Remove unused `placeholder` prop on RoomDropTarget
+ [\#3741](https://github.com/vector-im/riot-web/pull/3741)
+ * Modify CSS for matrix-org/matrix-react-sdk#833
+ [\#3732](https://github.com/vector-im/riot-web/pull/3732)
+ * Warn when exiting due to single-instance
+ [\#3727](https://github.com/vector-im/riot-web/pull/3727)
+ * Electron forgets it was maximized when you click on a notification
+ [\#3709](https://github.com/vector-im/riot-web/pull/3709)
+ * CSS to make h1 and h2 the same size as h1.
+ [\#3719](https://github.com/vector-im/riot-web/pull/3719)
+ * Prevent long room names/topics from pushing UI of the screen
+ [\#3721](https://github.com/vector-im/riot-web/pull/3721)
+ * Disable dropdown highlight on focus
+ [\#3717](https://github.com/vector-im/riot-web/pull/3717)
+ * Escape HTML Tags from Linux Notifications (electron)
+ [\#3564](https://github.com/vector-im/riot-web/pull/3564)
+ * styling for spoilerized access token view in Settings
+ [\#3651](https://github.com/vector-im/riot-web/pull/3651)
+ * Fix Webpack conf
+ [\#3690](https://github.com/vector-im/riot-web/pull/3690)
+ * Add config.json to .gitignore
+ [\#3599](https://github.com/vector-im/riot-web/pull/3599)
+ * add command line arg (--hidden) for electron app
+ [\#3641](https://github.com/vector-im/riot-web/pull/3641)
+ * fix ImageView Download functionality
+ [\#3640](https://github.com/vector-im/riot-web/pull/3640)
+ * Add cross-env into the mix
+ [\#3693](https://github.com/vector-im/riot-web/pull/3693)
+ * Remember acceptance for unsupported browsers.
+ [\#3694](https://github.com/vector-im/riot-web/pull/3694)
+ * Cosmetics to go with matrix-org/matrix-react-sdk#811
+ [\#3692](https://github.com/vector-im/riot-web/pull/3692)
+ * Cancel quicksearch on ESC
+ [\#3680](https://github.com/vector-im/riot-web/pull/3680)
+ * Optimise RoomList and implement quick-search functionality on it.
+ [\#3654](https://github.com/vector-im/riot-web/pull/3654)
+ * Progress updates for rageshake uploads
+ [\#3648](https://github.com/vector-im/riot-web/pull/3648)
+ * Factor out rageshake upload to a separate file
+ [\#3645](https://github.com/vector-im/riot-web/pull/3645)
+ * rageshake: fix race when collecting logs
+ [\#3644](https://github.com/vector-im/riot-web/pull/3644)
+ * Fix a flaky test
+ [\#3649](https://github.com/vector-im/riot-web/pull/3649)
+
Changes in [0.9.9](https://github.com/vector-im/riot-web/releases/tag/v0.9.9) (2017-04-25)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.9-rc.2...v0.9.9)
diff --git a/README.md b/README.md
index 55463a376..341078736 100644
--- a/README.md
+++ b/README.md
@@ -58,27 +58,35 @@ to build.
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
1. Clone the repo: `git clone https://github.com/vector-im/riot-web.git`
1. Switch to the riot-web directory: `cd riot-web`
-1. Install the prerequisites: `npm install`
-1. If you are using the `develop` branch of vector-web, you will probably need
- to rebuild some of the dependencies, due to
- https://github.com/npm/npm/issues/3055:
-
+1. If you're using the `develop` branch, install the develop versions of the
+ dependencies, as the released ones will be too old:
```
- (cd node_modules/matrix-js-sdk && npm install)
- (cd node_modules/matrix-react-sdk && npm install)
+ scripts/fetch-develop-deps.sh
```
Whenever you git pull on riot-web you will also probably need to force an update
- to these dependencies - the easiest way is probably:
+ to these dependencies - the simplest way is to re-run the script, but you can also
+ manually update and reuild them:
```
- rm -rf node_modules/matrjx-{js,react}-sdk && npm i
- (cd node_modules/matrix-js-sdk && npm install)
- (cd node_modules/matrix-react-sdk && npm install)
+ cd matrix-js-sdk
+ git pull
+ npm install # re-run to pull in any new dependencies
+ # Depending on your version of npm, npm run build may happen as part of
+ # the npm install above (https://docs.npmjs.com/misc/scripts#prepublish-and-prepare)
+ # If in doubt, run it anyway:
+ npm run build
+ cd ../matrix-react-sdk
+ git pull
+ npm install
+ npm run build
```
However, we recommend setting up a proper development environment (see "Setting
up a development environment" below) if you want to run your own copy of the
`develop` branch, as it makes it much easier to keep these dependencies
up-to-date. Or just use https://riot.im/develop - the continuous integration
release of the develop branch.
+ (Note that we don't reference the develop versions in git directly due to
+ https://github.com/npm/npm/issues/3055)
+1. Install the prerequisites: `npm install`
1. Configure the app by copying `config.sample.json` to `config.json` and
modifying it (see below for details)
1. `npm run dist` to build a tarball to deploy. Untaring this file will give
diff --git a/electron_app/package.json b/electron_app/package.json
index 99651cc1c..df9c3bd26 100644
--- a/electron_app/package.json
+++ b/electron_app/package.json
@@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "src/electron-main.js",
- "version": "0.9.9",
+ "version": "0.9.10",
"description": "A feature-rich client for Matrix.org",
"author": "Vector Creations Ltd.",
"dependencies": {
diff --git a/electron_app/riot.im/config.json b/electron_app/riot.im/config.json
index c5bc65e1e..80526f4ab 100644
--- a/electron_app/riot.im/config.json
+++ b/electron_app/riot.im/config.json
@@ -6,68 +6,11 @@
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
+ "welcomeUserId": "@riot-bot:matrix.org",
"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/electron_app/src/electron-main.js b/electron_app/src/electron-main.js
index 32e305d8d..ab844bd37 100644
--- a/electron_app/src/electron-main.js
+++ b/electron_app/src/electron-main.js
@@ -86,6 +86,12 @@ function onLinkContextMenu(ev, params) {
safeOpenURL(params.linkURL);
},
}));
+ popup_menu.append(new electron.MenuItem({
+ label: 'Copy Link Address',
+ click() {
+ electron.clipboard.writeText(params.linkURL);
+ },
+ }));
popup_menu.popup();
ev.preventDefault();
}
@@ -155,12 +161,31 @@ function startAutoUpdate(update_base_url) {
// no other way to catch this error).
// Assuming we generally run from the console when developing,
// this is far preferable.
-process.on('uncaughtException', function (error) {
+process.on('uncaughtException', function(error) {
console.log("Unhandled exception", error);
});
electron.ipcMain.on('install_update', installUpdate);
+let focusHandlerAttached = false;
+electron.ipcMain.on('setBadgeCount', function(ev, count) {
+ electron.app.setBadgeCount(count);
+ if (process.platform === 'win32' && mainWindow && !mainWindow.isFocused()) {
+ if (count > 0) {
+ if (!focusHandlerAttached) {
+ mainWindow.once('focus', () => {
+ mainWindow.flashFrame(false);
+ focusHandlerAttached = false;
+ });
+ focusHandlerAttached = true;
+ }
+ mainWindow.flashFrame(true);
+ } else {
+ mainWindow.flashFrame(false);
+ }
+ }
+});
+
electron.app.commandLine.appendSwitch('--enable-usermedia-screen-capturing');
const shouldQuit = electron.app.makeSingleInstance((commandLine, workingDirectory) => {
diff --git a/electron_app/src/tray.js b/electron_app/src/tray.js
index 2ccdf40cc..5409194d8 100644
--- a/electron_app/src/tray.js
+++ b/electron_app/src/tray.js
@@ -15,26 +15,21 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-const path = require('path');
-const electron = require('electron');
-
-const app = electron.app;
-const Tray = electron.Tray;
-const MenuItem = electron.MenuItem;
+const {app, Tray, Menu, nativeImage} = require('electron');
let trayIcon = null;
exports.hasTray = function hasTray() {
return (trayIcon !== null);
-}
+};
-exports.create = function (win, config) {
+exports.create = function(win, config) {
// no trays on darwin
if (process.platform === 'darwin' || trayIcon) {
return;
}
- const toggleWin = function () {
+ const toggleWin = function() {
if (win.isVisible() && !win.isMinimized()) {
win.hide();
} else {
@@ -44,24 +39,48 @@ exports.create = function (win, config) {
}
};
- const contextMenu = electron.Menu.buildFromTemplate([
+ const contextMenu = Menu.buildFromTemplate([
{
label: 'Show/Hide ' + config.brand,
- click: toggleWin
+ click: toggleWin,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: 'Quit',
- click: function () {
+ click: function() {
app.quit();
- }
- }
+ },
+ },
]);
trayIcon = new Tray(config.icon_path);
trayIcon.setToolTip(config.brand);
trayIcon.setContextMenu(contextMenu);
trayIcon.on('click', toggleWin);
+
+ let lastFavicon = null;
+ win.webContents.on('page-favicon-updated', function(ev, favicons) {
+ let newFavicon = config.icon_path;
+ if (favicons && favicons.length > 0 && favicons[0].startsWith('data:')) {
+ newFavicon = favicons[0];
+ }
+
+ // No need to change, shortcut
+ if (newFavicon === lastFavicon) return;
+ lastFavicon = newFavicon;
+
+ // if its not default we have to construct into nativeImage
+ if (newFavicon !== config.icon_path) {
+ newFavicon = nativeImage.createFromDataURL(favicons[0]);
+ }
+
+ trayIcon.setImage(newFavicon);
+ win.setIcon(newFavicon);
+ });
+
+ win.webContents.on('page-title-updated', function(ev, title) {
+ trayIcon.setToolTip(title);
+ });
};
diff --git a/package.json b/package.json
index a1f06b00b..f95a032a7 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "electron_app/src/electron-main.js",
- "version": "0.9.9",
+ "version": "0.9.10",
"description": "A feature-rich client for Matrix.org",
"author": "Vector Creations Ltd.",
"repository": {
@@ -61,11 +61,12 @@
"favico.js": "^0.3.10",
"filesize": "3.5.6",
"flux": "~2.0.3",
+ "gemini-scrollbar": "matrix-org/gemini-scrollbar#b302279",
"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.8",
+ "matrix-react-sdk": "0.8.9",
"modernizr": "^3.1.0",
"pako": "^1.0.5",
"q": "^1.4.1",
@@ -73,7 +74,7 @@
"react-dnd": "^2.1.4",
"react-dnd-html5-backend": "^2.1.2",
"react-dom": "^15.4.0",
- "react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#39d858c",
+ "react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef",
"sanitize-html": "^1.11.1",
"ua-parser-js": "^0.7.10",
"url": "^0.11.0"
@@ -142,7 +143,7 @@
"build": {
"appId": "im.riot.app",
"category": "Network",
- "electronVersion": "1.6.2",
+ "electronVersion": "1.6.8",
"//asar=false": "https://github.com/electron-userland/electron-builder/issues/675",
"asar": false,
"dereference": true,
diff --git a/release.sh b/release.sh
index c24545605..8ae307f7e 100755
--- a/release.sh
+++ b/release.sh
@@ -9,6 +9,22 @@ set -e
cd `dirname $0`
+for i in matrix-js-sdk matrix-react-sdk
+do
+ depver=`cat package.json | jq -r .dependencies.\"$i\"`
+ latestver=`npm show $i version`
+ if [ "$depver" != "$latestver" ]
+ then
+ echo "The latest version of $i is $latestver but package.json depends on $depver"
+ echo -n "Type 'Yes' to continue anyway: "
+ read resp
+ if [ "$resp" != "Yes" ]
+ then
+ echo "OK, never mind."
+ exit 1
+ fi
+ fi
+done
# bump Electron's package.json first
release="${1#v}"
diff --git a/res/flags/AD.png b/res/flags/AD.png
new file mode 100644
index 000000000..8e777b982
Binary files /dev/null and b/res/flags/AD.png differ
diff --git a/res/flags/AE.png b/res/flags/AE.png
new file mode 100644
index 000000000..1c4a2bb79
Binary files /dev/null and b/res/flags/AE.png differ
diff --git a/res/flags/AF.png b/res/flags/AF.png
new file mode 100644
index 000000000..7d369371f
Binary files /dev/null and b/res/flags/AF.png differ
diff --git a/res/flags/AG.png b/res/flags/AG.png
new file mode 100644
index 000000000..78c03626b
Binary files /dev/null and b/res/flags/AG.png differ
diff --git a/res/flags/AI.png b/res/flags/AI.png
new file mode 100644
index 000000000..8a7078231
Binary files /dev/null and b/res/flags/AI.png differ
diff --git a/res/flags/AL.png b/res/flags/AL.png
new file mode 100644
index 000000000..b19c7bc52
Binary files /dev/null and b/res/flags/AL.png differ
diff --git a/res/flags/AM.png b/res/flags/AM.png
new file mode 100644
index 000000000..b39695fd4
Binary files /dev/null and b/res/flags/AM.png differ
diff --git a/res/flags/AO.png b/res/flags/AO.png
new file mode 100644
index 000000000..5aee75af1
Binary files /dev/null and b/res/flags/AO.png differ
diff --git a/res/flags/AQ.png b/res/flags/AQ.png
new file mode 100644
index 000000000..fa76fbb27
Binary files /dev/null and b/res/flags/AQ.png differ
diff --git a/res/flags/AR.png b/res/flags/AR.png
new file mode 100644
index 000000000..28750f42a
Binary files /dev/null and b/res/flags/AR.png differ
diff --git a/res/flags/AS.png b/res/flags/AS.png
new file mode 100644
index 000000000..36ba9b34d
Binary files /dev/null and b/res/flags/AS.png differ
diff --git a/res/flags/AT.png b/res/flags/AT.png
new file mode 100644
index 000000000..487fee823
Binary files /dev/null and b/res/flags/AT.png differ
diff --git a/res/flags/AU.png b/res/flags/AU.png
new file mode 100644
index 000000000..7004861f7
Binary files /dev/null and b/res/flags/AU.png differ
diff --git a/res/flags/AW.png b/res/flags/AW.png
new file mode 100644
index 000000000..238084e4a
Binary files /dev/null and b/res/flags/AW.png differ
diff --git a/res/flags/AX.png b/res/flags/AX.png
new file mode 100644
index 000000000..07ac7742a
Binary files /dev/null and b/res/flags/AX.png differ
diff --git a/res/flags/AZ.png b/res/flags/AZ.png
new file mode 100644
index 000000000..686dbed76
Binary files /dev/null and b/res/flags/AZ.png differ
diff --git a/res/flags/BA.png b/res/flags/BA.png
new file mode 100644
index 000000000..5cfbb6d65
Binary files /dev/null and b/res/flags/BA.png differ
diff --git a/res/flags/BB.png b/res/flags/BB.png
new file mode 100644
index 000000000..dcdbae7a9
Binary files /dev/null and b/res/flags/BB.png differ
diff --git a/res/flags/BD.png b/res/flags/BD.png
new file mode 100644
index 000000000..3bd977a44
Binary files /dev/null and b/res/flags/BD.png differ
diff --git a/res/flags/BE.png b/res/flags/BE.png
new file mode 100644
index 000000000..555ac8bb7
Binary files /dev/null and b/res/flags/BE.png differ
diff --git a/res/flags/BF.png b/res/flags/BF.png
new file mode 100644
index 000000000..5a80be2aa
Binary files /dev/null and b/res/flags/BF.png differ
diff --git a/res/flags/BG.png b/res/flags/BG.png
new file mode 100644
index 000000000..6d8be358f
Binary files /dev/null and b/res/flags/BG.png differ
diff --git a/res/flags/BH.png b/res/flags/BH.png
new file mode 100644
index 000000000..0d98e0e05
Binary files /dev/null and b/res/flags/BH.png differ
diff --git a/res/flags/BI.png b/res/flags/BI.png
new file mode 100644
index 000000000..e2659e3bc
Binary files /dev/null and b/res/flags/BI.png differ
diff --git a/res/flags/BJ.png b/res/flags/BJ.png
new file mode 100644
index 000000000..13fa3c91e
Binary files /dev/null and b/res/flags/BJ.png differ
diff --git a/res/flags/BL.png b/res/flags/BL.png
new file mode 100644
index 000000000..8e50a7960
Binary files /dev/null and b/res/flags/BL.png differ
diff --git a/res/flags/BM.png b/res/flags/BM.png
new file mode 100644
index 000000000..53de7c39b
Binary files /dev/null and b/res/flags/BM.png differ
diff --git a/res/flags/BN.png b/res/flags/BN.png
new file mode 100644
index 000000000..3ed976ebf
Binary files /dev/null and b/res/flags/BN.png differ
diff --git a/res/flags/BO.png b/res/flags/BO.png
new file mode 100644
index 000000000..8e20ea8ce
Binary files /dev/null and b/res/flags/BO.png differ
diff --git a/res/flags/BQ.png b/res/flags/BQ.png
new file mode 100644
index 000000000..154722660
Binary files /dev/null and b/res/flags/BQ.png differ
diff --git a/res/flags/BR.png b/res/flags/BR.png
new file mode 100644
index 000000000..7a2bc17ad
Binary files /dev/null and b/res/flags/BR.png differ
diff --git a/res/flags/BS.png b/res/flags/BS.png
new file mode 100644
index 000000000..2a152575c
Binary files /dev/null and b/res/flags/BS.png differ
diff --git a/res/flags/BT.png b/res/flags/BT.png
new file mode 100644
index 000000000..4782cf34a
Binary files /dev/null and b/res/flags/BT.png differ
diff --git a/res/flags/BV.png b/res/flags/BV.png
new file mode 100644
index 000000000..991a6cd76
Binary files /dev/null and b/res/flags/BV.png differ
diff --git a/res/flags/BW.png b/res/flags/BW.png
new file mode 100644
index 000000000..cd7889552
Binary files /dev/null and b/res/flags/BW.png differ
diff --git a/res/flags/BY.png b/res/flags/BY.png
new file mode 100644
index 000000000..40cdd8a7d
Binary files /dev/null and b/res/flags/BY.png differ
diff --git a/res/flags/BZ.png b/res/flags/BZ.png
new file mode 100644
index 000000000..5de79b763
Binary files /dev/null and b/res/flags/BZ.png differ
diff --git a/res/flags/CA.png b/res/flags/CA.png
new file mode 100644
index 000000000..68bcac999
Binary files /dev/null and b/res/flags/CA.png differ
diff --git a/res/flags/CC.png b/res/flags/CC.png
new file mode 100644
index 000000000..13fe2b7f4
Binary files /dev/null and b/res/flags/CC.png differ
diff --git a/res/flags/CD.png b/res/flags/CD.png
new file mode 100644
index 000000000..c19304093
Binary files /dev/null and b/res/flags/CD.png differ
diff --git a/res/flags/CF.png b/res/flags/CF.png
new file mode 100644
index 000000000..6df775077
Binary files /dev/null and b/res/flags/CF.png differ
diff --git a/res/flags/CG.png b/res/flags/CG.png
new file mode 100644
index 000000000..2d37cd50a
Binary files /dev/null and b/res/flags/CG.png differ
diff --git a/res/flags/CH.png b/res/flags/CH.png
new file mode 100644
index 000000000..00d387172
Binary files /dev/null and b/res/flags/CH.png differ
diff --git a/res/flags/CI.png b/res/flags/CI.png
new file mode 100644
index 000000000..82c7606ee
Binary files /dev/null and b/res/flags/CI.png differ
diff --git a/res/flags/CK.png b/res/flags/CK.png
new file mode 100644
index 000000000..26bca5f9c
Binary files /dev/null and b/res/flags/CK.png differ
diff --git a/res/flags/CL.png b/res/flags/CL.png
new file mode 100644
index 000000000..317ec573f
Binary files /dev/null and b/res/flags/CL.png differ
diff --git a/res/flags/CM.png b/res/flags/CM.png
new file mode 100644
index 000000000..c5605d639
Binary files /dev/null and b/res/flags/CM.png differ
diff --git a/res/flags/CN.png b/res/flags/CN.png
new file mode 100644
index 000000000..1c25ab866
Binary files /dev/null and b/res/flags/CN.png differ
diff --git a/res/flags/CO.png b/res/flags/CO.png
new file mode 100644
index 000000000..b328c1ea8
Binary files /dev/null and b/res/flags/CO.png differ
diff --git a/res/flags/CR.png b/res/flags/CR.png
new file mode 100644
index 000000000..df959197f
Binary files /dev/null and b/res/flags/CR.png differ
diff --git a/res/flags/CU.png b/res/flags/CU.png
new file mode 100644
index 000000000..60f6a8c8f
Binary files /dev/null and b/res/flags/CU.png differ
diff --git a/res/flags/CV.png b/res/flags/CV.png
new file mode 100644
index 000000000..2dfe516d2
Binary files /dev/null and b/res/flags/CV.png differ
diff --git a/res/flags/CW.png b/res/flags/CW.png
new file mode 100644
index 000000000..2380de156
Binary files /dev/null and b/res/flags/CW.png differ
diff --git a/res/flags/CX.png b/res/flags/CX.png
new file mode 100644
index 000000000..49a51c164
Binary files /dev/null and b/res/flags/CX.png differ
diff --git a/res/flags/CY.png b/res/flags/CY.png
new file mode 100644
index 000000000..08a0e372e
Binary files /dev/null and b/res/flags/CY.png differ
diff --git a/res/flags/CZ.png b/res/flags/CZ.png
new file mode 100644
index 000000000..90ceaa242
Binary files /dev/null and b/res/flags/CZ.png differ
diff --git a/res/flags/DE.png b/res/flags/DE.png
new file mode 100644
index 000000000..90cab7e9a
Binary files /dev/null and b/res/flags/DE.png differ
diff --git a/res/flags/DJ.png b/res/flags/DJ.png
new file mode 100644
index 000000000..c424a807a
Binary files /dev/null and b/res/flags/DJ.png differ
diff --git a/res/flags/DK.png b/res/flags/DK.png
new file mode 100644
index 000000000..5a3845ad1
Binary files /dev/null and b/res/flags/DK.png differ
diff --git a/res/flags/DM.png b/res/flags/DM.png
new file mode 100644
index 000000000..e7fb60c04
Binary files /dev/null and b/res/flags/DM.png differ
diff --git a/res/flags/DO.png b/res/flags/DO.png
new file mode 100644
index 000000000..03c2f1b9d
Binary files /dev/null and b/res/flags/DO.png differ
diff --git a/res/flags/DZ.png b/res/flags/DZ.png
new file mode 100644
index 000000000..9d63939e7
Binary files /dev/null and b/res/flags/DZ.png differ
diff --git a/res/flags/EC.png b/res/flags/EC.png
new file mode 100644
index 000000000..92e2a9e92
Binary files /dev/null and b/res/flags/EC.png differ
diff --git a/res/flags/EE.png b/res/flags/EE.png
new file mode 100644
index 000000000..081568695
Binary files /dev/null and b/res/flags/EE.png differ
diff --git a/res/flags/EG.png b/res/flags/EG.png
new file mode 100644
index 000000000..7e9d6c5cc
Binary files /dev/null and b/res/flags/EG.png differ
diff --git a/res/flags/EH.png b/res/flags/EH.png
new file mode 100644
index 000000000..f8e59b21f
Binary files /dev/null and b/res/flags/EH.png differ
diff --git a/res/flags/ER.png b/res/flags/ER.png
new file mode 100644
index 000000000..ffeb28dac
Binary files /dev/null and b/res/flags/ER.png differ
diff --git a/res/flags/ES.png b/res/flags/ES.png
new file mode 100644
index 000000000..3ce59fe89
Binary files /dev/null and b/res/flags/ES.png differ
diff --git a/res/flags/ET.png b/res/flags/ET.png
new file mode 100644
index 000000000..f9d92859c
Binary files /dev/null and b/res/flags/ET.png differ
diff --git a/res/flags/FI.png b/res/flags/FI.png
new file mode 100644
index 000000000..0930988c2
Binary files /dev/null and b/res/flags/FI.png differ
diff --git a/res/flags/FJ.png b/res/flags/FJ.png
new file mode 100644
index 000000000..2a78075da
Binary files /dev/null and b/res/flags/FJ.png differ
diff --git a/res/flags/FK.png b/res/flags/FK.png
new file mode 100644
index 000000000..52543390c
Binary files /dev/null and b/res/flags/FK.png differ
diff --git a/res/flags/FM.png b/res/flags/FM.png
new file mode 100644
index 000000000..0ba546ed3
Binary files /dev/null and b/res/flags/FM.png differ
diff --git a/res/flags/FO.png b/res/flags/FO.png
new file mode 100644
index 000000000..2a0cd6457
Binary files /dev/null and b/res/flags/FO.png differ
diff --git a/res/flags/FR.png b/res/flags/FR.png
new file mode 100644
index 000000000..ef05d74bc
Binary files /dev/null and b/res/flags/FR.png differ
diff --git a/res/flags/GA.png b/res/flags/GA.png
new file mode 100644
index 000000000..6539d6dd2
Binary files /dev/null and b/res/flags/GA.png differ
diff --git a/res/flags/GB.png b/res/flags/GB.png
new file mode 100644
index 000000000..2938e61b8
Binary files /dev/null and b/res/flags/GB.png differ
diff --git a/res/flags/GD.png b/res/flags/GD.png
new file mode 100644
index 000000000..a55638e7e
Binary files /dev/null and b/res/flags/GD.png differ
diff --git a/res/flags/GE.png b/res/flags/GE.png
new file mode 100644
index 000000000..c6cfd2b06
Binary files /dev/null and b/res/flags/GE.png differ
diff --git a/res/flags/GF.png b/res/flags/GF.png
new file mode 100644
index 000000000..dfc1badff
Binary files /dev/null and b/res/flags/GF.png differ
diff --git a/res/flags/GG.png b/res/flags/GG.png
new file mode 100644
index 000000000..a79f8c1f3
Binary files /dev/null and b/res/flags/GG.png differ
diff --git a/res/flags/GH.png b/res/flags/GH.png
new file mode 100644
index 000000000..bda5d6f66
Binary files /dev/null and b/res/flags/GH.png differ
diff --git a/res/flags/GI.png b/res/flags/GI.png
new file mode 100644
index 000000000..620b50b3d
Binary files /dev/null and b/res/flags/GI.png differ
diff --git a/res/flags/GL.png b/res/flags/GL.png
new file mode 100644
index 000000000..c3d6bcf36
Binary files /dev/null and b/res/flags/GL.png differ
diff --git a/res/flags/GM.png b/res/flags/GM.png
new file mode 100644
index 000000000..fa2d771ee
Binary files /dev/null and b/res/flags/GM.png differ
diff --git a/res/flags/GN.png b/res/flags/GN.png
new file mode 100644
index 000000000..dabe7ce49
Binary files /dev/null and b/res/flags/GN.png differ
diff --git a/res/flags/GP.png b/res/flags/GP.png
new file mode 100644
index 000000000..7bf769563
Binary files /dev/null and b/res/flags/GP.png differ
diff --git a/res/flags/GQ.png b/res/flags/GQ.png
new file mode 100644
index 000000000..edae61e9e
Binary files /dev/null and b/res/flags/GQ.png differ
diff --git a/res/flags/GR.png b/res/flags/GR.png
new file mode 100644
index 000000000..5abc59d39
Binary files /dev/null and b/res/flags/GR.png differ
diff --git a/res/flags/GS.png b/res/flags/GS.png
new file mode 100644
index 000000000..baa930d0a
Binary files /dev/null and b/res/flags/GS.png differ
diff --git a/res/flags/GT.png b/res/flags/GT.png
new file mode 100644
index 000000000..10ef0cdd1
Binary files /dev/null and b/res/flags/GT.png differ
diff --git a/res/flags/GU.png b/res/flags/GU.png
new file mode 100644
index 000000000..166c121e1
Binary files /dev/null and b/res/flags/GU.png differ
diff --git a/res/flags/GW.png b/res/flags/GW.png
new file mode 100644
index 000000000..fb59de837
Binary files /dev/null and b/res/flags/GW.png differ
diff --git a/res/flags/GY.png b/res/flags/GY.png
new file mode 100644
index 000000000..65499a7ca
Binary files /dev/null and b/res/flags/GY.png differ
diff --git a/res/flags/HK.png b/res/flags/HK.png
new file mode 100644
index 000000000..395883840
Binary files /dev/null and b/res/flags/HK.png differ
diff --git a/res/flags/HM.png b/res/flags/HM.png
new file mode 100644
index 000000000..26a61cbff
Binary files /dev/null and b/res/flags/HM.png differ
diff --git a/res/flags/HN.png b/res/flags/HN.png
new file mode 100644
index 000000000..bf923cb81
Binary files /dev/null and b/res/flags/HN.png differ
diff --git a/res/flags/HR.png b/res/flags/HR.png
new file mode 100644
index 000000000..139e143b8
Binary files /dev/null and b/res/flags/HR.png differ
diff --git a/res/flags/HT.png b/res/flags/HT.png
new file mode 100644
index 000000000..2583da392
Binary files /dev/null and b/res/flags/HT.png differ
diff --git a/res/flags/HU.png b/res/flags/HU.png
new file mode 100644
index 000000000..625846af5
Binary files /dev/null and b/res/flags/HU.png differ
diff --git a/res/flags/ID.png b/res/flags/ID.png
new file mode 100644
index 000000000..f88d48af9
Binary files /dev/null and b/res/flags/ID.png differ
diff --git a/res/flags/IE.png b/res/flags/IE.png
new file mode 100644
index 000000000..17f255fc2
Binary files /dev/null and b/res/flags/IE.png differ
diff --git a/res/flags/IL.png b/res/flags/IL.png
new file mode 100644
index 000000000..6c9a6b57d
Binary files /dev/null and b/res/flags/IL.png differ
diff --git a/res/flags/IM.png b/res/flags/IM.png
new file mode 100644
index 000000000..936e801d7
Binary files /dev/null and b/res/flags/IM.png differ
diff --git a/res/flags/IN.png b/res/flags/IN.png
new file mode 100644
index 000000000..ecba2f9c4
Binary files /dev/null and b/res/flags/IN.png differ
diff --git a/res/flags/IO.png b/res/flags/IO.png
new file mode 100644
index 000000000..b0edb1610
Binary files /dev/null and b/res/flags/IO.png differ
diff --git a/res/flags/IQ.png b/res/flags/IQ.png
new file mode 100644
index 000000000..19055f14f
Binary files /dev/null and b/res/flags/IQ.png differ
diff --git a/res/flags/IR.png b/res/flags/IR.png
new file mode 100644
index 000000000..9056d21ec
Binary files /dev/null and b/res/flags/IR.png differ
diff --git a/res/flags/IS.png b/res/flags/IS.png
new file mode 100644
index 000000000..06be01a87
Binary files /dev/null and b/res/flags/IS.png differ
diff --git a/res/flags/IT.png b/res/flags/IT.png
new file mode 100644
index 000000000..50e17b22a
Binary files /dev/null and b/res/flags/IT.png differ
diff --git a/res/flags/JE.png b/res/flags/JE.png
new file mode 100644
index 000000000..456a1a837
Binary files /dev/null and b/res/flags/JE.png differ
diff --git a/res/flags/JM.png b/res/flags/JM.png
new file mode 100644
index 000000000..5e4e73d32
Binary files /dev/null and b/res/flags/JM.png differ
diff --git a/res/flags/JO.png b/res/flags/JO.png
new file mode 100644
index 000000000..5982705bb
Binary files /dev/null and b/res/flags/JO.png differ
diff --git a/res/flags/JP.png b/res/flags/JP.png
new file mode 100644
index 000000000..009a990a4
Binary files /dev/null and b/res/flags/JP.png differ
diff --git a/res/flags/KE.png b/res/flags/KE.png
new file mode 100644
index 000000000..b5a9f733e
Binary files /dev/null and b/res/flags/KE.png differ
diff --git a/res/flags/KG.png b/res/flags/KG.png
new file mode 100644
index 000000000..acf6646b8
Binary files /dev/null and b/res/flags/KG.png differ
diff --git a/res/flags/KH.png b/res/flags/KH.png
new file mode 100644
index 000000000..58ad9c617
Binary files /dev/null and b/res/flags/KH.png differ
diff --git a/res/flags/KI.png b/res/flags/KI.png
new file mode 100644
index 000000000..49902d25a
Binary files /dev/null and b/res/flags/KI.png differ
diff --git a/res/flags/KM.png b/res/flags/KM.png
new file mode 100644
index 000000000..9fa9a454e
Binary files /dev/null and b/res/flags/KM.png differ
diff --git a/res/flags/KN.png b/res/flags/KN.png
new file mode 100644
index 000000000..3b39f8f7a
Binary files /dev/null and b/res/flags/KN.png differ
diff --git a/res/flags/KP.png b/res/flags/KP.png
new file mode 100644
index 000000000..eacc3ad0f
Binary files /dev/null and b/res/flags/KP.png differ
diff --git a/res/flags/KR.png b/res/flags/KR.png
new file mode 100644
index 000000000..a0df8da03
Binary files /dev/null and b/res/flags/KR.png differ
diff --git a/res/flags/KW.png b/res/flags/KW.png
new file mode 100644
index 000000000..c6839950d
Binary files /dev/null and b/res/flags/KW.png differ
diff --git a/res/flags/KY.png b/res/flags/KY.png
new file mode 100644
index 000000000..3f82fa749
Binary files /dev/null and b/res/flags/KY.png differ
diff --git a/res/flags/KZ.png b/res/flags/KZ.png
new file mode 100644
index 000000000..4b4362121
Binary files /dev/null and b/res/flags/KZ.png differ
diff --git a/res/flags/LA.png b/res/flags/LA.png
new file mode 100644
index 000000000..ee9c41ea1
Binary files /dev/null and b/res/flags/LA.png differ
diff --git a/res/flags/LB.png b/res/flags/LB.png
new file mode 100644
index 000000000..7b4d66537
Binary files /dev/null and b/res/flags/LB.png differ
diff --git a/res/flags/LC.png b/res/flags/LC.png
new file mode 100644
index 000000000..d97f8d8dc
Binary files /dev/null and b/res/flags/LC.png differ
diff --git a/res/flags/LI.png b/res/flags/LI.png
new file mode 100644
index 000000000..c75a229fa
Binary files /dev/null and b/res/flags/LI.png differ
diff --git a/res/flags/LK.png b/res/flags/LK.png
new file mode 100644
index 000000000..2ca1a0c16
Binary files /dev/null and b/res/flags/LK.png differ
diff --git a/res/flags/LR.png b/res/flags/LR.png
new file mode 100644
index 000000000..41bf4a96c
Binary files /dev/null and b/res/flags/LR.png differ
diff --git a/res/flags/LS.png b/res/flags/LS.png
new file mode 100644
index 000000000..10cf81b05
Binary files /dev/null and b/res/flags/LS.png differ
diff --git a/res/flags/LT.png b/res/flags/LT.png
new file mode 100644
index 000000000..17a36c71c
Binary files /dev/null and b/res/flags/LT.png differ
diff --git a/res/flags/LU.png b/res/flags/LU.png
new file mode 100644
index 000000000..675a891dd
Binary files /dev/null and b/res/flags/LU.png differ
diff --git a/res/flags/LV.png b/res/flags/LV.png
new file mode 100644
index 000000000..763a61202
Binary files /dev/null and b/res/flags/LV.png differ
diff --git a/res/flags/LY.png b/res/flags/LY.png
new file mode 100644
index 000000000..5211a9024
Binary files /dev/null and b/res/flags/LY.png differ
diff --git a/res/flags/MA.png b/res/flags/MA.png
new file mode 100644
index 000000000..098db5009
Binary files /dev/null and b/res/flags/MA.png differ
diff --git a/res/flags/MC.png b/res/flags/MC.png
new file mode 100644
index 000000000..8d1a98132
Binary files /dev/null and b/res/flags/MC.png differ
diff --git a/res/flags/MD.png b/res/flags/MD.png
new file mode 100644
index 000000000..6ca6f734c
Binary files /dev/null and b/res/flags/MD.png differ
diff --git a/res/flags/ME.png b/res/flags/ME.png
new file mode 100644
index 000000000..c7fccac3b
Binary files /dev/null and b/res/flags/ME.png differ
diff --git a/res/flags/MF.png b/res/flags/MF.png
new file mode 100644
index 000000000..7f6824e0a
Binary files /dev/null and b/res/flags/MF.png differ
diff --git a/res/flags/MG.png b/res/flags/MG.png
new file mode 100644
index 000000000..55bc89850
Binary files /dev/null and b/res/flags/MG.png differ
diff --git a/res/flags/MH.png b/res/flags/MH.png
new file mode 100644
index 000000000..448497794
Binary files /dev/null and b/res/flags/MH.png differ
diff --git a/res/flags/MK.png b/res/flags/MK.png
new file mode 100644
index 000000000..ef8d2e55e
Binary files /dev/null and b/res/flags/MK.png differ
diff --git a/res/flags/ML.png b/res/flags/ML.png
new file mode 100644
index 000000000..b8c5737f3
Binary files /dev/null and b/res/flags/ML.png differ
diff --git a/res/flags/MM.png b/res/flags/MM.png
new file mode 100644
index 000000000..afac49405
Binary files /dev/null and b/res/flags/MM.png differ
diff --git a/res/flags/MN.png b/res/flags/MN.png
new file mode 100644
index 000000000..6e3de3381
Binary files /dev/null and b/res/flags/MN.png differ
diff --git a/res/flags/MO.png b/res/flags/MO.png
new file mode 100644
index 000000000..02118edf4
Binary files /dev/null and b/res/flags/MO.png differ
diff --git a/res/flags/MP.png b/res/flags/MP.png
new file mode 100644
index 000000000..a85be51b1
Binary files /dev/null and b/res/flags/MP.png differ
diff --git a/res/flags/MQ.png b/res/flags/MQ.png
new file mode 100644
index 000000000..92eb07275
Binary files /dev/null and b/res/flags/MQ.png differ
diff --git a/res/flags/MR.png b/res/flags/MR.png
new file mode 100644
index 000000000..95a527265
Binary files /dev/null and b/res/flags/MR.png differ
diff --git a/res/flags/MS.png b/res/flags/MS.png
new file mode 100644
index 000000000..a811c5bd0
Binary files /dev/null and b/res/flags/MS.png differ
diff --git a/res/flags/MT.png b/res/flags/MT.png
new file mode 100644
index 000000000..857672bf3
Binary files /dev/null and b/res/flags/MT.png differ
diff --git a/res/flags/MU.png b/res/flags/MU.png
new file mode 100644
index 000000000..8f6abb733
Binary files /dev/null and b/res/flags/MU.png differ
diff --git a/res/flags/MV.png b/res/flags/MV.png
new file mode 100644
index 000000000..bdb8119f5
Binary files /dev/null and b/res/flags/MV.png differ
diff --git a/res/flags/MW.png b/res/flags/MW.png
new file mode 100644
index 000000000..c684776a3
Binary files /dev/null and b/res/flags/MW.png differ
diff --git a/res/flags/MX.png b/res/flags/MX.png
new file mode 100644
index 000000000..aee282de3
Binary files /dev/null and b/res/flags/MX.png differ
diff --git a/res/flags/MY.png b/res/flags/MY.png
new file mode 100644
index 000000000..3941aa8cb
Binary files /dev/null and b/res/flags/MY.png differ
diff --git a/res/flags/MZ.png b/res/flags/MZ.png
new file mode 100644
index 000000000..dd497c23c
Binary files /dev/null and b/res/flags/MZ.png differ
diff --git a/res/flags/NA.png b/res/flags/NA.png
new file mode 100644
index 000000000..68e4aeabe
Binary files /dev/null and b/res/flags/NA.png differ
diff --git a/res/flags/NC.png b/res/flags/NC.png
new file mode 100644
index 000000000..ffcc21662
Binary files /dev/null and b/res/flags/NC.png differ
diff --git a/res/flags/NE.png b/res/flags/NE.png
new file mode 100644
index 000000000..08950d2f3
Binary files /dev/null and b/res/flags/NE.png differ
diff --git a/res/flags/NF.png b/res/flags/NF.png
new file mode 100644
index 000000000..2728ed548
Binary files /dev/null and b/res/flags/NF.png differ
diff --git a/res/flags/NG.png b/res/flags/NG.png
new file mode 100644
index 000000000..5812b2d29
Binary files /dev/null and b/res/flags/NG.png differ
diff --git a/res/flags/NI.png b/res/flags/NI.png
new file mode 100644
index 000000000..d09e13295
Binary files /dev/null and b/res/flags/NI.png differ
diff --git a/res/flags/NL.png b/res/flags/NL.png
new file mode 100644
index 000000000..f92032827
Binary files /dev/null and b/res/flags/NL.png differ
diff --git a/res/flags/NO.png b/res/flags/NO.png
new file mode 100644
index 000000000..0bedee3f1
Binary files /dev/null and b/res/flags/NO.png differ
diff --git a/res/flags/NP.png b/res/flags/NP.png
new file mode 100644
index 000000000..e7775c251
Binary files /dev/null and b/res/flags/NP.png differ
diff --git a/res/flags/NR.png b/res/flags/NR.png
new file mode 100644
index 000000000..4760404ba
Binary files /dev/null and b/res/flags/NR.png differ
diff --git a/res/flags/NU.png b/res/flags/NU.png
new file mode 100644
index 000000000..7c130d5b8
Binary files /dev/null and b/res/flags/NU.png differ
diff --git a/res/flags/NZ.png b/res/flags/NZ.png
new file mode 100644
index 000000000..67c98728f
Binary files /dev/null and b/res/flags/NZ.png differ
diff --git a/res/flags/OM.png b/res/flags/OM.png
new file mode 100644
index 000000000..a6762503f
Binary files /dev/null and b/res/flags/OM.png differ
diff --git a/res/flags/PA.png b/res/flags/PA.png
new file mode 100644
index 000000000..ed18bddaf
Binary files /dev/null and b/res/flags/PA.png differ
diff --git a/res/flags/PE.png b/res/flags/PE.png
new file mode 100644
index 000000000..7485279cb
Binary files /dev/null and b/res/flags/PE.png differ
diff --git a/res/flags/PF.png b/res/flags/PF.png
new file mode 100644
index 000000000..6623f4134
Binary files /dev/null and b/res/flags/PF.png differ
diff --git a/res/flags/PG.png b/res/flags/PG.png
new file mode 100644
index 000000000..92504c514
Binary files /dev/null and b/res/flags/PG.png differ
diff --git a/res/flags/PH.png b/res/flags/PH.png
new file mode 100644
index 000000000..d6d676210
Binary files /dev/null and b/res/flags/PH.png differ
diff --git a/res/flags/PK.png b/res/flags/PK.png
new file mode 100644
index 000000000..f7c8bb94e
Binary files /dev/null and b/res/flags/PK.png differ
diff --git a/res/flags/PL.png b/res/flags/PL.png
new file mode 100644
index 000000000..8303b1ea8
Binary files /dev/null and b/res/flags/PL.png differ
diff --git a/res/flags/PM.png b/res/flags/PM.png
new file mode 100644
index 000000000..2507c86ea
Binary files /dev/null and b/res/flags/PM.png differ
diff --git a/res/flags/PN.png b/res/flags/PN.png
new file mode 100644
index 000000000..c5e1d8846
Binary files /dev/null and b/res/flags/PN.png differ
diff --git a/res/flags/PR.png b/res/flags/PR.png
new file mode 100644
index 000000000..938c83502
Binary files /dev/null and b/res/flags/PR.png differ
diff --git a/res/flags/PS.png b/res/flags/PS.png
new file mode 100644
index 000000000..d106ba89f
Binary files /dev/null and b/res/flags/PS.png differ
diff --git a/res/flags/PT.png b/res/flags/PT.png
new file mode 100644
index 000000000..168f06057
Binary files /dev/null and b/res/flags/PT.png differ
diff --git a/res/flags/PW.png b/res/flags/PW.png
new file mode 100644
index 000000000..2d6e5d5b5
Binary files /dev/null and b/res/flags/PW.png differ
diff --git a/res/flags/PY.png b/res/flags/PY.png
new file mode 100644
index 000000000..9cae9a780
Binary files /dev/null and b/res/flags/PY.png differ
diff --git a/res/flags/QA.png b/res/flags/QA.png
new file mode 100644
index 000000000..ce9d31eda
Binary files /dev/null and b/res/flags/QA.png differ
diff --git a/res/flags/RE.png b/res/flags/RE.png
new file mode 100644
index 000000000..85c257102
Binary files /dev/null and b/res/flags/RE.png differ
diff --git a/res/flags/RO.png b/res/flags/RO.png
new file mode 100644
index 000000000..e77996d5a
Binary files /dev/null and b/res/flags/RO.png differ
diff --git a/res/flags/RS.png b/res/flags/RS.png
new file mode 100644
index 000000000..fc7a2ab71
Binary files /dev/null and b/res/flags/RS.png differ
diff --git a/res/flags/RU.png b/res/flags/RU.png
new file mode 100644
index 000000000..8b3df7798
Binary files /dev/null and b/res/flags/RU.png differ
diff --git a/res/flags/RW.png b/res/flags/RW.png
new file mode 100644
index 000000000..87f718674
Binary files /dev/null and b/res/flags/RW.png differ
diff --git a/res/flags/SA.png b/res/flags/SA.png
new file mode 100644
index 000000000..d93b91c7c
Binary files /dev/null and b/res/flags/SA.png differ
diff --git a/res/flags/SB.png b/res/flags/SB.png
new file mode 100644
index 000000000..e9a2a8f3f
Binary files /dev/null and b/res/flags/SB.png differ
diff --git a/res/flags/SC.png b/res/flags/SC.png
new file mode 100644
index 000000000..488ac3bef
Binary files /dev/null and b/res/flags/SC.png differ
diff --git a/res/flags/SD.png b/res/flags/SD.png
new file mode 100644
index 000000000..6ba8c5cac
Binary files /dev/null and b/res/flags/SD.png differ
diff --git a/res/flags/SE.png b/res/flags/SE.png
new file mode 100644
index 000000000..e7bd806f4
Binary files /dev/null and b/res/flags/SE.png differ
diff --git a/res/flags/SG.png b/res/flags/SG.png
new file mode 100644
index 000000000..797069fc9
Binary files /dev/null and b/res/flags/SG.png differ
diff --git a/res/flags/SH.png b/res/flags/SH.png
new file mode 100644
index 000000000..b2c589d0c
Binary files /dev/null and b/res/flags/SH.png differ
diff --git a/res/flags/SI.png b/res/flags/SI.png
new file mode 100644
index 000000000..be8e7a897
Binary files /dev/null and b/res/flags/SI.png differ
diff --git a/res/flags/SJ.png b/res/flags/SJ.png
new file mode 100644
index 000000000..1dd7e7862
Binary files /dev/null and b/res/flags/SJ.png differ
diff --git a/res/flags/SK.png b/res/flags/SK.png
new file mode 100644
index 000000000..be3d10f22
Binary files /dev/null and b/res/flags/SK.png differ
diff --git a/res/flags/SL.png b/res/flags/SL.png
new file mode 100644
index 000000000..b3f997b16
Binary files /dev/null and b/res/flags/SL.png differ
diff --git a/res/flags/SM.png b/res/flags/SM.png
new file mode 100644
index 000000000..b30f77ad6
Binary files /dev/null and b/res/flags/SM.png differ
diff --git a/res/flags/SN.png b/res/flags/SN.png
new file mode 100644
index 000000000..b5cdb2101
Binary files /dev/null and b/res/flags/SN.png differ
diff --git a/res/flags/SO.png b/res/flags/SO.png
new file mode 100644
index 000000000..5f8085083
Binary files /dev/null and b/res/flags/SO.png differ
diff --git a/res/flags/SR.png b/res/flags/SR.png
new file mode 100644
index 000000000..a2d124e92
Binary files /dev/null and b/res/flags/SR.png differ
diff --git a/res/flags/SS.png b/res/flags/SS.png
new file mode 100644
index 000000000..19c65899c
Binary files /dev/null and b/res/flags/SS.png differ
diff --git a/res/flags/ST.png b/res/flags/ST.png
new file mode 100644
index 000000000..1d2befe46
Binary files /dev/null and b/res/flags/ST.png differ
diff --git a/res/flags/SV.png b/res/flags/SV.png
new file mode 100644
index 000000000..fc3a9ca40
Binary files /dev/null and b/res/flags/SV.png differ
diff --git a/res/flags/SX.png b/res/flags/SX.png
new file mode 100644
index 000000000..6051aaa62
Binary files /dev/null and b/res/flags/SX.png differ
diff --git a/res/flags/SY.png b/res/flags/SY.png
new file mode 100644
index 000000000..0d51d071f
Binary files /dev/null and b/res/flags/SY.png differ
diff --git a/res/flags/SZ.png b/res/flags/SZ.png
new file mode 100644
index 000000000..a7366cb63
Binary files /dev/null and b/res/flags/SZ.png differ
diff --git a/res/flags/TC.png b/res/flags/TC.png
new file mode 100644
index 000000000..39971bb9b
Binary files /dev/null and b/res/flags/TC.png differ
diff --git a/res/flags/TD.png b/res/flags/TD.png
new file mode 100644
index 000000000..1fb647d48
Binary files /dev/null and b/res/flags/TD.png differ
diff --git a/res/flags/TF.png b/res/flags/TF.png
new file mode 100644
index 000000000..41bd93343
Binary files /dev/null and b/res/flags/TF.png differ
diff --git a/res/flags/TG.png b/res/flags/TG.png
new file mode 100644
index 000000000..560fc0988
Binary files /dev/null and b/res/flags/TG.png differ
diff --git a/res/flags/TH.png b/res/flags/TH.png
new file mode 100644
index 000000000..9ee5ce899
Binary files /dev/null and b/res/flags/TH.png differ
diff --git a/res/flags/TJ.png b/res/flags/TJ.png
new file mode 100644
index 000000000..ca4be0773
Binary files /dev/null and b/res/flags/TJ.png differ
diff --git a/res/flags/TK.png b/res/flags/TK.png
new file mode 100644
index 000000000..88a7eb1a2
Binary files /dev/null and b/res/flags/TK.png differ
diff --git a/res/flags/TL.png b/res/flags/TL.png
new file mode 100644
index 000000000..fa6c365b9
Binary files /dev/null and b/res/flags/TL.png differ
diff --git a/res/flags/TM.png b/res/flags/TM.png
new file mode 100644
index 000000000..6cc0539da
Binary files /dev/null and b/res/flags/TM.png differ
diff --git a/res/flags/TN.png b/res/flags/TN.png
new file mode 100644
index 000000000..1cc09ec6f
Binary files /dev/null and b/res/flags/TN.png differ
diff --git a/res/flags/TO.png b/res/flags/TO.png
new file mode 100644
index 000000000..44c42ce0d
Binary files /dev/null and b/res/flags/TO.png differ
diff --git a/res/flags/TR.png b/res/flags/TR.png
new file mode 100644
index 000000000..4e63d61b9
Binary files /dev/null and b/res/flags/TR.png differ
diff --git a/res/flags/TT.png b/res/flags/TT.png
new file mode 100644
index 000000000..3831347f5
Binary files /dev/null and b/res/flags/TT.png differ
diff --git a/res/flags/TV.png b/res/flags/TV.png
new file mode 100644
index 000000000..2f24fbf72
Binary files /dev/null and b/res/flags/TV.png differ
diff --git a/res/flags/TW.png b/res/flags/TW.png
new file mode 100644
index 000000000..cda05c9b4
Binary files /dev/null and b/res/flags/TW.png differ
diff --git a/res/flags/TZ.png b/res/flags/TZ.png
new file mode 100644
index 000000000..a60d5b3fa
Binary files /dev/null and b/res/flags/TZ.png differ
diff --git a/res/flags/UA.png b/res/flags/UA.png
new file mode 100644
index 000000000..f62089b69
Binary files /dev/null and b/res/flags/UA.png differ
diff --git a/res/flags/UG.png b/res/flags/UG.png
new file mode 100644
index 000000000..8fb590e86
Binary files /dev/null and b/res/flags/UG.png differ
diff --git a/res/flags/US.png b/res/flags/US.png
new file mode 100644
index 000000000..f6b7ab982
Binary files /dev/null and b/res/flags/US.png differ
diff --git a/res/flags/UY.png b/res/flags/UY.png
new file mode 100644
index 000000000..11abe8c10
Binary files /dev/null and b/res/flags/UY.png differ
diff --git a/res/flags/UZ.png b/res/flags/UZ.png
new file mode 100644
index 000000000..5d9168a3e
Binary files /dev/null and b/res/flags/UZ.png differ
diff --git a/res/flags/VA.png b/res/flags/VA.png
new file mode 100644
index 000000000..4e5a92bdd
Binary files /dev/null and b/res/flags/VA.png differ
diff --git a/res/flags/VC.png b/res/flags/VC.png
new file mode 100644
index 000000000..4a8dfa41e
Binary files /dev/null and b/res/flags/VC.png differ
diff --git a/res/flags/VE.png b/res/flags/VE.png
new file mode 100644
index 000000000..3632def0c
Binary files /dev/null and b/res/flags/VE.png differ
diff --git a/res/flags/VG.png b/res/flags/VG.png
new file mode 100644
index 000000000..15a5e5fad
Binary files /dev/null and b/res/flags/VG.png differ
diff --git a/res/flags/VI.png b/res/flags/VI.png
new file mode 100644
index 000000000..986a53d2f
Binary files /dev/null and b/res/flags/VI.png differ
diff --git a/res/flags/VN.png b/res/flags/VN.png
new file mode 100644
index 000000000..f19db790e
Binary files /dev/null and b/res/flags/VN.png differ
diff --git a/res/flags/VU.png b/res/flags/VU.png
new file mode 100644
index 000000000..a322030a2
Binary files /dev/null and b/res/flags/VU.png differ
diff --git a/res/flags/WF.png b/res/flags/WF.png
new file mode 100644
index 000000000..5f6e2beda
Binary files /dev/null and b/res/flags/WF.png differ
diff --git a/res/flags/WS.png b/res/flags/WS.png
new file mode 100644
index 000000000..de43a3731
Binary files /dev/null and b/res/flags/WS.png differ
diff --git a/res/flags/YE.png b/res/flags/YE.png
new file mode 100644
index 000000000..b132bc13c
Binary files /dev/null and b/res/flags/YE.png differ
diff --git a/res/flags/YT.png b/res/flags/YT.png
new file mode 100644
index 000000000..5c450dfb9
Binary files /dev/null and b/res/flags/YT.png differ
diff --git a/res/flags/ZA.png b/res/flags/ZA.png
new file mode 100644
index 000000000..adec062d1
Binary files /dev/null and b/res/flags/ZA.png differ
diff --git a/res/flags/ZM.png b/res/flags/ZM.png
new file mode 100644
index 000000000..56287f589
Binary files /dev/null and b/res/flags/ZM.png differ
diff --git a/res/flags/ZW.png b/res/flags/ZW.png
new file mode 100644
index 000000000..e58dff382
Binary files /dev/null and b/res/flags/ZW.png differ
diff --git a/scripts/copy-res.js b/scripts/copy-res.js
index 5a43c4e6e..d3a2ee5e7 100755
--- a/scripts/copy-res.js
+++ b/scripts/copy-res.js
@@ -9,6 +9,7 @@
const COPY_LIST = [
["res/manifest.json", "webapp"],
["res/{media,vector-icons}/**", "webapp"],
+ ["res/flags/*", "webapp/flags/"],
["src/skins/vector/{fonts,img}/**", "webapp"],
["node_modules/emojione/assets/svg/*", "webapp/emojione/svg/"],
["node_modules/emojione/assets/png/*", "webapp/emojione/png/"],
diff --git a/scripts/electron-package.sh b/scripts/electron-package.sh
index a5718df83..973ea45e8 100755
--- a/scripts/electron-package.sh
+++ b/scripts/electron-package.sh
@@ -63,7 +63,7 @@ fi
if [ ! -f package.json ]; then
echo "No package.json found. This script must be run from"
- echo "the vector-web directory."
+ echo "the riot-web directory."
exit
fi
diff --git a/scripts/fetch-develop.deps.sh b/scripts/fetch-develop.deps.sh
new file mode 100755
index 000000000..c3bfb4e16
--- /dev/null
+++ b/scripts/fetch-develop.deps.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# Fetches the js-sdk and matrix-react-sdk dependencies for development
+# or testing purposes
+# If there exists a branch of that dependency with the same name as
+# the branch the current checkout is on, use that branch. Otherwise,
+# use develop.
+
+# Look in the many different CI env vars for which branch we're
+# building
+if [[ "$TRAVIS" == true ]]; then
+ curbranch="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
+else
+ # ghprbSourceBranch for jenkins github pull request builder
+ # GIT_BRANCH for other jenkins builds
+ curbranch="${ghprbSourceBranch:-$GIT_BRANCH}"
+ # Otherwise look at the actual branch we're on
+ if [ -z "$curbranch" ]
+ then
+ curbranch=`git rev-parse --abbrev-ref HEAD`
+ fi
+fi
+
+echo "Determined branch to be $curbranch"
+
+function dodep() {
+ org=$1
+ repo=$2
+ rm -rf $repo || true
+ git clone https://github.com/$org/$repo.git $repo
+ pushd $repo
+ git checkout $curbranch || git checkout develop
+ echo "$repo set to branch "`git rev-parse --abbrev-ref HEAD`
+ popd
+}
+
+dodep matrix-org matrix-js-sdk
+dodep matrix-org matrix-react-sdk
+
+mkdir -p node_modules
+cd node_modules
+
+ln -s ../matrix-js-sdk ./
+pushd matrix-js-sdk
+npm install
+popd
+
+ln -s ../matrix-react-sdk ./
+pushd matrix-react-sdk
+mkdir -p node_modules
+cd node_modules
+ln -s ../../matrix-js-sdk matrix-js-sdk
+cd ..
+npm install
+popd
+# Link the reskindex binary in place: if we used npm link,
+# npm would do this for us, but we don't because we'd have
+# to define the npm prefix somewhere so it could put the
+# intermediate symlinks there. Instead, we do it ourselves.
+mkdir -p .bin
+ln -sf ../matrix-react-sdk/scripts/reskindex.js .bin/reskindex
diff --git a/scripts/genflags.sh b/scripts/genflags.sh
new file mode 100755
index 000000000..826a0299f
--- /dev/null
+++ b/scripts/genflags.sh
@@ -0,0 +1,66 @@
+# Copyright 2017 Vector Creations 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.
+
+# genflags.sh - Generates pngs for use with CountryDropdown.js
+#
+# Dependencies:
+# - imagemagick --with-rsvg (because default imagemagick SVG
+# renderer does not produce accurate results)
+#
+# This will clone the googlei18n flag repo before converting
+# all phonenumber.js-supported country flags (as SVGs) into
+# PNGs that can be used by CountryDropdown.js.
+
+# Allow CTRL+C to terminate the script
+trap "echo Exited!; exit;" SIGINT SIGTERM
+
+# git clone the google repo to get flag SVGs
+git clone git@github.com:googlei18n/region-flags
+for f in region-flags/svg/*.svg; do
+ # Skip state flags
+ if [[ $f =~ [A-Z]{2}-[A-Z]{2,3}.svg ]] ; then
+ echo "Skipping state flag "$f
+ continue
+ fi
+
+ # Skip countries not included in phonenumber.js
+ if [[ $f =~ (AC|CP|DG|EA|EU|IC|TA|UM|UN|XK).svg ]] ; then
+ echo "Skipping non-phonenumber supported flag "$f
+ continue
+ fi
+
+ # Run imagemagick convert
+ # -background none : transparent background
+ # -thumbnail 25x15 : resize the flag to have a height of 15.
+ # By default, aspect ratio is respected so the width will
+ # be correct and not necessarily 25px.
+ # -gravity Center : keep the image central when adding an -extent
+ # -border 1 : add a 1px border around the flag
+ # -bordercolor : set the border colour
+ # -extent 27x27 : surround the image with padding so that it
+ # has the dimensions 27x27.
+ convert $f -background none -thumbnail 25x15 \
+ -gravity Center -border 1 -bordercolor \#e0e0e0 \
+ -extent 27x27 $f.png
+
+ # $f.png will be region-flags/svg/XX.svg.png at this point
+
+ # Extract filename from path $f
+ newname=${f##*/}
+ # Replace .svg with .png
+ newname=${newname%.svg}.png
+ # Move the file to flags directory
+ mv $f.png res/flags/$newname
+ echo "Generated res/flags/"$newname
+done
diff --git a/scripts/issues-burndown.pl b/scripts/issues-burndown.pl
index 67c05673d..03af5ed7c 100755
--- a/scripts/issues-burndown.pl
+++ b/scripts/issues-burndown.pl
@@ -18,7 +18,7 @@ my $gh = Net::GitHub->new(
login => 'ara4n', pass => read_password("github password: "),
);
-$gh->set_default_user_repo('vector-im', 'vector-web');
+$gh->set_default_user_repo('vector-im', 'riot-web');
#my @issues = $gh->issue->repos_issues({ state => 'all', milestone => 3 });
my @issues = $gh->issue->repos_issues({ state => 'all' });
diff --git a/scripts/issues-no-state.pl b/scripts/issues-no-state.pl
index 9b07ed271..748809c59 100755
--- a/scripts/issues-no-state.pl
+++ b/scripts/issues-no-state.pl
@@ -18,7 +18,7 @@ my $gh = Net::GitHub->new(
login => 'ara4n', pass => read_password("github password: "),
);
-$gh->set_default_user_repo('vector-im', 'vector-web');
+$gh->set_default_user_repo('vector-im', 'riot-web');
#my @issues = $gh->issue->repos_issues({ state => 'all', milestone => 3 });
my @issues = $gh->issue->repos_issues({ state => 'all' });
@@ -42,7 +42,7 @@ my $now = DateTime->now();
foreach my $issue (@issues) {
next if ($issue->{pull_request});
-
+
use Data::Dumper;
print STDERR Dumper($issue);
diff --git a/scripts/jenkins.sh b/scripts/jenkins.sh
index 0d441cdd7..17f86fe12 100755
--- a/scripts/jenkins.sh
+++ b/scripts/jenkins.sh
@@ -8,10 +8,13 @@ nvm use 6
set -x
+# check out corresponding branches of dependencies
+`dirname $0`/fetch-develop.deps.sh
+
npm install
# apparently npm 3.10.3 on node 6.4.0 doesn't upgrade #develop target with npm install unless explicitly asked.
-npm install matrix-react-sdk matrix-js-sdk olm
+npm install olm
# install olm. A naive 'npm i ./olm/olm-*.tgz' fails because it uses the url
# from our package.json (or even matrix-js-sdk's) in preference.
@@ -23,18 +26,13 @@ npm install matrix-react-sdk matrix-js-sdk olm
#rm -r node_modules/olm
#cp -r olm/package node_modules/olm
-
-# we may be using dev branches of js-sdk and react-sdk, in which case we need to build them
-(cd node_modules/matrix-js-sdk && npm install)
-(cd node_modules/matrix-react-sdk && npm install)
-
# run the mocha tests
npm run test
# run eslint
npm run lintall -- -f checkstyle -o eslint.xml || true
-rm dist/vector-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
+rm dist/riot-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
# node_modules deps from 'npm install' don't have a .git dir so can't
# rev-parse; but they do set the commit in package.json under 'gitHead' which
diff --git a/scripts/package.sh b/scripts/package.sh
index b3bc00bf0..23d0925b0 100755
--- a/scripts/package.sh
+++ b/scripts/package.sh
@@ -21,17 +21,17 @@ npm run build$dev
cp config.sample.json webapp/
mkdir -p dist
-cp -r webapp vector-$version
+cp -r webapp riot-$version
# if $version looks like semver with leading v, strip it before writing to file
if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
- echo ${version:1} > vector-$version/version
+ echo ${version:1} > riot-$version/version
else
- echo ${version} > vector-$version/version
+ echo ${version} > riot-$version/version
fi
-tar chvzf dist/vector-$version.tar.gz vector-$version
-rm -r vector-$version
+tar chvzf dist/riot-$version.tar.gz riot-$version
+rm -r riot-$version
echo
-echo "Packaged dist/vector-$version.tar.gz"
+echo "Packaged dist/riot-$version.tar.gz"
diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js
index 63dfac60d..f378cac62 100644
--- a/src/components/structures/BottomLeftMenu.js
+++ b/src/components/structures/BottomLeftMenu.js
@@ -1,6 +1,5 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
-Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,8 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import React from 'react';
-import sdk from 'matrix-react-sdk';
+'use strict';
+
+var React = require('react');
+var ReactDOM = require('react-dom');
+var sdk = require('matrix-react-sdk')
+var dis = require('matrix-react-sdk/lib/dispatcher');
+var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton');
module.exports = React.createClass({
displayName: 'BottomLeftMenu',
@@ -26,28 +30,121 @@ module.exports = React.createClass({
teamToken: React.PropTypes.string,
},
+ getInitialState: function() {
+ return({
+ directoryHover : false,
+ roomsHover : false,
+ homeHover: false,
+ peopleHover : false,
+ settingsHover : false,
+ });
+ },
+
+ // Room events
+ onDirectoryClick: function() {
+ dis.dispatch({ action: 'view_room_directory' });
+ },
+
+ onDirectoryMouseEnter: function() {
+ this.setState({ directoryHover: true });
+ },
+
+ onDirectoryMouseLeave: function() {
+ this.setState({ directoryHover: false });
+ },
+
+ onRoomsClick: function() {
+ dis.dispatch({ action: 'view_create_room' });
+ },
+
+ onRoomsMouseEnter: function() {
+ this.setState({ roomsHover: true });
+ },
+
+ onRoomsMouseLeave: function() {
+ this.setState({ roomsHover: false });
+ },
+
+ // Home button events
+ onHomeClick: function() {
+ dis.dispatch({ action: 'view_home_page' });
+ },
+
+ onHomeMouseEnter: function() {
+ this.setState({ homeHover: true });
+ },
+
+ onHomeMouseLeave: function() {
+ this.setState({ homeHover: false });
+ },
+
+ // People events
+ onPeopleClick: function() {
+ dis.dispatch({ action: 'view_create_chat' });
+ },
+
+ onPeopleMouseEnter: function() {
+ this.setState({ peopleHover: true });
+ },
+
+ onPeopleMouseLeave: function() {
+ this.setState({ peopleHover: false });
+ },
+
+ // Settings events
+ onSettingsClick: function() {
+ dis.dispatch({ action: 'view_user_settings' });
+ },
+
+ onSettingsMouseEnter: function() {
+ this.setState({ settingsHover: true });
+ },
+
+ onSettingsMouseLeave: function() {
+ this.setState({ settingsHover: false });
+ },
+
+ // Get the label/tooltip to show
+ getLabel: function(label, show) {
+ if (show) {
+ var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
+ return