diff --git a/.gitignore b/.gitignore index 573c25b10d..e74362f276 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /key.pem /lib /node_modules +/electron/node_modules /packages/ /webapp /.npmrc @@ -14,3 +15,4 @@ electron/dist electron/pub /.idea /config.json +/src/component-index.js diff --git a/.modernizr.json b/.modernizr.json index 29e620a5ba..06be8b4fa1 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/CHANGELOG.md b/CHANGELOG.md index a2ed314978..ea63ee66a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +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) + + * No changes + + +Changes in [0.9.9-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.9.9-rc.2) (2017-04-24) +==================================================================================================== +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.9-rc.1...v0.9.9-rc.2) + + * Fix bug where links to Riot would fail to open. + + +Changes in [0.9.9-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.9.9-rc.1) (2017-04-21) +==================================================================================================== +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.8...v0.9.9-rc.1) + + * Update js-sdk and matrix-react-sdk to fix registration without a captcha (https://github.com/vector-im/riot-web/issues/3621) + + Changes in [0.9.8](https://github.com/vector-im/riot-web/releases/tag/v0.9.8) (2017-04-12) ========================================================================================== [Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.8-rc.3...v0.9.8) diff --git a/README.md b/README.md index 2d7ab81b8a..55463a376e 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ To run as a desktop app: ``` npm install electron - node_modules/.bin/electron . + npm run electron ``` To build packages, use electron-builder. This is configured to output: diff --git a/config.sample.json b/config.sample.json index a65646ac77..3c513f7ab2 100644 --- a/config.sample.json +++ b/config.sample.json @@ -4,7 +4,7 @@ "brand": "Riot", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", - "bug_report_endpoint_url": "https://vector.im/bugs", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", "enableLabs": true, "roomDirectory": { "servers": [ diff --git a/electron/img/riot.ico b/electron/img/riot.ico deleted file mode 100644 index 8b681ffba3..0000000000 Binary files a/electron/img/riot.ico and /dev/null differ diff --git a/electron/img/riot.png b/electron/img/riot.png deleted file mode 100644 index fe13aa99c3..0000000000 Binary files a/electron/img/riot.png and /dev/null differ diff --git a/electron/riot.im/config.json b/electron/riot.im/config.json deleted file mode 100644 index c5bc65e1ea..0000000000 --- a/electron/riot.im/config.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "update_base_url": "https://riot.im/download/desktop/update/", - "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", - "bug_report_endpoint_url": "https://riot.im/bugreports/submit", - "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/build/icon.icns b/electron_app/build/icon.icns similarity index 100% rename from electron/build/icon.icns rename to electron_app/build/icon.icns diff --git a/electron/build/icon.ico b/electron_app/build/icon.ico similarity index 100% rename from electron/build/icon.ico rename to electron_app/build/icon.ico diff --git a/electron/build/icons/128x128.png b/electron_app/build/icons/128x128.png similarity index 100% rename from electron/build/icons/128x128.png rename to electron_app/build/icons/128x128.png diff --git a/electron/build/icons/16x16.png b/electron_app/build/icons/16x16.png similarity index 100% rename from electron/build/icons/16x16.png rename to electron_app/build/icons/16x16.png diff --git a/electron/build/icons/24x24.png b/electron_app/build/icons/24x24.png similarity index 100% rename from electron/build/icons/24x24.png rename to electron_app/build/icons/24x24.png diff --git a/electron/build/icons/256x256.png b/electron_app/build/icons/256x256.png similarity index 100% rename from electron/build/icons/256x256.png rename to electron_app/build/icons/256x256.png diff --git a/electron/build/icons/48x48.png b/electron_app/build/icons/48x48.png similarity index 100% rename from electron/build/icons/48x48.png rename to electron_app/build/icons/48x48.png diff --git a/electron/build/icons/512x512.png b/electron_app/build/icons/512x512.png similarity index 100% rename from electron/build/icons/512x512.png rename to electron_app/build/icons/512x512.png diff --git a/electron/build/icons/64x64.png b/electron_app/build/icons/64x64.png similarity index 100% rename from electron/build/icons/64x64.png rename to electron_app/build/icons/64x64.png diff --git a/electron/build/icons/96x96.png b/electron_app/build/icons/96x96.png similarity index 100% rename from electron/build/icons/96x96.png rename to electron_app/build/icons/96x96.png diff --git a/electron/build/install-spinner.gif b/electron_app/build/install-spinner.gif similarity index 100% rename from electron/build/install-spinner.gif rename to electron_app/build/install-spinner.gif diff --git a/electron_app/img/riot.ico b/electron_app/img/riot.ico new file mode 100644 index 0000000000..8f8ff94eea Binary files /dev/null and b/electron_app/img/riot.ico differ diff --git a/electron_app/img/riot.png b/electron_app/img/riot.png new file mode 100644 index 0000000000..85e9f8ca74 Binary files /dev/null and b/electron_app/img/riot.png differ diff --git a/electron_app/package.json b/electron_app/package.json new file mode 100644 index 0000000000..99651cc1c5 --- /dev/null +++ b/electron_app/package.json @@ -0,0 +1,11 @@ +{ + "name": "riot-web", + "productName": "Riot", + "main": "src/electron-main.js", + "version": "0.9.9", + "description": "A feature-rich client for Matrix.org", + "author": "Vector Creations Ltd.", + "dependencies": { + "electron-window-state": "^4.1.0" + } +} diff --git a/electron/riot.im/README b/electron_app/riot.im/README similarity index 100% rename from electron/riot.im/README rename to electron_app/riot.im/README diff --git a/electron_app/riot.im/config.json b/electron_app/riot.im/config.json new file mode 100644 index 0000000000..80526f4ab8 --- /dev/null +++ b/electron_app/riot.im/config.json @@ -0,0 +1,16 @@ +{ + "update_base_url": "https://riot.im/download/desktop/update/", + "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", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "welcomeUserId": "@riot-bot:matrix.org", + "enableLabs": true, + "roomDirectory": { + "servers": [ + "matrix.org" + ] + } +} diff --git a/electron/src/electron-main.js b/electron_app/src/electron-main.js similarity index 93% rename from electron/src/electron-main.js rename to electron_app/src/electron-main.js index a1fc9c1a6d..29a9f08a85 100644 --- a/electron/src/electron-main.js +++ b/electron_app/src/electron-main.js @@ -30,6 +30,8 @@ const tray = require('./tray'); const VectorMenu = require('./vectormenu'); +const windowStateKeeper = require('electron-window-state'); + let vectorConfig = {}; try { vectorConfig = require('../../webapp/config.json'); @@ -84,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(); } @@ -187,11 +195,21 @@ electron.app.on('ready', () => { process.platform == 'win32' ? 'ico' : 'png' ); + // Load the previous window state with fallback to defaults + let mainWindowState = windowStateKeeper({ + defaultWidth: 1024, + defaultHeight: 768, + }); + mainWindow = new electron.BrowserWindow({ icon: icon_path, - width: 1024, height: 768, show: false, autoHideMenuBar: true, + + x: mainWindowState.x, + y: mainWindowState.y, + width: mainWindowState.width, + height: mainWindowState.height, }); mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`); electron.Menu.setApplicationMenu(VectorMenu); @@ -230,6 +248,8 @@ electron.app.on('ready', () => { onLinkContextMenu(ev, params); } }); + + mainWindowState.manage(mainWindow); }); electron.app.on('window-all-closed', () => { diff --git a/electron/src/squirrelhooks.js b/electron_app/src/squirrelhooks.js similarity index 100% rename from electron/src/squirrelhooks.js rename to electron_app/src/squirrelhooks.js diff --git a/electron/src/tray.js b/electron_app/src/tray.js similarity index 100% rename from electron/src/tray.js rename to electron_app/src/tray.js diff --git a/electron/src/vectormenu.js b/electron_app/src/vectormenu.js similarity index 100% rename from electron/src/vectormenu.js rename to electron_app/src/vectormenu.js diff --git a/package.json b/package.json index 843b69dc19..dd25bf64b0 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "riot-web", "productName": "Riot", - "main": "electron/src/electron-main.js", - "version": "0.9.8", + "main": "electron_app/src/electron-main.js", + "version": "0.9.9", "description": "A feature-rich client for Matrix.org", "author": "Vector Creations Ltd.", "repository": { @@ -27,20 +27,23 @@ "matrix-react-parent": "matrix-react-sdk", "scripts": { "reskindex": "reskindex -h src/header", + "reskindex:watch": "reskindex -h src/header -w", "build:res": "node scripts/copy-res.js", "build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js", - "build:compile": "babel --source-maps -d lib src", + "build:compile": "npm run reskindex && babel --source-maps -d lib src", "build:bundle": "cross-env NODE_ENV=production webpack -p --progress", "build:bundle:dev": "webpack --optimize-occurence-order --progress", "build:electron": "npm run clean && npm run build && build -wml --ia32 --x64", - "build": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle", - "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev", + "build": "npm run reskindex && npm run build:res && npm run build:bundle", + "build:dev": "npm run reskindex && npm run build:res && npm run build:bundle:dev", "dist": "scripts/package.sh", + "install:electron": "install-app-deps", + "electron": "npm run install:electron && electron .", "start:res": "node scripts/copy-res.js -w", "start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js --output-chunk-file=bundles/_dev_/[name].js -w --progress", "start:js:prod": "cross-env NODE_ENV=production webpack-dev-server -w --progress", - "start": "node scripts/babelcheck.js && parallelshell \"npm run start:res\" \"npm run start:js\"", - "start:prod": "parallelshell \"npm run start:res\" \"npm run start:js:prod\"", + "start": "parallelshell \"npm run reskindex:watch\" \"npm run start:res\" \"npm run start:js\"", + "start:prod": "parallelshell \"npm run reskindex:watch\" \"npm run start:res\" \"npm run start:js:prod\"", "lint": "eslint src/", "lintall": "eslint src/ test/", "clean": "rimraf lib webapp electron/dist", @@ -56,8 +59,9 @@ "draft-js": "^0.8.1", "extract-text-webpack-plugin": "^0.9.1", "favico.js": "^0.3.10", - "filesize": "^3.1.2", + "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", @@ -70,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" @@ -139,16 +143,18 @@ "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, "//files": "We bundle everything, so we only need to include webapp/", "files": [ - "electron/src/**", - "electron/img/**", - "webapp/**", - "package.json" + "node_modules/**", + "src/**", + "img/**" + ], + "extraResources": [ + "webapp/**/*" ], "linux": { "target": "deb", @@ -159,10 +165,11 @@ }, "win": { "target": "squirrel" + }, + "directories": { + "buildResources": "electron_app/build", + "output": "electron_app/dist", + "app": "electron_app" } - }, - "directories": { - "buildResources": "electron/build", - "output": "electron/dist" } } diff --git a/release.sh b/release.sh index e8c68b9024..c245456051 100755 --- a/release.sh +++ b/release.sh @@ -1,12 +1,25 @@ -#!/bin/sh +#!/bin/bash # # Script to perform a release of vector-web. # -# Requires github-changelog-generator; to install, do +# Requires github-changelog-generator; to install, do # pip install git+https://github.com/matrix-org/github-changelog-generator.git set -e cd `dirname $0` + +# bump Electron's package.json first +release="${1#v}" +tag="v${release}" +echo "electron npm version" + +cd electron_app +npm version --no-git-tag-version "$release" +git commit package.json -m "$tag" + + +cd .. + exec ./node_modules/matrix-js-sdk/release.sh -z "$@" diff --git a/res/flags/AD.png b/res/flags/AD.png new file mode 100644 index 0000000000..8e777b9822 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 0000000000..1c4a2bb790 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 0000000000..7d369371f5 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 0000000000..78c03626ba 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 0000000000..8a70782310 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 0000000000..b19c7bc52d 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 0000000000..b39695fd49 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 0000000000..5aee75af1b 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 0000000000..fa76fbb278 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 0000000000..28750f42a8 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 0000000000..36ba9b34df 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 0000000000..487fee823c 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 0000000000..7004861f7f 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 0000000000..238084e4a8 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 0000000000..07ac7742ab 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 0000000000..686dbed76c 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 0000000000..5cfbb6d657 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 0000000000..dcdbae7a9a 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 0000000000..3bd977a442 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 0000000000..555ac8bb74 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 0000000000..5a80be2aaa 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 0000000000..6d8be358f9 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 0000000000..0d98e0e051 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 0000000000..e2659e3bc1 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 0000000000..13fa3c91e7 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 0000000000..8e50a79605 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 0000000000..53de7c39b2 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 0000000000..3ed976ebff 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 0000000000..8e20ea8cee 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 0000000000..1547226606 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 0000000000..7a2bc17adc 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 0000000000..2a152575c6 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 0000000000..4782cf34a6 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 0000000000..991a6cd76c 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 0000000000..cd78895521 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 0000000000..40cdd8a7dd 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 0000000000..5de79b7630 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 0000000000..68bcac9997 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 0000000000..13fe2b7f4d 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 0000000000..c19304093e 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 0000000000..6df7750774 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 0000000000..2d37cd50a8 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 0000000000..00d3871728 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 0000000000..82c7606ee9 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 0000000000..26bca5f9c9 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 0000000000..317ec573fc 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 0000000000..c5605d6391 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 0000000000..1c25ab8662 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 0000000000..b328c1ea82 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 0000000000..df959197fe 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 0000000000..60f6a8c8f2 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 0000000000..2dfe516d29 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 0000000000..2380de1568 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 0000000000..49a51c164b 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 0000000000..08a0e372e2 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 0000000000..90ceaa242a 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 0000000000..90cab7e9a4 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 0000000000..c424a807a8 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 0000000000..5a3845ad10 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 0000000000..e7fb60c04a 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 0000000000..03c2f1b9d4 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 0000000000..9d63939e7f 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 0000000000..92e2a9e929 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 0000000000..081568695f 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 0000000000..7e9d6c5cc1 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 0000000000..f8e59b21fc 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 0000000000..ffeb28dac8 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 0000000000..3ce59fe891 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 0000000000..f9d92859c4 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 0000000000..0930988c29 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 0000000000..2a78075da4 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 0000000000..52543390c7 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 0000000000..0ba546ed38 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 0000000000..2a0cd64579 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 0000000000..ef05d74bc7 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 0000000000..6539d6dd21 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 0000000000..2938e61b8b 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 0000000000..a55638e7ed 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 0000000000..c6cfd2b069 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 0000000000..dfc1badffc 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 0000000000..a79f8c1f30 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 0000000000..bda5d6f661 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 0000000000..620b50b3df 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 0000000000..c3d6bcf36b 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 0000000000..fa2d771ee2 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 0000000000..dabe7ce494 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 0000000000..7bf7695635 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 0000000000..edae61e9e8 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 0000000000..5abc59d393 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 0000000000..baa930d0a3 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 0000000000..10ef0cdd16 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 0000000000..166c121e1a 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 0000000000..fb59de837c 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 0000000000..65499a7ca3 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 0000000000..3958838402 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 0000000000..26a61cbff4 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 0000000000..bf923cb81b 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 0000000000..139e143b8f 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 0000000000..2583da392f 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 0000000000..625846af53 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 0000000000..f88d48af94 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 0000000000..17f255fc26 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 0000000000..6c9a6b57d8 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 0000000000..936e801d72 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 0000000000..ecba2f9c48 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 0000000000..b0edb1610f 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 0000000000..19055f14f7 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 0000000000..9056d21ec2 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 0000000000..06be01a879 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 0000000000..50e17b22a9 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 0000000000..456a1a837e 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 0000000000..5e4e73d325 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 0000000000..5982705bbe 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 0000000000..009a990a49 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 0000000000..b5a9f733e4 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 0000000000..acf6646b8a 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 0000000000..58ad9c6175 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 0000000000..49902d25aa 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 0000000000..9fa9a454e1 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 0000000000..3b39f8f7ae 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 0000000000..eacc3ad0fd 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 0000000000..a0df8da033 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 0000000000..c6839950d8 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 0000000000..3f82fa749e 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 0000000000..4b43621212 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 0000000000..ee9c41ea18 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 0000000000..7b4d66537f 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 0000000000..d97f8d8dc7 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 0000000000..c75a229fa8 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 0000000000..2ca1a0c167 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 0000000000..41bf4a96ce 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 0000000000..10cf81b054 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 0000000000..17a36c71ce 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 0000000000..675a891dd6 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 0000000000..763a612026 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 0000000000..5211a9024f 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 0000000000..098db5009b 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 0000000000..8d1a98132c 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 0000000000..6ca6f734c9 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 0000000000..c7fccac3b9 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 0000000000..7f6824e0ab 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 0000000000..55bc89850a 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 0000000000..4484977945 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 0000000000..ef8d2e55ee 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 0000000000..b8c5737f3d 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 0000000000..afac494059 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 0000000000..6e3de3381b 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 0000000000..02118edf4b 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 0000000000..a85be51b1b 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 0000000000..92eb07275d 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 0000000000..95a5272652 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 0000000000..a811c5bd0f 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 0000000000..857672bf3a 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 0000000000..8f6abb7331 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 0000000000..bdb8119f5f 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 0000000000..c684776a33 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 0000000000..aee282de37 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 0000000000..3941aa8cb1 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 0000000000..dd497c23c1 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 0000000000..68e4aeabe6 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 0000000000..ffcc21662b 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 0000000000..08950d2f37 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 0000000000..2728ed548b 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 0000000000..5812b2d29c 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 0000000000..d09e132955 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 0000000000..f920328273 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 0000000000..0bedee3f18 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 0000000000..e7775c2516 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 0000000000..4760404ba6 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 0000000000..7c130d5b88 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 0000000000..67c98728fc 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 0000000000..a6762503fa 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 0000000000..ed18bddaf6 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 0000000000..7485279cb6 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 0000000000..6623f41346 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 0000000000..92504c5147 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 0000000000..d6d676210d 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 0000000000..f7c8bb94e8 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 0000000000..8303b1ea89 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 0000000000..2507c86eae 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 0000000000..c5e1d88463 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 0000000000..938c83502f 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 0000000000..d106ba89fa 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 0000000000..168f060570 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 0000000000..2d6e5d5b51 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 0000000000..9cae9a780c 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 0000000000..ce9d31edaf 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 0000000000..85c2571022 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 0000000000..e77996d5ad 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 0000000000..fc7a2ab717 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 0000000000..8b3df77988 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 0000000000..87f718674e 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 0000000000..d93b91c7c4 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 0000000000..e9a2a8f3f0 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 0000000000..488ac3bef3 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 0000000000..6ba8c5cac3 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 0000000000..e7bd806f4f 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 0000000000..797069fc9e 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 0000000000..b2c589d0c5 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 0000000000..be8e7a8973 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 0000000000..1dd7e78627 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 0000000000..be3d10f221 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 0000000000..b3f997b163 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 0000000000..b30f77ad69 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 0000000000..b5cdb2101d 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 0000000000..5f80850834 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 0000000000..a2d124e92b 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 0000000000..19c65899c2 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 0000000000..1d2befe46d 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 0000000000..fc3a9ca40d 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 0000000000..6051aaa624 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 0000000000..0d51d071fb 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 0000000000..a7366cb638 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 0000000000..39971bb9b2 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 0000000000..1fb647d488 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 0000000000..41bd93343a 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 0000000000..560fc0988b 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 0000000000..9ee5ce8997 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 0000000000..ca4be07739 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 0000000000..88a7eb1a24 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 0000000000..fa6c365b9b 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 0000000000..6cc0539da6 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 0000000000..1cc09ec6f0 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 0000000000..44c42ce0d1 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 0000000000..4e63d61b9c 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 0000000000..3831347f56 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 0000000000..2f24fbf728 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 0000000000..cda05c9b4c 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 0000000000..a60d5b3fa6 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 0000000000..f62089b695 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 0000000000..8fb590e864 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 0000000000..f6b7ab982d 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 0000000000..11abe8c100 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 0000000000..5d9168a3ea 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 0000000000..4e5a92bdd7 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 0000000000..4a8dfa41ea 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 0000000000..3632def0ca 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 0000000000..15a5e5fadb 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 0000000000..986a53d2fe 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 0000000000..f19db790e3 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 0000000000..a322030a28 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 0000000000..5f6e2bedaa 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 0000000000..de43a37312 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 0000000000..b132bc13c4 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 0000000000..5c450dfb91 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 0000000000..adec062d1d 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 0000000000..56287f589b 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 0000000000..e58dff382b Binary files /dev/null and b/res/flags/ZW.png differ diff --git a/res/manifest.json b/res/manifest.json new file mode 100644 index 0000000000..75b182122d --- /dev/null +++ b/res/manifest.json @@ -0,0 +1,56 @@ +{ + "name": "Riot - open team collaboration", + "short_name": "Riot", + "display": "standalone", + "theme_color": "#76CFA6", + "start_url": "index.html", + "icons": [ + { + "src": "vector-icons/android-chrome-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "vector-icons/android-chrome-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "vector-icons/android-chrome-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "vector-icons/android-chrome-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "vector-icons/android-chrome-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "vector-icons/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ], + "related_applications": [ + { + "platform": "play", + "url": "https://play.google.com/store/apps/details?id=im.vector.alpha", + "id": "im.vector.alpha" + }, + { + "platform": "itunes", + "url": "https://itunes.apple.com/gb/app/riot-open-source-team-collaboration-via-matrix/id1083446067" + } + ] +} diff --git a/res/vector-icons/manifest.json b/res/vector-icons/manifest.json deleted file mode 100644 index feab1753cb..0000000000 --- a/res/vector-icons/manifest.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "Riot", - "icons": [ - { - "src": "android-chrome-36x36.png", - "sizes": "36x36", - "type": "image\/png", - "density": "0.75" - }, - { - "src": "android-chrome-48x48.png", - "sizes": "48x48", - "type": "image\/png", - "density": "1.0" - }, - { - "src": "android-chrome-72x72.png", - "sizes": "72x72", - "type": "image\/png", - "density": "1.5" - }, - { - "src": "android-chrome-96x96.png", - "sizes": "96x96", - "type": "image\/png", - "density": "2.0" - }, - { - "src": "android-chrome-144x144.png", - "sizes": "144x144", - "type": "image\/png", - "density": "3.0" - }, - { - "src": "android-chrome-192x192.png", - "sizes": "192x192", - "type": "image\/png", - "density": "4.0" - } - ] -} diff --git a/scripts/babelcheck.js b/scripts/babelcheck.js deleted file mode 100644 index 89f5cac554..0000000000 --- a/scripts/babelcheck.js +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -var exec = require('child_process').exec; - -// Makes sure the babel executable in the path is babel 6 (or greater), not -// babel 5, which it is if you upgrade from an older version of react-sdk and -// run 'npm install' since the package has changed to babel-cli, so 'babel' -// remains installed and the executable in node_modules/.bin remains as babel -// 5. - -// This script is duplicated from matrix-react-sdk because it can't reliably -// be pulled in from react-sdk while npm install is failing, as it will do -// if the environment is in the erroneous state this script checks for. - -exec("babel -V", function (error, stdout, stderr) { - if ((error && error.code) || parseInt(stdout.substr(0,1), 10) < 6) { - console.log("\033[31m\033[1m"+ - '*****************************************\n'+ - '* vector-web has moved to babel 6 *\n'+ - '* Please "rm -rf node_modules && npm i" *\n'+ - '* then restore links as appropriate *\n'+ - '*****************************************\n'+ - "\033[91m"); - process.exit(1); - } -}); diff --git a/scripts/copy-res.js b/scripts/copy-res.js index 4702d5cf1b..d3a2ee5e7b 100755 --- a/scripts/copy-res.js +++ b/scripts/copy-res.js @@ -7,7 +7,9 @@ // common parents. Hence, "res/{a,b}/**": the output will be "dest/a/..." and // "dest/b/...". 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 87e353f746..973ea45e82 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 @@ -90,8 +90,8 @@ npm run build:electron popd -distdir="$builddir/electron/dist" -pubdir="$projdir/electron/pub" +distdir="$builddir/electron_app/dist" +pubdir="$projdir/electron_app/pub" rm -r "$pubdir" || true mkdir -p "$pubdir" @@ -120,11 +120,11 @@ cp $distdir/win/*.nupkg "$pubdir/update/win32/x64/" cp $distdir/win/RELEASES "$pubdir/update/win32/x64/" # Move the debs to the main project dir's dist folder -rm -r "$projdir/electron/dist" || true -mkdir -p "$projdir/electron/dist" -cp $distdir/*.deb "$projdir/electron/dist/" +rm -r "$projdir/electron_app/dist" || true +mkdir -p "$projdir/electron_app/dist" +cp $distdir/*.deb "$projdir/electron_app/dist/" rm -rf "$builddir" echo "Riot Desktop is ready to go in $pubdir: this directory can be hosted on your web server." -echo "deb archives are in electron/dist/ - these should be added into your debian repository" +echo "deb archives are in electron_app/dist/ - these should be added into your debian repository" diff --git a/scripts/genflags.sh b/scripts/genflags.sh new file mode 100755 index 0000000000..826a0299f1 --- /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 old mode 100644 new mode 100755 index 7d0f3409c0..03af5ed7cc --- a/scripts/issues-burndown.pl +++ b/scripts/issues-burndown.pl @@ -4,16 +4,24 @@ use warnings; use strict; use Net::GitHub; -use DateTime; -use DateTime::Format::ISO8601; +use Time::Moment; +use Term::ReadPassword; + +# This version of the script emits the cumulative number of bugs, split into open & closed +# suitable for drawing the 'top' and 'bottom' of a burndown graph. +# +# N.B. this doesn't take into account issues changing priority over time, but only their most recent priority. +# +# If you want instead the number of open issues on a given day, then look at issues-no-state.pl my $gh = Net::GitHub->new( - login => 'ara4n', pass => 'secret' + 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', milestone => 3 }); +my @issues = $gh->issue->repos_issues({ state => 'all' }); while ($gh->issue->has_next_page) { push @issues, $gh->issue->next_page; } @@ -30,11 +38,11 @@ while ($gh->issue->has_next_page) { my $days = {}; my $schema = {}; -my $now = DateTime->now(); +my $now = Time::Moment->now; foreach my $issue (@issues) { next if ($issue->{pull_request}); - + # use Data::Dumper; # print STDERR Dumper($issue); @@ -56,10 +64,10 @@ foreach my $issue (@issues) { my $priority = &$extract_labels(qw(p1 p2 p3 p4 p5)) || "unprioritised"; my $severity = &$extract_labels(qw(minor major critical cosmetic network)) || "no-severity"; - my $start = DateTime::Format::ISO8601->parse_datetime($issue->{created_at}); + my $start = Time::Moment->from_string($issue->{created_at}); do { - my $ymd = $start->ymd(); + my $ymd = $start->strftime('%F'); $days->{ $ymd }->{ 'created' }->{ $type }->{ $priority }->{ $severity }->{ total }++; $schema->{ 'created' }->{ $type }->{ $priority }->{ $severity }->{ total }++; @@ -68,13 +76,14 @@ foreach my $issue (@issues) { $schema->{ 'created' }->{ $type }->{ $priority }->{ $severity }->{ $_ }++; } - $start = $start->add(days => 1); - } while (DateTime->compare($start, $now) < 0); + $start = $start->plus_days(1); + # print STDERR "^"; + } while ($start->compare($now) < 0); if ($state eq 'closed') { - my $end = DateTime::Format::ISO8601->parse_datetime($issue->{closed_at}); + my $end = Time::Moment->from_string($issue->{closed_at}); do { - my $ymd = $end->ymd(); + my $ymd = $end->strftime('%F'); $days->{ $ymd }->{ 'resolved' }->{ $type }->{ $priority }->{ $severity }->{ total }++; $schema->{ 'resolved' }->{ $type }->{ $priority }->{ $severity }->{ total }++; @@ -83,9 +92,12 @@ foreach my $issue (@issues) { $schema->{ 'resolved' }->{ $type }->{ $priority }->{ $severity }->{ $_ }++; } - $end = $end->add(days => 1); - } while (DateTime->compare($end, $now) < 0); + $end = $end->plus_days(1); + } while ($end->compare($now) < 0); + # print STDERR "v"; } + + # print STDERR "\n"; } print "day,"; diff --git a/scripts/issues-no-state.pl b/scripts/issues-no-state.pl index da12fb225a..748809c59a 100755 --- a/scripts/issues-no-state.pl +++ b/scripts/issues-no-state.pl @@ -6,14 +6,22 @@ use strict; use Net::GitHub; use DateTime; use DateTime::Format::ISO8601; +use Term::ReadPassword; + +# This version of the script emits the total number of bugs open on a given day, +# split by various tags. +# +# If you want instead the cumulative number of open & closed issues on a given day, +# then look at issues-burndown.pl my $gh = Net::GitHub->new( - login => 'ara4n', pass => 'secret' + 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', milestone => 3 }); +my @issues = $gh->issue->repos_issues({ state => 'all' }); while ($gh->issue->has_next_page) { push @issues, $gh->issue->next_page; } @@ -34,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 0d441cdd76..312eea4543 100755 --- a/scripts/jenkins.sh +++ b/scripts/jenkins.sh @@ -34,7 +34,7 @@ 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/make-icons.sh b/scripts/make-icons.sh index c77064abdd..19e48895df 100755 --- a/scripts/make-icons.sh +++ b/scripts/make-icons.sh @@ -52,7 +52,7 @@ cp "$tmpdir/256.png" "$tmpdir/Riot.iconset/icon_256x256.png" cp "$tmpdir/512.png" "$tmpdir/Riot.iconset/icon_256x256@2x.png" cp "$tmpdir/512.png" "$tmpdir/Riot.iconset/icon_512x512.png" cp "$tmpdir/1024.png" "$tmpdir/Riot.iconset/icon_512x512@2x.png" -iconutil -c icns -o electron/build/icon.icns "$tmpdir/Riot.iconset" +iconutil -c icns -o electron_app/build/icon.icns "$tmpdir/Riot.iconset" cp "$tmpdir/36.png" "res/vector-icons/android-chrome-36x36.png" cp "$tmpdir/48.png" "res/vector-icons/android-chrome-48x48.png" @@ -79,15 +79,17 @@ cp "$tmpdir/144.png" "res/vector-icons/mstile-144x144.png" cp "$tmpdir/150.png" "res/vector-icons/mstile-150x150.png" cp "$tmpdir/310.png" "res/vector-icons/mstile-310x310.png" cp "$tmpdir/310x150.png" "res/vector-icons/mstile-310x150.png" +cp "$tmpdir/180.png" "electron_app/img/riot.png" convert "$tmpdir/16.png" "$tmpdir/32.png" "$tmpdir/64.png" "$tmpdir/128.png" "$tmpdir/256.png" "res/vector-icons/favicon.ico" -cp "res/vector-icons/favicon.ico" "electron/build/icon.ico" +cp "res/vector-icons/favicon.ico" "electron_app/build/icon.ico" +cp "res/vector-icons/favicon.ico" "electron_app/img/riot.ico" # https://github.com/electron-userland/electron-builder/blob/3f97b86993d4ea5172e562b182230a194de0f621/src/targets/LinuxTargetHelper.ts#L127 for i in 24 96 16 48 64 128 256 512 do - cp "$tmpdir/$i.png" "electron/build/icons/${i}x${i}.png" + cp "$tmpdir/$i.png" "electron_app/build/icons/${i}x${i}.png" done rm -r "$tmpdir" diff --git a/scripts/package.sh b/scripts/package.sh index 5c1fdd5e36..23d0925b05 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -21,10 +21,17 @@ npm run build$dev cp config.sample.json webapp/ mkdir -p dist -cp -r webapp vector-$version -echo $version > vector-$version/version -tar chvzf dist/vector-$version.tar.gz vector-$version -rm -r 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} > riot-$version/version +else + echo ${version} > riot-$version/version +fi + +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/component-index.js b/src/component-index.js deleted file mode 100644 index 4bf0b0f984..0000000000 --- a/src/component-index.js +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2015, 2016 OpenMarket Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* - * THIS FILE IS AUTO-GENERATED - * You can edit it you like, but your changes will be overwritten, - * so you'd just be trying to swim upstream like a salmon. - * You are not a salmon. - * - * To update it, run: - * ./reskindex.js -h header - */ - -module.exports.components = require('matrix-react-sdk/lib/component-index').components; - -import structures$BottomLeftMenu from './components/structures/BottomLeftMenu'; -structures$BottomLeftMenu && (module.exports.components['structures.BottomLeftMenu'] = structures$BottomLeftMenu); -import structures$CompatibilityPage from './components/structures/CompatibilityPage'; -structures$CompatibilityPage && (module.exports.components['structures.CompatibilityPage'] = structures$CompatibilityPage); -import structures$HomePage from './components/structures/HomePage'; -structures$HomePage && (module.exports.components['structures.HomePage'] = structures$HomePage); -import structures$LeftPanel from './components/structures/LeftPanel'; -structures$LeftPanel && (module.exports.components['structures.LeftPanel'] = structures$LeftPanel); -import structures$RightPanel from './components/structures/RightPanel'; -structures$RightPanel && (module.exports.components['structures.RightPanel'] = structures$RightPanel); -import structures$RoomDirectory from './components/structures/RoomDirectory'; -structures$RoomDirectory && (module.exports.components['structures.RoomDirectory'] = structures$RoomDirectory); -import structures$RoomSubList from './components/structures/RoomSubList'; -structures$RoomSubList && (module.exports.components['structures.RoomSubList'] = structures$RoomSubList); -import structures$RoomSubListHeader from './components/structures/RoomSubListHeader'; -structures$RoomSubListHeader && (module.exports.components['structures.RoomSubListHeader'] = structures$RoomSubListHeader); -import structures$SearchBox from './components/structures/SearchBox'; -structures$SearchBox && (module.exports.components['structures.SearchBox'] = structures$SearchBox); -import structures$ViewSource from './components/structures/ViewSource'; -structures$ViewSource && (module.exports.components['structures.ViewSource'] = structures$ViewSource); -import views$context_menus$MessageContextMenu from './components/views/context_menus/MessageContextMenu'; -views$context_menus$MessageContextMenu && (module.exports.components['views.context_menus.MessageContextMenu'] = views$context_menus$MessageContextMenu); -import views$context_menus$RoomTileContextMenu from './components/views/context_menus/RoomTileContextMenu'; -views$context_menus$RoomTileContextMenu && (module.exports.components['views.context_menus.RoomTileContextMenu'] = views$context_menus$RoomTileContextMenu); -import views$dialogs$BugReportDialog from './components/views/dialogs/BugReportDialog'; -views$dialogs$BugReportDialog && (module.exports.components['views.dialogs.BugReportDialog'] = views$dialogs$BugReportDialog); -import views$dialogs$ChangelogDialog from './components/views/dialogs/ChangelogDialog'; -views$dialogs$ChangelogDialog && (module.exports.components['views.dialogs.ChangelogDialog'] = views$dialogs$ChangelogDialog); -import views$directory$NetworkDropdown from './components/views/directory/NetworkDropdown'; -views$directory$NetworkDropdown && (module.exports.components['views.directory.NetworkDropdown'] = views$directory$NetworkDropdown); -import views$elements$ImageView from './components/views/elements/ImageView'; -views$elements$ImageView && (module.exports.components['views.elements.ImageView'] = views$elements$ImageView); -import views$elements$Spinner from './components/views/elements/Spinner'; -views$elements$Spinner && (module.exports.components['views.elements.Spinner'] = views$elements$Spinner); -import views$globals$GuestWarningBar from './components/views/globals/GuestWarningBar'; -views$globals$GuestWarningBar && (module.exports.components['views.globals.GuestWarningBar'] = views$globals$GuestWarningBar); -import views$globals$MatrixToolbar from './components/views/globals/MatrixToolbar'; -views$globals$MatrixToolbar && (module.exports.components['views.globals.MatrixToolbar'] = views$globals$MatrixToolbar); -import views$globals$NewVersionBar from './components/views/globals/NewVersionBar'; -views$globals$NewVersionBar && (module.exports.components['views.globals.NewVersionBar'] = views$globals$NewVersionBar); -import views$login$VectorCustomServerDialog from './components/views/login/VectorCustomServerDialog'; -views$login$VectorCustomServerDialog && (module.exports.components['views.login.VectorCustomServerDialog'] = views$login$VectorCustomServerDialog); -import views$login$VectorLoginFooter from './components/views/login/VectorLoginFooter'; -views$login$VectorLoginFooter && (module.exports.components['views.login.VectorLoginFooter'] = views$login$VectorLoginFooter); -import views$login$VectorLoginHeader from './components/views/login/VectorLoginHeader'; -views$login$VectorLoginHeader && (module.exports.components['views.login.VectorLoginHeader'] = views$login$VectorLoginHeader); -import views$messages$DateSeparator from './components/views/messages/DateSeparator'; -views$messages$DateSeparator && (module.exports.components['views.messages.DateSeparator'] = views$messages$DateSeparator); -import views$messages$MessageTimestamp from './components/views/messages/MessageTimestamp'; -views$messages$MessageTimestamp && (module.exports.components['views.messages.MessageTimestamp'] = views$messages$MessageTimestamp); -import views$rooms$DNDRoomTile from './components/views/rooms/DNDRoomTile'; -views$rooms$DNDRoomTile && (module.exports.components['views.rooms.DNDRoomTile'] = views$rooms$DNDRoomTile); -import views$rooms$RoomDropTarget from './components/views/rooms/RoomDropTarget'; -views$rooms$RoomDropTarget && (module.exports.components['views.rooms.RoomDropTarget'] = views$rooms$RoomDropTarget); -import views$rooms$RoomTooltip from './components/views/rooms/RoomTooltip'; -views$rooms$RoomTooltip && (module.exports.components['views.rooms.RoomTooltip'] = views$rooms$RoomTooltip); -import views$rooms$SearchBar from './components/views/rooms/SearchBar'; -views$rooms$SearchBar && (module.exports.components['views.rooms.SearchBar'] = views$rooms$SearchBar); -import views$settings$IntegrationsManager from './components/views/settings/IntegrationsManager'; -views$settings$IntegrationsManager && (module.exports.components['views.settings.IntegrationsManager'] = views$settings$IntegrationsManager); -import views$settings$Notifications from './components/views/settings/Notifications'; -views$settings$Notifications && (module.exports.components['views.settings.Notifications'] = views$settings$Notifications); diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index 2d97313a07..a9df37a8b8 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -19,11 +19,9 @@ limitations under the License. var React = require('react'); var DragDropContext = require('react-dnd').DragDropContext; var HTML5Backend = require('react-dnd-html5-backend'); -var KeyCode = require('matrix-react-sdk/lib/KeyCode'); var sdk = require('matrix-react-sdk') var dis = require('matrix-react-sdk/lib/dispatcher'); - var VectorConferenceHandler = require('../../VectorConferenceHandler'); var CallHandler = require("matrix-react-sdk/lib/CallHandler"); @@ -42,10 +40,6 @@ var LeftPanel = React.createClass({ }; }, - componentWillMount: function() { - this.focusedElement = null; - }, - componentDidMount: function() { this.dispatcherRef = dis.register(this.onAction); }, @@ -68,91 +62,6 @@ var LeftPanel = React.createClass({ } }, - _onFocus: function(ev) { - this.focusedElement = ev.target; - }, - - _onBlur: function(ev) { - this.focusedElement = null; - }, - - _onKeyDown: function(ev) { - if (!this.focusedElement) return; - let handled = false; - - switch (ev.keyCode) { - case KeyCode.UP: - this._onMoveFocus(true); - handled = true; - break; - case KeyCode.DOWN: - this._onMoveFocus(false); - handled = true; - break; - } - - if (handled) { - ev.stopPropagation(); - ev.preventDefault(); - } - }, - - _onMoveFocus: function(up) { - var element = this.focusedElement; - - // unclear why this isn't needed - // var descending = (up == this.focusDirection) ? this.focusDescending : !this.focusDescending; - // this.focusDirection = up; - - var descending = false; // are we currently descending or ascending through the DOM tree? - var classes; - - do { - var child = up ? element.lastElementChild : element.firstElementChild; - var sibling = up ? element.previousElementSibling : element.nextElementSibling; - - if (descending) { - if (child) { - element = child; - } - else if (sibling) { - element = sibling; - } - else { - descending = false; - element = element.parentElement; - } - } - else { - if (sibling) { - element = sibling; - descending = true; - } - else { - element = element.parentElement; - } - } - - if (element) { - classes = element.classList; - if (classes.contains("mx_LeftPanel")) { // we hit the top - element = up ? element.lastElementChild : element.firstElementChild; - descending = true; - } - } - - } while(element && !( - classes.contains("mx_RoomTile") || - classes.contains("mx_SearchBox_search") || - classes.contains("mx_RoomSubList_ellipsis"))); - - if (element) { - element.focus(); - this.focusedElement = element; - this.focusedDescending = descending; - } - }, - _recheckCallElement: function(selectedRoomId) { // if we aren't viewing a room with an ongoing call, but there is an // active call, show the call element - we need to do this to make @@ -211,8 +120,7 @@ var LeftPanel = React.createClass({ } return ( -