forked from matrix/element-web
Merge branch 'develop' into anoa/jitsi_ptt
* develop: (249 commits) Clarify deployment scripts Add riot.im configuration files Enable reactions and edits for desktop Remove unused disable_identity_server config flag Improve wording in debug log sending in issue templates Require a rageshake description in mxSendRageshake Fetch deps Verify i18n in CI Upgrade dependencies v1.2.4 Prepare changelog for v1.2.4 v1.2.4 Upgrade lodash Upgrade to JS SDK 2.1.1 and React SDK 1.3.1 v1.2.3 Prepare changelog for v1.2.3 v1.2.3 Upgrade to JS SDK 2.1.0 and React SDK 1.3.0 Upgrade dependencies v1.2.3-rc.1 ...
This commit is contained in:
commit
b7781ab503
21
.babelrc
21
.babelrc
|
@ -1,4 +1,21 @@
|
|||
{
|
||||
"presets": ["react", "es2015", "es2016"],
|
||||
"plugins": ["transform-class-properties", "transform-object-rest-spread", "transform-async-to-bluebird", "transform-runtime", "add-module-exports"]
|
||||
"presets": [
|
||||
"react",
|
||||
"es2015",
|
||||
"es2016"
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"transform-builtin-extend",
|
||||
{
|
||||
"globals": ["Error"]
|
||||
}
|
||||
],
|
||||
"transform-class-properties",
|
||||
"transform-object-rest-spread",
|
||||
"transform-async-to-bluebird",
|
||||
"transform-runtime",
|
||||
"add-module-exports",
|
||||
"syntax-dynamic-import"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -31,3 +31,27 @@ steps:
|
|||
- docker#v3.0.1:
|
||||
image: "node:10"
|
||||
propagate-environment: true
|
||||
|
||||
- label: ":hammer: Package"
|
||||
command:
|
||||
- "echo '--- Fetching Dependencies'"
|
||||
- "./scripts/fetch-develop.deps.sh --depth 1"
|
||||
- "yarn install"
|
||||
- "echo '+++ Packaging'"
|
||||
- "./scripts/ci_package.sh"
|
||||
branches: "develop"
|
||||
artifact_paths: "dist/riot-*.tar.gz"
|
||||
plugins:
|
||||
- docker#v3.0.1:
|
||||
image: "node:10"
|
||||
|
||||
- label: "🌐 i18n"
|
||||
command:
|
||||
- "echo '--- Fetching Dependencies'"
|
||||
- "./scripts/fetch-develop.deps.sh --depth 1"
|
||||
- "yarn install"
|
||||
- "echo '+++ Testing i18n output'"
|
||||
- "yarn diff-i18n"
|
||||
plugins:
|
||||
- docker#v3.0.1:
|
||||
image: "node:10"
|
|
@ -0,0 +1,11 @@
|
|||
# Exclude a bunch of stuff which can make the build context a larger than it needs to be
|
||||
.git/
|
||||
test/
|
||||
webapp/
|
||||
lib/
|
||||
node_modules/
|
||||
electron_app/
|
||||
karma-reports/
|
||||
.idea/
|
||||
.tmp/
|
||||
config.json*
|
|
@ -0,0 +1,2 @@
|
|||
patreon: matrixdotorg
|
||||
liberapay: matrixdotorg
|
|
@ -31,9 +31,10 @@ Describe here the problem that you are experiencing, or the feature you are requ
|
|||
|
||||
Describe how what happens differs from what you expected.
|
||||
|
||||
Log: sent/not sent? <!-- You can send us the app's logs via the 'Report bug'
|
||||
link on the 'Settings' page. Very important for hard-to-reproduce bugs. Please
|
||||
file a bug here too! -->
|
||||
<!-- Please send us logs for your bug report. They're very important for bugs
|
||||
which are hard to reproduce. To do this, create this issue then go to your
|
||||
account settings and click 'Submit Debug Logs' from the Help & About tab -->
|
||||
Logs being sent: yes/no
|
||||
|
||||
<!-- Include screenshots if possible: you can drag and drop images below. -->
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name: User Interface or Usability Bug report
|
||||
about: Please include screenshots in UI/UX bug reports
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: bug, ui/ux
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
@ -33,9 +33,10 @@ Describe here the problem that you are experiencing, or the feature you are requ
|
|||
|
||||
Describe how what happens differs from what you expected.
|
||||
|
||||
Log: sent/not sent? <!-- You can send us the app's logs via the 'Report bug'
|
||||
link on the 'Settings' page. Very important for hard-to-reproduce bugs. Please
|
||||
file a bug here too! -->
|
||||
<!-- Please send us logs for your bug report. They're very important for bugs
|
||||
which are hard to reproduce. To do this, create this issue then go to your
|
||||
account settings and click 'Submit Debug Logs' from the Help & About tab -->
|
||||
Logs being sent: yes/no
|
||||
|
||||
<!-- Include screenshots if possible: you can drag and drop images below. -->
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/build
|
||||
/cert.pem
|
||||
/dist
|
||||
/karma-reports
|
||||
/key.pem
|
||||
/lib
|
||||
/node_modules
|
||||
/electron_app/node_modules
|
||||
/electron_app/dist
|
||||
/electron_app/pub
|
||||
/packages/
|
||||
/webapp
|
||||
/.npmrc
|
||||
|
|
210
CHANGELOG.md
210
CHANGELOG.md
|
@ -1,3 +1,213 @@
|
|||
Changes in [1.2.4](https://github.com/vector-im/riot-web/releases/tag/v1.2.4) (2019-07-11)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.3...v1.2.4)
|
||||
|
||||
* Upgrade to React SDK 1.3.1 and JS SDK 2.1.1
|
||||
* Upgrade lodash dependencies
|
||||
* JS SDK 2.1.1 includes a fix for ephemeral event processing
|
||||
* React SDK 1.3.1 includes a fix for account deactivation
|
||||
|
||||
Changes in [1.2.3](https://github.com/vector-im/riot-web/releases/tag/v1.2.3) (2019-07-08)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.3-rc.1...v1.2.3)
|
||||
|
||||
* Upgrade to React SDK 1.3.0 and JS SDK 2.1.0
|
||||
* JS SDK 2.1.0 includes a fix for an exception whilst syncing
|
||||
|
||||
Changes in [1.2.3-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.2.3-rc.1) (2019-07-03)
|
||||
====================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.2...v1.2.3-rc.1)
|
||||
|
||||
* Change update URL to match new host
|
||||
[\#10247](https://github.com/vector-im/riot-web/pull/10247)
|
||||
* Update from Weblate
|
||||
[\#10219](https://github.com/vector-im/riot-web/pull/10219)
|
||||
* Extract configuration docs to separate file
|
||||
[\#10195](https://github.com/vector-im/riot-web/pull/10195)
|
||||
* Add e2e/warning.svg to preload
|
||||
[\#10197](https://github.com/vector-im/riot-web/pull/10197)
|
||||
* Fix Electron vector: links
|
||||
[\#10196](https://github.com/vector-im/riot-web/pull/10196)
|
||||
* Display a red box of anger for config syntax errors
|
||||
[\#10193](https://github.com/vector-im/riot-web/pull/10193)
|
||||
* Move config-getting to VectorBasePlatform
|
||||
[\#10181](https://github.com/vector-im/riot-web/pull/10181)
|
||||
* Update from Weblate
|
||||
[\#10124](https://github.com/vector-im/riot-web/pull/10124)
|
||||
* Fix default Electron window and tray icons
|
||||
[\#10097](https://github.com/vector-im/riot-web/pull/10097)
|
||||
|
||||
Changes in [1.2.2](https://github.com/vector-im/riot-web/releases/tag/v1.2.2) (2019-06-19)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.2-rc.2...v1.2.2)
|
||||
|
||||
No changes since rc.2
|
||||
|
||||
Changes in [1.2.2-rc.2](https://github.com/vector-im/riot-web/releases/tag/v1.2.2-rc.2) (2019-06-18)
|
||||
====================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.2-rc.1...v1.2.2-rc.2)
|
||||
|
||||
* Update to react-sdk and js-sdk rc.2 for registration fixes,
|
||||
redaction local echo fix and removing unnecessary calls
|
||||
to the integration manager.
|
||||
|
||||
Changes in [1.2.2-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.2.2-rc.1) (2019-06-12)
|
||||
====================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.1...v1.2.2-rc.1)
|
||||
|
||||
* Update from Weblate
|
||||
[\#10012](https://github.com/vector-im/riot-web/pull/10012)
|
||||
* Add funding details for GitHub sponsor button
|
||||
[\#9982](https://github.com/vector-im/riot-web/pull/9982)
|
||||
* Do not fail on server liveliness checks during startup
|
||||
[\#9960](https://github.com/vector-im/riot-web/pull/9960)
|
||||
* Hide guest functions on the welcome page if not logged in
|
||||
[\#9957](https://github.com/vector-im/riot-web/pull/9957)
|
||||
* Add Albanian and West Flemish languages
|
||||
[\#9953](https://github.com/vector-im/riot-web/pull/9953)
|
||||
* Update from Weblate
|
||||
[\#9951](https://github.com/vector-im/riot-web/pull/9951)
|
||||
* Add docs for defaultCountryCode
|
||||
[\#9927](https://github.com/vector-im/riot-web/pull/9927)
|
||||
* Use the user's pre-existing HS when config validation fails
|
||||
[\#9892](https://github.com/vector-im/riot-web/pull/9892)
|
||||
* Low bandwidth mode
|
||||
[\#9909](https://github.com/vector-im/riot-web/pull/9909)
|
||||
* Fix Twemoji loading on Windows dev machines
|
||||
[\#9869](https://github.com/vector-im/riot-web/pull/9869)
|
||||
* Base Docker image on nginx:alpine, not the larger nginx:latest
|
||||
[\#9848](https://github.com/vector-im/riot-web/pull/9848)
|
||||
* Validate homeserver configuration prior to loading the app
|
||||
[\#9779](https://github.com/vector-im/riot-web/pull/9779)
|
||||
* Show resolved homeserver configuration on the mobile guide
|
||||
[\#9726](https://github.com/vector-im/riot-web/pull/9726)
|
||||
* Flag the validated config as the default config
|
||||
[\#9721](https://github.com/vector-im/riot-web/pull/9721)
|
||||
* Clarify comment on is_url and hs_url handling
|
||||
[\#9719](https://github.com/vector-im/riot-web/pull/9719)
|
||||
* Validate default homeserver config before loading the app
|
||||
[\#9496](https://github.com/vector-im/riot-web/pull/9496)
|
||||
|
||||
Changes in [1.2.1](https://github.com/vector-im/riot-web/releases/tag/v1.2.1) (2019-05-31)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.0...v1.2.1)
|
||||
|
||||
* Upgrade JS SDK to 2.0.0 and React SDK to 1.2.1 to fix key backup and native emoji height
|
||||
|
||||
Changes in [1.2.0](https://github.com/vector-im/riot-web/releases/tag/v1.2.0) (2019-05-29)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.2.0-rc.1...v1.2.0)
|
||||
|
||||
* Upgrade to JS SDK v1.2.0 and React SDK v1.2.0 to fix some regressions
|
||||
|
||||
Changes in [1.2.0-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.2.0-rc.1) (2019-05-23)
|
||||
====================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.1.2...v1.2.0-rc.1)
|
||||
|
||||
* Update from Weblate
|
||||
[\#9802](https://github.com/vector-im/riot-web/pull/9802)
|
||||
* remove emojione
|
||||
[\#9766](https://github.com/vector-im/riot-web/pull/9766)
|
||||
* Make Dockerfile work for develop and other branches
|
||||
[\#9736](https://github.com/vector-im/riot-web/pull/9736)
|
||||
* add description of new labs feature for message editing
|
||||
[\#9728](https://github.com/vector-im/riot-web/pull/9728)
|
||||
* Remove karma junit output
|
||||
[\#9628](https://github.com/vector-im/riot-web/pull/9628)
|
||||
* yarn upgrade
|
||||
[\#9626](https://github.com/vector-im/riot-web/pull/9626)
|
||||
* Respond quickly to buildkite pokes
|
||||
[\#9617](https://github.com/vector-im/riot-web/pull/9617)
|
||||
* Delay creating the `Favico` instance
|
||||
[\#9616](https://github.com/vector-im/riot-web/pull/9616)
|
||||
* Add reactions feature to config sample
|
||||
[\#9598](https://github.com/vector-im/riot-web/pull/9598)
|
||||
|
||||
Changes in [1.1.2](https://github.com/vector-im/riot-web/releases/tag/v1.1.2) (2019-05-15)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.1.1...v1.1.2)
|
||||
|
||||
* react-sdk v1.1.2 to fix single sign-on and GIF autoplaying
|
||||
|
||||
Changes in [1.1.1](https://github.com/vector-im/riot-web/releases/tag/v1.1.1) (2019-05-14)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.1.0...v1.1.1)
|
||||
|
||||
* react-sdk v1.1.1 to fix regressions with registration
|
||||
|
||||
Changes in [1.1.0](https://github.com/vector-im/riot-web/releases/tag/v1.1.0) (2019-05-07)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.1.0-rc.1...v1.1.0)
|
||||
|
||||
* Add Dockerfile
|
||||
[\#9632](https://github.com/vector-im/riot-web/pull/9632)
|
||||
* Add Dockerfile (part 2)
|
||||
[\#9426](https://github.com/vector-im/riot-web/pull/9426)
|
||||
* Add new scalar staging url
|
||||
[\#9601](https://github.com/vector-im/riot-web/pull/9601)
|
||||
|
||||
Changes in [1.1.0-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.1.0-rc.1) (2019-04-30)
|
||||
====================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.0.8...v1.1.0-rc.1)
|
||||
|
||||
* Convert redeploy.py to buildkite
|
||||
[\#9577](https://github.com/vector-im/riot-web/pull/9577)
|
||||
* Add package step to buildkite pipeline
|
||||
[\#9568](https://github.com/vector-im/riot-web/pull/9568)
|
||||
* Don't fail if there's no local config to remove
|
||||
[\#9571](https://github.com/vector-im/riot-web/pull/9571)
|
||||
* Change jenkins script to package script
|
||||
[\#9567](https://github.com/vector-im/riot-web/pull/9567)
|
||||
* Remove config.json from package dir
|
||||
[\#9555](https://github.com/vector-im/riot-web/pull/9555)
|
||||
* use the release version of olm 3.1.0
|
||||
[\#9550](https://github.com/vector-im/riot-web/pull/9550)
|
||||
* Fix default for --include arg
|
||||
[\#9517](https://github.com/vector-im/riot-web/pull/9517)
|
||||
* update installation instructions with new repo
|
||||
[\#9500](https://github.com/vector-im/riot-web/pull/9500)
|
||||
* Use packages.matrix.org for Olm
|
||||
[\#9498](https://github.com/vector-im/riot-web/pull/9498)
|
||||
* Add separate platform electron build commands
|
||||
[\#9412](https://github.com/vector-im/riot-web/pull/9412)
|
||||
* Add support for custom profile directory
|
||||
[\#9408](https://github.com/vector-im/riot-web/pull/9408)
|
||||
* Improved mobile install guide
|
||||
[\#9410](https://github.com/vector-im/riot-web/pull/9410)
|
||||
* Remove vector-electron-desktop from README
|
||||
[\#9404](https://github.com/vector-im/riot-web/pull/9404)
|
||||
* Update from Weblate
|
||||
[\#9398](https://github.com/vector-im/riot-web/pull/9398)
|
||||
* bump olm version to 3.1.0-pre3
|
||||
[\#9392](https://github.com/vector-im/riot-web/pull/9392)
|
||||
* Add expiration to mobile guide cookie
|
||||
[\#9383](https://github.com/vector-im/riot-web/pull/9383)
|
||||
* Fix autolaunch setting appearing toggled off
|
||||
[\#9368](https://github.com/vector-im/riot-web/pull/9368)
|
||||
* Don't try to save files the user didn't want to save
|
||||
[\#9352](https://github.com/vector-im/riot-web/pull/9352)
|
||||
* Setup crypto store for restore session tests
|
||||
[\#9325](https://github.com/vector-im/riot-web/pull/9325)
|
||||
* Update from Weblate
|
||||
[\#9333](https://github.com/vector-im/riot-web/pull/9333)
|
||||
* Add "Save image as..." button to context menu on images
|
||||
[\#9326](https://github.com/vector-im/riot-web/pull/9326)
|
||||
* Configure auth footer links through Riot config
|
||||
[\#9297](https://github.com/vector-im/riot-web/pull/9297)
|
||||
|
||||
Changes in [1.0.8](https://github.com/vector-im/riot-web/releases/tag/v1.0.8) (2019-04-16)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.0.7...v1.0.8)
|
||||
|
||||
* No changes in this release. This is the same code as v1.0.7 from our new clean-room
|
||||
packaging and signing infrastructure.
|
||||
|
||||
Changes in [1.0.7](https://github.com/vector-im/riot-web/releases/tag/v1.0.7) (2019-04-08)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.0.6...v1.0.7)
|
||||
|
||||
* Hotfix: bump js-sdk to 1.0.4, see https://github.com/matrix-org/matrix-js-sdk/releases/tag/v1.0.4
|
||||
|
||||
Changes in [1.0.6](https://github.com/vector-im/riot-web/releases/tag/v1.0.6) (2019-04-01)
|
||||
==========================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.0.6-rc.1...v1.0.6)
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
# Builder
|
||||
FROM node:10-alpine as builder
|
||||
|
||||
# Support custom branches of the react-sdk and js-sdk. This also helps us build
|
||||
# images of riot-web develop.
|
||||
ARG USE_CUSTOM_SDKS=false
|
||||
ARG REACT_SDK_REPO="https://github.com/matrix-org/matrix-react-sdk.git"
|
||||
ARG REACT_SDK_BRANCH="master"
|
||||
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
|
||||
ARG JS_SDK_BRANCH="master"
|
||||
|
||||
RUN apk add --no-cache git dos2unix
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . /src
|
||||
RUN dos2unix /src/scripts/docker-link-repos.sh && sh /src/scripts/docker-link-repos.sh
|
||||
RUN yarn --network-timeout=100000 install
|
||||
RUN yarn build
|
||||
|
||||
# Copy the config now so that we don't create another layer in the app image
|
||||
RUN cp /src/config.sample.json /src/webapp/config.json
|
||||
|
||||
|
||||
# App
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /src/webapp /app
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html \
|
||||
&& ln -s /app /usr/share/nginx/html
|
182
README.md
182
README.md
|
@ -21,24 +21,18 @@ released version of Riot:
|
|||
1. Untar the tarball on your web server
|
||||
1. Move (or symlink) the `riot-x.x.x` directory to an appropriate name
|
||||
1. If desired, copy `config.sample.json` to `config.json` and edit it
|
||||
as desired. See below for details.
|
||||
as desired. See the [configuration docs](docs/config.md) for details.
|
||||
1. Enter the URL into your browser and log into Riot!
|
||||
|
||||
Releases are signed by PGP, and can be checked against the public key
|
||||
at https://riot.im/packages/keys/riot.asc .
|
||||
Releases are signed using gpg and the OpenPGP standard, and can be checked against the public key located
|
||||
at https://packages.riot.im/riot-release-key.asc.
|
||||
|
||||
Note that Chrome does not allow microphone or webcam access for sites served
|
||||
over http (except localhost), so for working VoIP you will need to serve Riot
|
||||
over https.
|
||||
|
||||
### Desktop Installation for Debian Stretch
|
||||
|
||||
1. Add the repository to your sources.list using either of the following two options:
|
||||
- Directly to sources.list: `echo "deb https://riot.im/packages/debian/ stretch main" | sudo tee -a /etc/apt/sources.list`
|
||||
- As a separate entry in sources.list.d: `echo "deb https://riot.im/packages/debian/ stretch main" | sudo tee /etc/apt/sources.list.d/riot.list`
|
||||
2. Add the gpg signing key for the riot repository: `curl -s https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -`
|
||||
3. Update your package lists: `sudo apt-get update`
|
||||
4. Install Riot: `sudo apt-get install riot-web`
|
||||
To install Riot as a desktop application, see [Running as a desktop
|
||||
app](#running-as-a-desktop-app) below.
|
||||
|
||||
Important Security Note
|
||||
=======================
|
||||
|
@ -58,9 +52,9 @@ on the client, Riot needs a way to supply the decrypted content from a separate
|
|||
origin to the one Riot is hosted on. This currently done with a 'cross origin
|
||||
renderer' which is a small piece of javascript hosted on a different domain.
|
||||
To avoid all Riot installs needing one of these to be set up, riot.im hosts
|
||||
one on usercontent.riot.im which is used by default. See 'config.json' if you'd
|
||||
like to host your own. https://github.com/vector-im/riot-web/issues/6173 tracks
|
||||
progress on replacing this with something better.
|
||||
one on usercontent.riot.im which is used by default.
|
||||
https://github.com/vector-im/riot-web/issues/6173 tracks progress on replacing
|
||||
this with something better.
|
||||
|
||||
Building From Source
|
||||
====================
|
||||
|
@ -97,7 +91,7 @@ guide](https://yarnpkg.com/docs/install/) if you do not have it already.
|
|||
develop branch. (Note that we don't reference the develop versions in git directly
|
||||
due to https://github.com/npm/npm/issues/3055.)
|
||||
1. Configure the app by copying `config.sample.json` to `config.json` and
|
||||
modifying it (see below for details).
|
||||
modifying it. See the [configuration docs](docs/config.md) for details.
|
||||
1. `yarn dist` to build a tarball to deploy. Untaring this file will give
|
||||
a version-specific directory containing all the files that need to go on your
|
||||
web server.
|
||||
|
@ -107,108 +101,24 @@ which will build all the necessary files into the `webapp` directory. The versio
|
|||
will not appear in Settings without using the dist script. You can then mount the
|
||||
`webapp` directory on your webserver to actually serve up the app, which is entirely static content.
|
||||
|
||||
config.json
|
||||
===========
|
||||
|
||||
You can configure the app by copying `config.sample.json` to
|
||||
`config.json` and customising it:
|
||||
|
||||
For a good example, see https://riot.im/develop/config.json.
|
||||
|
||||
1. `default_server_name` sets the default server name to use for authentication.
|
||||
This will trigger Riot to ask
|
||||
`https://<server_name>/.well-known/matrix/client` for the homeserver and
|
||||
identity server URLs to use. This is the recommended approach for setting a
|
||||
default server. However, it is also possible to use the following to directly
|
||||
configure each of the URLs:
|
||||
* `default_hs_url` sets the default homeserver URL.
|
||||
* `default_is_url` sets the default identity server URL (this is the server used
|
||||
for verifying third party identifiers like email addresses). If this is blank,
|
||||
registering with an email address, adding an email address to your account,
|
||||
or inviting users via email address will not work. Matrix identity servers are
|
||||
very simple web services which map third party identifiers (currently only email
|
||||
addresses) to matrix IDs: see http://matrix.org/docs/spec/identity_service/unstable.html
|
||||
for more details. Currently the only public matrix identity servers are https://matrix.org
|
||||
and https://vector.im. In the future, identity servers will be decentralised.
|
||||
* Riot will report an error if you accidentally configure both `default_server_name` _and_ `default_hs_url` since it's unclear which should take priority.
|
||||
1. `features`: Lookup of optional features that may be `enable`d, `disable`d, or exposed to the user
|
||||
in the `labs` section of settings. The available optional experimental features vary from
|
||||
release to release.
|
||||
1. `brand`: String to pass to your homeserver when configuring email notifications, to let the
|
||||
homeserver know what email template to use when talking to you.
|
||||
1. `branding`: Configures various branding and logo details, such as:
|
||||
1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app
|
||||
during authentication flows
|
||||
1. `authHeaderLogoUrl`: An logo image that is shown in the header during
|
||||
authentication flows
|
||||
1. `authFooterLinks`: a list of links to show in the authentication page footer:
|
||||
`[{"text": "Link text", "url": "https://link.target"}, {"text": "Other link", ...}]`
|
||||
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
|
||||
server is not Riot and normally not your homeserver either. The integration server settings
|
||||
may be left blank to disable integrations.
|
||||
1. `integrations_rest_url`: URL to the REST interface for the integrations server.
|
||||
1. `integrations_widgets_urls`: list of URLs to the REST interface for the widget integrations server.
|
||||
1. `bug_report_endpoint_url`: endpoint to send bug reports to (must be running a
|
||||
https://github.com/matrix-org/rageshake server). Bug reports are sent when a user clicks
|
||||
"Send Logs" within the application. Bug reports can be disabled by leaving the
|
||||
`bug_report_endpoint_url` out of your config file.
|
||||
1. `roomDirectory`: config for the public room directory. This section is optional.
|
||||
1. `roomDirectory.servers`: List of other homeservers' directories to include in the drop
|
||||
down list. Optional.
|
||||
1. `default_theme`: name of theme to use by default (e.g. 'light')
|
||||
1. `update_base_url` (electron app only): HTTPS URL to a web server to download
|
||||
updates from. This should be the path to the directory containing `macos`
|
||||
and `win32` (for update packages, not installer packages).
|
||||
1. `cross_origin_renderer_url`: URL to a static HTML page hosting code to help display
|
||||
encrypted file attachments. This MUST be hosted on a completely separate domain to
|
||||
anything else since it is used to isolate the privileges of file attachments to this
|
||||
domain. Default: `https://usercontent.riot.im/v1.html`. This needs to contain v1.html from
|
||||
https://github.com/matrix-org/usercontent/blob/master/v1.html
|
||||
1. `piwik`: Analytics can be disabled by setting `piwik: false` or by leaving the piwik config
|
||||
option out of your config file. If you want to enable analytics, set `piwik` to be an object
|
||||
containing the following properties:
|
||||
1. `url`: The URL of the Piwik instance to use for collecting analytics
|
||||
1. `whitelistedHSUrls`: a list of HS URLs to not redact from the analytics
|
||||
1. `whitelistedISUrls`: a list of IS URLs to not redact from the analytics
|
||||
1. `siteId`: The Piwik Site ID to use when sending analytics to the Piwik server configured above
|
||||
1. `welcomeUserId`: the user ID of a bot to invite whenever users register that can give them a tour
|
||||
1. `embeddedPages`: Configures the pages displayed in portions of Riot that
|
||||
embed static files, such as:
|
||||
1. `welcomeUrl`: Initial content shown on the outside of the app when not
|
||||
logged in. Defaults to `welcome.html` supplied with Riot.
|
||||
1. `homeUrl`: Content shown on the inside of the app when a specific room is
|
||||
not selected. By default, no home page is configured. If one is set, a
|
||||
button to access it will be shown in the top left menu.
|
||||
|
||||
|
||||
Note that `index.html` also has an og:image meta tag that is set to an image
|
||||
hosted on riot.im. This is the image used if links to your copy of Riot
|
||||
appear in some websites like Facebook, and indeed Riot itself. This has to be
|
||||
static in the HTML and an absolute URL (and HTTP rather than HTTPS), so it's
|
||||
not possible for this to be an option in config.json. If you'd like to change
|
||||
it, you can build Riot as above, but run
|
||||
`RIOT_OG_IMAGE_URL="http://example.com/logo.png" yarn build`.
|
||||
Alternatively, you can edit the `og:image` meta tag in `index.html` directly
|
||||
each time you download a new version of Riot.
|
||||
|
||||
Running as a Desktop app
|
||||
========================
|
||||
|
||||
Riot can also be run as a desktop app, wrapped in electron. You can download a
|
||||
pre-built version from https://riot.im/desktop.html or, if you prefer,
|
||||
build it yourself. Requires Electron >=1.6.0.
|
||||
Riot can also be run as a desktop app, wrapped in Electron. You can download a
|
||||
pre-built version from https://riot.im/download/desktop/ or, if you prefer,
|
||||
build it yourself.
|
||||
|
||||
To run as a desktop app:
|
||||
To build it yourself, follow the instructions below.
|
||||
|
||||
1. Follow the instructions in 'Building From Source' above, but run
|
||||
`yarn build` instead of `yarn dist` (since we don't need the tarball).
|
||||
2. Install electron and run it:
|
||||
2. Install Electron and run it:
|
||||
|
||||
```bash
|
||||
yarn electron
|
||||
```
|
||||
|
||||
To build packages, use electron-builder. This is configured to output:
|
||||
To build packages, use `electron-builder`. This is configured to output:
|
||||
* `dmg` + `zip` for macOS
|
||||
* `exe` + `nupkg` for Windows
|
||||
* `deb` for Linux
|
||||
|
@ -220,19 +130,18 @@ for dependencies required for building packages for various platforms.
|
|||
|
||||
The only platform that can build packages for all three platforms is macOS:
|
||||
```bash
|
||||
brew install wine --without-x11
|
||||
brew install mono
|
||||
brew install gnu-tar
|
||||
yarn install
|
||||
yarn build:electron
|
||||
```
|
||||
|
||||
For other packages, use electron-builder manually. For example, to build a package
|
||||
for 64 bit Linux:
|
||||
For other packages, use `electron-builder` manually. For example, to build a
|
||||
package for 64 bit Linux:
|
||||
|
||||
1. Follow the instructions in 'Building From Source' above
|
||||
2. `node_modules/.bin/build -l --x64`
|
||||
|
||||
<<<<<<< HEAD
|
||||
All electron packages go into `electron_app/dist/`.
|
||||
|
||||
Electron Specific Features
|
||||
|
@ -241,11 +150,13 @@ Electron Specific Features
|
|||
The electron version of Riot contains some features that are only possible from electron rather than within a browser window. This includes the "Push-to-Talk" feature, which allows you to toggle your microphone during a call even if Riot is not in focus.
|
||||
|
||||
This requires the use of a native node module called [iohook](https://github.com/matrix-org/iohook/). Native node modules are written in C, and by default during the build of Riot the compiled binaries will be downloaded from npm. If you would like to build this module from source yourself, please read [Compiling iohook](docs/native_node_modules.md#compiling-iohook).
|
||||
=======
|
||||
All Electron packages go into `electron_app/dist/`
|
||||
>>>>>>> develop
|
||||
|
||||
Many thanks to @aviraldg for the initial work on the electron integration.
|
||||
Many thanks to @aviraldg for the initial work on the Electron integration.
|
||||
|
||||
Other options for running as a desktop app:
|
||||
* https://github.com/krisak/vector-electron-desktop
|
||||
* @asdf:matrix.org points out that you can use nativefier and it just works(tm)
|
||||
|
||||
```bash
|
||||
|
@ -253,17 +164,50 @@ yarn global add nativefier
|
|||
nativefier https://riot.im/app/
|
||||
```
|
||||
|
||||
Desktop app configuration
|
||||
=========================
|
||||
The [configuration docs](docs/config.md#desktop-app-configuration) show how to
|
||||
override the desktop app's default settings if desired.
|
||||
|
||||
To run multiple instances of the desktop app for different accounts, you can launch the executable with the `--profile` argument followed by a unique identifier, e.g `riot-web --profile Work` for it to run a separate profile and not interfere with the default one.
|
||||
Running from Docker
|
||||
===================
|
||||
|
||||
To change the config.json for the desktop app, create a config file which will be used to override values in the config which ships in the package:
|
||||
+ `%APPDATA%\$NAME\config.json` on Windows
|
||||
+ `$XDG_CONFIG_HOME\$NAME\config.json` or `~/.config/$NAME/config.json` on Linux
|
||||
+ `~Library/Application Support/$NAME/config.json` on macOS
|
||||
The Docker image can be used to serve riot-web as a web server. The easiest way to use
|
||||
it is to use the prebuilt image:
|
||||
```bash
|
||||
docker run -p 80:80 vectorim/riot-web
|
||||
```
|
||||
|
||||
In the paths above, `$NAME` is typically `Riot`, unless you use `--profile $PROFILE` in which case it becomes `Riot-$PROFILE`.
|
||||
To supply your own custom `config.json`, map a volume to `/app/config.json`. For example,
|
||||
if your custom config was located at `/etc/riot-web/config.json` then your Docker command
|
||||
would be:
|
||||
```bash
|
||||
docker run -p 80:80 -v /etc/riot-web/config.json:/app/config.json vectorim/riot-web
|
||||
```
|
||||
|
||||
To build the image yourself:
|
||||
```bash
|
||||
git clone https://github.com/vector-im/riot-web.git riot-web
|
||||
cd riot-web
|
||||
git checkout master
|
||||
docker build -t vectorim/riot-web .
|
||||
```
|
||||
|
||||
If you're building a custom branch, or want to use the develop branch, check out the appropriate
|
||||
riot-web branch and then run:
|
||||
```bash
|
||||
docker build -t vectorim/riot-web:develop \
|
||||
--build-arg USE_CUSTOM_SDKS=true \
|
||||
--build-arg REACT_SDK_REPO="https://github.com/matrix-org/matrix-react-sdk.git" \
|
||||
--build-arg REACT_SDK_BRANCH="develop" \
|
||||
--build-arg JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git" \
|
||||
--build-arg JS_SDK_BRANCH="develop" \
|
||||
.
|
||||
```
|
||||
|
||||
config.json
|
||||
===========
|
||||
|
||||
Riot supports a variety of settings to configure default servers, behaviour, themes, etc.
|
||||
See the [configuration docs](docs/config.md) for more details.
|
||||
|
||||
Labs Features
|
||||
=============
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"default_hs_url": "https://matrix.org",
|
||||
"default_is_url": "https://vector.im",
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix.org",
|
||||
"server_name": "matrix.org"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://vector.im"
|
||||
}
|
||||
},
|
||||
"disable_custom_urls": false,
|
||||
"disable_guests": false,
|
||||
"disable_login_language_selector": false,
|
||||
|
@ -10,9 +17,13 @@
|
|||
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"defaultCountryCode": "GB",
|
||||
"showLabsSettings": false,
|
||||
"features": {
|
||||
"feature_groups": "labs",
|
||||
"feature_pinning": "labs"
|
||||
"feature_pinning": "labs",
|
||||
"feature_reactions": "labs",
|
||||
"feature_message_editing": "labs"
|
||||
},
|
||||
"default_federate": true,
|
||||
"default_theme": "light",
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
Configuration
|
||||
=============
|
||||
|
||||
You can configure the app by copying `config.sample.json` to
|
||||
`config.json` and customising it:
|
||||
|
||||
For a good example, see https://riot.im/develop/config.json.
|
||||
|
||||
1. `default_server_config` sets the default homeserver and identity server URL for
|
||||
Riot to use. The object is the same as returned by [https://<server_name>/.well-known/matrix/client](https://matrix.org/docs/spec/client_server/latest.html#get-well-known-matrix-client),
|
||||
with added support for a `server_name` under the `m.homeserver` section to display
|
||||
a custom homeserver name. Alternatively, the config can contain a `default_server_name`
|
||||
instead which is where Riot will go to get that same object, although this option is
|
||||
deprecated - see the `.well-known` link above for more information on using this option.
|
||||
Note that the `default_server_name` is used to get a complete server configuration
|
||||
whereas the `server_name` in the `default_server_config` is for display purposes only.
|
||||
* *Note*: The URLs can also be individually specified as `default_hs_url` and
|
||||
`default_is_url`, however these are deprecated. They are maintained for backwards
|
||||
compatibility with older configurations. `default_is_url` is respected only
|
||||
if `default_hs_url` is used.
|
||||
* The identity server is used for verifying third party identifiers like emails
|
||||
and phone numbers. It is not used to store your password or account information.
|
||||
If not provided, the identity server defaults to vector.im. Currently the only
|
||||
two public identity servers are https://matrix.org and https://vector.im, however
|
||||
in future identity servers will be decentralised. In the future it will be possible
|
||||
to disable the identity server functionality.
|
||||
* Riot will fail to load if a mix of `default_server_config`, `default_server_name`, or
|
||||
`default_hs_url` is specified. When multiple sources are specified, it is unclear
|
||||
which should take priority and therefore the application cannot continue.
|
||||
1. `features`: Lookup of optional features that may be `enable`d, `disable`d, or exposed to the user
|
||||
in the `labs` section of settings. The available optional experimental features vary from
|
||||
release to release. Some of the available features are described in the Labs Feature section
|
||||
of this README.
|
||||
1. `showLabsSettings`: Shows the "labs" tab of user settings even when no `features` are enabled
|
||||
or present. Useful for getting at settings which may be otherwise hidden.
|
||||
1. `brand`: String to pass to your homeserver when configuring email notifications, to let the
|
||||
homeserver know what email template to use when talking to you.
|
||||
1. `branding`: Configures various branding and logo details, such as:
|
||||
1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app
|
||||
during authentication flows
|
||||
1. `authHeaderLogoUrl`: An logo image that is shown in the header during
|
||||
authentication flows
|
||||
1. `authFooterLinks`: a list of links to show in the authentication page footer:
|
||||
`[{"text": "Link text", "url": "https://link.target"}, {"text": "Other link", ...}]`
|
||||
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
|
||||
server is not Riot and normally not your homeserver either. The integration server settings
|
||||
may be left blank to disable integrations.
|
||||
1. `integrations_rest_url`: URL to the REST interface for the integrations server.
|
||||
1. `integrations_widgets_urls`: list of URLs to the REST interface for the widget integrations server.
|
||||
1. `bug_report_endpoint_url`: endpoint to send bug reports to (must be running a
|
||||
https://github.com/matrix-org/rageshake server). Bug reports are sent when a user clicks
|
||||
"Send Logs" within the application. Bug reports can be disabled by leaving the
|
||||
`bug_report_endpoint_url` out of your config file.
|
||||
1. `roomDirectory`: config for the public room directory. This section is optional.
|
||||
1. `roomDirectory.servers`: List of other homeservers' directories to include in the drop
|
||||
down list. Optional.
|
||||
1. `default_theme`: name of theme to use by default (e.g. 'light')
|
||||
1. `update_base_url` (electron app only): HTTPS URL to a web server to download
|
||||
updates from. This should be the path to the directory containing `macos`
|
||||
and `win32` (for update packages, not installer packages).
|
||||
1. `cross_origin_renderer_url`: URL to a static HTML page hosting code to help display
|
||||
encrypted file attachments. This MUST be hosted on a completely separate domain to
|
||||
anything else since it is used to isolate the privileges of file attachments to this
|
||||
domain. Default: `https://usercontent.riot.im/v1.html`. This needs to contain v1.html from
|
||||
https://github.com/matrix-org/usercontent/blob/master/v1.html
|
||||
1. `piwik`: Analytics can be disabled by setting `piwik: false` or by leaving the piwik config
|
||||
option out of your config file. If you want to enable analytics, set `piwik` to be an object
|
||||
containing the following properties:
|
||||
1. `url`: The URL of the Piwik instance to use for collecting analytics
|
||||
1. `whitelistedHSUrls`: a list of HS URLs to not redact from the analytics
|
||||
1. `whitelistedISUrls`: a list of IS URLs to not redact from the analytics
|
||||
1. `siteId`: The Piwik Site ID to use when sending analytics to the Piwik server configured above
|
||||
1. `welcomeUserId`: the user ID of a bot to invite whenever users register that can give them a tour
|
||||
1. `embeddedPages`: Configures the pages displayed in portions of Riot that
|
||||
embed static files, such as:
|
||||
1. `welcomeUrl`: Initial content shown on the outside of the app when not
|
||||
logged in. Defaults to `welcome.html` supplied with Riot.
|
||||
1. `homeUrl`: Content shown on the inside of the app when a specific room is
|
||||
not selected. By default, no home page is configured. If one is set, a
|
||||
button to access it will be shown in the top left menu.
|
||||
1. `defaultCountryCode`: The ISO 3166 alpha2 country code to use when showing
|
||||
country selectors, like the phone number input on the registration page.
|
||||
Defaults to `GB` if the given code is unknown or not provided.
|
||||
|
||||
Note that `index.html` also has an og:image meta tag that is set to an image
|
||||
hosted on riot.im. This is the image used if links to your copy of Riot
|
||||
appear in some websites like Facebook, and indeed Riot itself. This has to be
|
||||
static in the HTML and an absolute URL (and HTTP rather than HTTPS), so it's
|
||||
not possible for this to be an option in config.json. If you'd like to change
|
||||
it, you can build Riot, but run
|
||||
`RIOT_OG_IMAGE_URL="http://example.com/logo.png" yarn build`.
|
||||
Alternatively, you can edit the `og:image` meta tag in `index.html` directly
|
||||
each time you download a new version of Riot.
|
||||
|
||||
Desktop app configuration
|
||||
=========================
|
||||
|
||||
To run multiple instances of the desktop app for different accounts, you can
|
||||
launch the executable with the `--profile` argument followed by a unique
|
||||
identifier, e.g `riot-web --profile Work` for it to run a separate profile and
|
||||
not interfere with the default one.
|
||||
|
||||
Alternatively, a custom location for the profile data can be specified using the
|
||||
`--profile-dir` flag followed by the desired path.
|
||||
|
||||
+ `%APPDATA%\$NAME\config.json` on Windows
|
||||
+ `$XDG_CONFIG_HOME\$NAME\config.json` or `~/.config/$NAME/config.json` on Linux
|
||||
+ `~Library/Application Support/$NAME/config.json` on macOS
|
||||
|
||||
In the paths above, `$NAME` is typically `Riot`, unless you use `--profile
|
||||
$PROFILE` in which case it becomes `Riot-$PROFILE`.
|
17
docs/labs.md
17
docs/labs.md
|
@ -1,4 +1,4 @@
|
|||
# riot-web Labs features
|
||||
# Labs features
|
||||
|
||||
Some notes on the features you can enable by going to `Settings->Labs`. Not exhaustive, chat in
|
||||
[#riot-web:matrix.org] for more information.
|
||||
|
@ -29,4 +29,17 @@ Once enabled, send a custom state event to a room to set values:
|
|||
|
||||
That's it. Now should see your new counter under the header.
|
||||
|
||||
[#riot-web:matrix.org]: https://matrix.to/#/#riot-web:matrix.org
|
||||
## Reactions
|
||||
|
||||
`feature_reactions` allows reacting to messages with emoji and displaying
|
||||
reactions from other people. This feature is currently under active development,
|
||||
and only portions have been implemented so far.
|
||||
|
||||
## Message editing
|
||||
|
||||
`feature_message_editing` allows editing messages after they have been sent,
|
||||
accessible from the reaction/context bar when hovering a message.
|
||||
This feature is currently under active development,
|
||||
and only portions have been implemented so far.
|
||||
|
||||
[#riot-web:matrix.org]: https://matrix.to/#/#riot-web:matrix.org
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 13 KiB |
|
@ -2,7 +2,7 @@
|
|||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"main": "src/electron-main.js",
|
||||
"version": "1.0.6",
|
||||
"version": "1.2.4",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
This directory contains the config file for the official riot.im distribution
|
||||
of Riot Desktop. You probably do not want to build with this config unless
|
||||
you're building the official riot.im distribution, or you'll find your builds
|
||||
will replace themselves with the riot.im build.
|
||||
of Riot Desktop.
|
||||
|
||||
You probably do not want to build with this config unless you're building the
|
||||
official riot.im distribution, or you'll find your builds will replace
|
||||
themselves with the riot.im build.
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"update_base_url": "https://riot.im/download/desktop/update/",
|
||||
"update_base_url": "https://packages.riot.im/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",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api",
|
||||
"https://scalar.vector.im/api"
|
||||
],
|
||||
|
@ -29,7 +30,9 @@
|
|||
}
|
||||
},
|
||||
"features": {
|
||||
"feature_lazyloading": "enable"
|
||||
"feature_lazyloading": "enable",
|
||||
"feature_reactions": "enable",
|
||||
"feature_message_editing": "enable"
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
Copyright 2016 Aviral Dasgupta
|
||||
Copyright 2016 OpenMarket Ltd
|
||||
Copyright 2017 Michael Telatynski <7t3chguy@gmail.com>
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2017, 2019 Michael Telatynski <7t3chguy@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -43,7 +43,9 @@ const Store = require('electron-store');
|
|||
// migrating to mitigate any risk of it being used maliciously.
|
||||
let migratingOrigin = false;
|
||||
|
||||
if (argv['profile']) {
|
||||
if (argv['profile-dir']) {
|
||||
app.setPath('userData', argv['profile-dir']);
|
||||
} else if (argv['profile']) {
|
||||
app.setPath('userData', `${app.getPath('userData')}-${argv['profile']}`);
|
||||
}
|
||||
|
||||
|
@ -172,6 +174,9 @@ ipcMain.on('ipcCall', async function(ev, payload) {
|
|||
await migrateFromOldOrigin();
|
||||
migratingOrigin = false;
|
||||
break;
|
||||
case 'getConfig':
|
||||
ret = vectorConfig;
|
||||
break;
|
||||
default:
|
||||
mainWindow.webContents.send('ipcReply', {
|
||||
id: payload.id,
|
||||
|
@ -294,7 +299,10 @@ app.on('ready', () => {
|
|||
console.log('No update_base_url is defined: auto update is disabled');
|
||||
}
|
||||
|
||||
const iconPath = `${__dirname}/../img/riot.${process.platform === 'win32' ? 'ico' : 'png'}`;
|
||||
// It's important to call `path.join` so we don't end up with the packaged
|
||||
// asar in the final path.
|
||||
const iconFile = `riot.${process.platform === 'win32' ? 'ico' : 'png'}`;
|
||||
const iconPath = path.join(__dirname, "..", "..", "img", iconFile);
|
||||
|
||||
// Load the previous window state with fallback to defaults
|
||||
const mainWindowState = windowStateKeeper({
|
||||
|
|
|
@ -65,7 +65,7 @@ exports.create = function(config) {
|
|||
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
|
||||
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
|
||||
if (lastFavicon !== null) {
|
||||
win.setIcon(defaultIcon);
|
||||
global.mainWindow.setIcon(defaultIcon);
|
||||
trayIcon.setImage(defaultIcon);
|
||||
lastFavicon = null;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,11 @@ function onWindowOrNavigate(ev, target) {
|
|||
}
|
||||
|
||||
function onLinkContextMenu(ev, params) {
|
||||
const url = params.linkURL || params.srcURL;
|
||||
let url = params.linkURL || params.srcURL;
|
||||
|
||||
if (url.startsWith('vector://vector/webapp')) {
|
||||
url = "https://riot.im/app/" + url.substring(23);
|
||||
}
|
||||
|
||||
const popupMenu = new Menu();
|
||||
// No point trying to open blob: URLs in an external browser: it ain't gonna work.
|
||||
|
|
|
@ -100,7 +100,7 @@ module.exports = function (config) {
|
|||
|
||||
// test results reporter to use
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['logcapture', 'spec', 'junit', 'summary'],
|
||||
reporters: ['logcapture', 'spec', 'summary'],
|
||||
|
||||
specReporter: {
|
||||
suppressErrorSummary: false, // do print error summary
|
||||
|
@ -159,10 +159,6 @@ module.exports = function (config) {
|
|||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity,
|
||||
|
||||
junitReporter: {
|
||||
outputDir: 'karma-reports',
|
||||
},
|
||||
|
||||
webpack: webpack_config,
|
||||
|
||||
webpackMiddleware: {
|
||||
|
|
29
package.json
29
package.json
|
@ -2,7 +2,7 @@
|
|||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"main": "electron_app/src/electron-main.js",
|
||||
"version": "1.0.6",
|
||||
"version": "1.2.4",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"repository": {
|
||||
|
@ -30,12 +30,16 @@
|
|||
"reskindex:watch": "reskindex -h src/header -w",
|
||||
"i18n": "matrix-gen-i18n",
|
||||
"prunei18n": "matrix-prune-i18n",
|
||||
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
|
||||
"build:res": "node scripts/copy-res.js",
|
||||
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||
"build:compile": "yarn reskindex && babel --source-maps -d lib src",
|
||||
"build:bundle": "cross-env NODE_ENV=production webpack -p --progress --bail --mode production",
|
||||
"build:bundle:dev": "webpack --progress --bail --mode development",
|
||||
"build:electron": "yarn clean && yarn build && yarn install:electron && build -wml --ia32 --x64",
|
||||
"build:electron:linux": "yarn build && build -l --x64",
|
||||
"build:electron:macos": "yarn build && build -m --x64",
|
||||
"build:electron:windows": "yarn build && build -w --ia32 --x64",
|
||||
"build:react-sdk": "node scripts/yarn-sub.js matrix-react-sdk build",
|
||||
"build:js-sdk": "node scripts/yarn-sub.js matrix-js-sdk start:init",
|
||||
"build": "yarn build:js-sdk && yarn build:react-sdk && yarn reskindex && yarn build:res && yarn build:bundle",
|
||||
|
@ -70,10 +74,10 @@
|
|||
"gemini-scrollbar": "github:matrix-org/gemini-scrollbar#b302279",
|
||||
"gfm.css": "^1.1.2",
|
||||
"highlight.js": "^9.13.1",
|
||||
"matrix-js-sdk": "1.0.3",
|
||||
"matrix-react-sdk": "1.0.6",
|
||||
"matrix-js-sdk": "2.1.1",
|
||||
"matrix-react-sdk": "1.3.1",
|
||||
"modernizr": "^3.6.0",
|
||||
"olm": "https://matrix.org/packages/npm/olm/olm-3.1.0-pre3.tgz",
|
||||
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.0.tgz",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^15.6.0",
|
||||
"react-dom": "^15.6.0",
|
||||
|
@ -88,7 +92,9 @@
|
|||
"babel-eslint": "^8.1.1",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"babel-plugin-transform-async-to-bluebird": "^1.1.1",
|
||||
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
|
@ -102,10 +108,9 @@
|
|||
"cpx": "^1.3.2",
|
||||
"cross-env": "^4.0.0",
|
||||
"css-loader": "^2.1.0",
|
||||
"electron-builder": "^20.38.5",
|
||||
"electron-builder-squirrel-windows": "^20.38.5",
|
||||
"electron-builder": "^20.44.4",
|
||||
"electron-builder-squirrel-windows": "^21.0.6",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"emojione": "^2.2.7",
|
||||
"eslint": "^5.8.0",
|
||||
"eslint-config-google": "^0.7.1",
|
||||
"eslint-plugin-babel": "^4.1.2",
|
||||
|
@ -119,7 +124,6 @@
|
|||
"karma": "^3.1.2",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cli": "^1.0.1",
|
||||
"karma-junit-reporter": "^2.0.0",
|
||||
"karma-logcapture-reporter": "0.0.1",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
|
@ -150,13 +154,16 @@
|
|||
},
|
||||
"build": {
|
||||
"appId": "im.riot.app",
|
||||
"electronVersion": "4.1.3",
|
||||
"electronVersion": "4.2.6",
|
||||
"files": [
|
||||
"node_modules/**",
|
||||
"src/**",
|
||||
"img/**"
|
||||
"src/**"
|
||||
],
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "electron_app/img",
|
||||
"to": "img"
|
||||
},
|
||||
"webapp/**/*",
|
||||
"origin_migrator/**/*"
|
||||
],
|
||||
|
|
|
@ -1 +1 @@
|
|||
signing_id: packages@riot.im
|
||||
signing_id: releases@riot.im
|
||||
|
|
|
@ -149,6 +149,15 @@ h1::after {
|
|||
background-image: url('welcome/images/icon-room-directory.svg');
|
||||
}
|
||||
|
||||
/*
|
||||
.mx_WelcomePage_loggedIn is applied by EmbeddedPage from the Welcome component
|
||||
If it is set on the page, we should show the buttons. Otherwise, we have to assume
|
||||
we don't have an account and should hide them. No account == no guest account either.
|
||||
*/
|
||||
.mx_WelcomePage:not(.mx_WelcomePage_loggedIn) .mx_WelcomePage_guestFunctions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="mx_Parent">
|
||||
|
@ -169,9 +178,9 @@ h1::after {
|
|||
<!-- The comments below are meant to be used by Ansible as a quick way
|
||||
to strip out the marked content when desired.
|
||||
See https://github.com/vector-im/riot-web/issues/8622.
|
||||
TODO: Convert to config option if possible. -->
|
||||
TODO: Strip out these comments and rely on the guest flag -->
|
||||
<!-- BEGIN Ansible: Remove these lines when guest access is disabled -->
|
||||
<div class="mx_ButtonRow">
|
||||
<div class="mx_ButtonRow mx_WelcomePage_guestFunctions">
|
||||
<div>
|
||||
<div class="mx_ButtonWrapperText">_t("Need help?")</div>
|
||||
<a href="#/user/@riot-bot:matrix.org?action=chat" class="mx_ButtonParent mx_SecondaryButton mx_Button_iconHelp">
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
This directory contains the config files and deployment scripts for the official
|
||||
riot.im distribution of Riot Web at https://riot.im.
|
||||
|
||||
You probably do not want to build with this config unless you're building the
|
||||
official riot.im distribution, but these files may be useful if you want to
|
||||
inspect the configuration used there.
|
||||
|
||||
Riot Desktop uses a separate config (see electron_app/riot.im/config.json).
|
||||
|
||||
Deployment scripts (such as app/deploy.py) are meant to be run on the web server
|
||||
hosting the Riot installation.
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"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",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"hosting_signup_link": "https://modular.im/?utm_source=riot-web&utm_medium=web",
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"welcomeUserId": "@riot-bot:matrix.org",
|
||||
"piwik": {
|
||||
"url": "https://piwik.riot.im/",
|
||||
"siteId": 1,
|
||||
"policyUrl": "https://matrix.org/docs/guides/riot_im_cookie_policy"
|
||||
},
|
||||
"phasedRollOut": {
|
||||
"feature_lazyloading": {
|
||||
"offset": 1539684000000,
|
||||
"period": 604800000
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"feature_lazyloading": "enable",
|
||||
"feature_room_breadcrumbs": "labs"
|
||||
},
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"matrix.org"
|
||||
]
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false
|
||||
},
|
||||
"terms_and_conditions_links": [
|
||||
{
|
||||
"url": "https://riot.im/privacy",
|
||||
"text": "Privacy Policy"
|
||||
},
|
||||
{
|
||||
"url": "https://matrix.org/docs/guides/riot_im_cookie_policy",
|
||||
"text": "Cookie Policy"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# download and unpack a riot-web tarball.
|
||||
#
|
||||
# Allows `bundles` to be extracted to a common directory, and a link to
|
||||
# config.json to be added.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import shutil
|
||||
import glob
|
||||
|
||||
try:
|
||||
# python3
|
||||
from urllib.request import urlretrieve
|
||||
except ImportError:
|
||||
# python2
|
||||
from urllib import urlretrieve
|
||||
|
||||
class DeployException(Exception):
|
||||
pass
|
||||
|
||||
def create_relative_symlink(linkname, target):
|
||||
relpath = os.path.relpath(target, os.path.dirname(linkname))
|
||||
print ("Symlink %s -> %s" % (linkname, relpath))
|
||||
os.symlink(relpath, linkname)
|
||||
|
||||
|
||||
def move_bundles(source, dest):
|
||||
"""Move the contents of the 'bundles' directory to a common dir
|
||||
|
||||
We check that we will not be overwriting anything before we proceed.
|
||||
|
||||
Args:
|
||||
source (str): path to 'bundles' within the extracted tarball
|
||||
dest (str): target common directory
|
||||
"""
|
||||
|
||||
if not os.path.isdir(dest):
|
||||
os.mkdir(dest)
|
||||
|
||||
# build a map from source to destination, checking for non-existence as we go.
|
||||
renames = {}
|
||||
for f in os.listdir(source):
|
||||
dst = os.path.join(dest, f)
|
||||
if os.path.exists(dst):
|
||||
print (
|
||||
"Skipping bundle. The bundle includes '%s' which we have previously deployed."
|
||||
% f
|
||||
)
|
||||
else:
|
||||
renames[os.path.join(source, f)] = dst
|
||||
|
||||
for (src, dst) in renames.iteritems():
|
||||
print ("Move %s -> %s" % (src, dst))
|
||||
os.rename(src, dst)
|
||||
|
||||
class Deployer:
|
||||
def __init__(self):
|
||||
self.packages_path = "."
|
||||
self.bundles_path = None
|
||||
self.should_clean = False
|
||||
# filename -> symlink path e.g 'config.localhost.json' => '../localhost/config.json'
|
||||
self.symlink_paths = {}
|
||||
self.verify_signature = True
|
||||
|
||||
def deploy(self, tarball, extract_path):
|
||||
"""Download a tarball if necessary, and unpack it
|
||||
|
||||
Returns:
|
||||
(str) the path to the unpacked deployment
|
||||
"""
|
||||
print("Deploying %s to %s" % (tarball, extract_path))
|
||||
|
||||
name_str = os.path.basename(tarball).replace(".tar.gz", "")
|
||||
extracted_dir = os.path.join(extract_path, name_str)
|
||||
if os.path.exists(extracted_dir):
|
||||
raise DeployException('Cannot unpack %s: %s already exists' % (
|
||||
tarball, extracted_dir))
|
||||
|
||||
downloaded = False
|
||||
if tarball.startswith("http://") or tarball.startswith("https://"):
|
||||
tarball = self.download_and_verify(tarball)
|
||||
print("Downloaded file: %s" % tarball)
|
||||
downloaded = True
|
||||
|
||||
try:
|
||||
with tarfile.open(tarball) as tar:
|
||||
tar.extractall(extract_path)
|
||||
finally:
|
||||
if self.should_clean and downloaded:
|
||||
os.remove(tarball)
|
||||
|
||||
print ("Extracted into: %s" % extracted_dir)
|
||||
|
||||
if self.symlink_paths:
|
||||
for link_path, file_path in self.symlink_paths.iteritems():
|
||||
create_relative_symlink(
|
||||
target=file_path,
|
||||
linkname=os.path.join(extracted_dir, link_path)
|
||||
)
|
||||
|
||||
if self.bundles_path:
|
||||
extracted_bundles = os.path.join(extracted_dir, 'bundles')
|
||||
move_bundles(source=extracted_bundles, dest=self.bundles_path)
|
||||
|
||||
# replace the extracted_bundles dir (which may not be empty if some
|
||||
# bundles were skipped) with a symlink to the common dir.
|
||||
shutil.rmtree(extracted_bundles)
|
||||
create_relative_symlink(
|
||||
target=self.bundles_path,
|
||||
linkname=extracted_bundles,
|
||||
)
|
||||
return extracted_dir
|
||||
|
||||
def download_and_verify(self, url):
|
||||
tarball = self.download_file(url)
|
||||
|
||||
if self.verify_signature:
|
||||
sigfile = self.download_file(url + ".asc")
|
||||
subprocess.check_call(["gpg", "--verify", sigfile, tarball])
|
||||
|
||||
return tarball
|
||||
|
||||
def download_file(self, url):
|
||||
if not os.path.isdir(self.packages_path):
|
||||
os.mkdir(self.packages_path)
|
||||
local_filename = os.path.join(self.packages_path,
|
||||
url.split('/')[-1])
|
||||
sys.stdout.write("Downloading %s -> %s..." % (url, local_filename))
|
||||
sys.stdout.flush()
|
||||
urlretrieve(url, local_filename)
|
||||
print ("Done")
|
||||
return local_filename
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser("Deploy a Riot build on a web server.")
|
||||
parser.add_argument(
|
||||
"-p", "--packages-dir", default="./packages", help=(
|
||||
"The directory to download the tarball into. (Default: '%(default)s')"
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-e", "--extract-path", default="./deploys", help=(
|
||||
"The location to extract .tar.gz files to. (Default: '%(default)s')"
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-b", "--bundles-dir", nargs='?', default="./bundles", help=(
|
||||
"A directory to move the contents of the 'bundles' directory to. A \
|
||||
symlink to the bundles directory will also be written inside the \
|
||||
extracted tarball. Example: './bundles'. \
|
||||
(Default: '%(default)s')"
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-c", "--clean", action="store_true", default=False, help=(
|
||||
"Remove .tar.gz files after they have been downloaded and extracted. \
|
||||
(Default: %(default)s)"
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"--include", nargs='*', default=['./config*.json'], help=(
|
||||
"Symlink these files into the root of the deployed tarball. \
|
||||
Useful for config files and home pages. Supports glob syntax. \
|
||||
(Default: '%(default)s')"
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"tarball", help=(
|
||||
"filename of tarball, or URL to download."
|
||||
),
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
deployer = Deployer()
|
||||
deployer.packages_path = args.packages_dir
|
||||
deployer.bundles_path = args.bundles_dir
|
||||
deployer.should_clean = args.clean
|
||||
|
||||
for include in args.include:
|
||||
deployer.symlink_paths.update({ os.path.basename(pth): pth for pth in glob.iglob(include) })
|
||||
|
||||
deployer.deploy(args.tarball, args.extract_path)
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"default_hs_url": "https://matrix.org",
|
||||
"default_is_url": "https://vector.im",
|
||||
"brand": "Riot",
|
||||
"integrations_ui_url": "https://scalar-staging.vector.im/",
|
||||
"integrations_rest_url": "https://scalar-staging.vector.im/api",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar-staging.riot.im/scalar/api",
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar.vector.im/api"
|
||||
],
|
||||
"hosting_signup_link": "https://modular.im/?utm_source=riot-web&utm_medium=web",
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"features": {
|
||||
"feature_rich_quoting": "labs",
|
||||
"feature_pinning": "labs",
|
||||
"feature_presence_management": "labs",
|
||||
"feature_sticker_messages": "labs",
|
||||
"feature_jitsi": "labs",
|
||||
"feature_tag_panel": "enable",
|
||||
"feature_keybackup": "labs",
|
||||
"feature_custom_status": "labs",
|
||||
"feature_custom_tags": "labs",
|
||||
"feature_lazyloading": "enable",
|
||||
"feature_tabbed_settings": "labs",
|
||||
"feature_sas": "labs",
|
||||
"feature_room_breadcrumbs": "labs",
|
||||
"feature_state_counters": "labs",
|
||||
"feature_reactions": "enable",
|
||||
"feature_message_editing": "enable"
|
||||
},
|
||||
"welcomeUserId": "@riot-bot:matrix.org",
|
||||
"piwik": {
|
||||
"url": "https://piwik.riot.im/",
|
||||
"siteId": 1,
|
||||
"policyUrl": "https://matrix.org/docs/guides/riot_im_cookie_policy"
|
||||
},
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"matrix.org"
|
||||
]
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false
|
||||
},
|
||||
"terms_and_conditions_links": [
|
||||
{
|
||||
"url": "https://riot.im/privacy",
|
||||
"text": "Privacy Policy"
|
||||
},
|
||||
{
|
||||
"url": "https://matrix.org/docs/guides/riot_im_cookie_policy",
|
||||
"text": "Cookie Policy"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,24 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
# Runs package.sh setting the version to git hashes of the riot-web,
|
||||
# react-sdk & js-sdk checkouts, for the case where these dependencies
|
||||
# are git checkouts.
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
||||
nvm use 10
|
||||
|
||||
set -x
|
||||
|
||||
# check out corresponding branches of dependencies.
|
||||
# clone the deps with depth 1: we know we will only ever need that one commit.
|
||||
`dirname $0`/fetch-develop.deps.sh --depth 1
|
||||
|
||||
yarn install
|
||||
|
||||
# run the mocha tests
|
||||
yarn test
|
||||
|
||||
# run eslint
|
||||
yarn lintall -- -f checkstyle -o eslint.xml || true
|
||||
set -ex
|
||||
|
||||
rm dist/riot-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
const fs = require("fs");
|
||||
|
||||
if (process.argv.length < 4) throw new Error("Missing source and target file arguments");
|
||||
|
||||
const sourceFile = fs.readFileSync(process.argv[2], 'utf8');
|
||||
const targetFile = fs.readFileSync(process.argv[3], 'utf8');
|
||||
|
||||
if (sourceFile !== targetFile) {
|
||||
throw new Error("Files do not match");
|
||||
}
|
|
@ -38,11 +38,13 @@ const INCLUDE_LANGS = [
|
|||
{'value': 'pt_BR', 'label': 'Português do Brasil'},
|
||||
{'value': 'ru', 'label': 'Русский'},
|
||||
{'value': 'sk', 'label': 'Slovenčina'},
|
||||
{'value': 'sq', 'label': 'Shqip'},
|
||||
{'value': 'sr', 'label': 'српски'},
|
||||
{'value': 'sv', 'label': 'Svenska'},
|
||||
{'value': 'te', 'label': 'తెలుగు'},
|
||||
{'value': 'th', 'label': 'ไทย'},
|
||||
{'value': 'tr', 'label': 'Türk'},
|
||||
{'value': 'vls', 'label': 'West-Vlaams'},
|
||||
{'value': 'zh_Hans', 'label': '简体中文'}, // simplified chinese
|
||||
{'value': 'zh_Hant', 'label': '繁體中文'}, // traditional chinese
|
||||
];
|
||||
|
@ -57,8 +59,6 @@ const COPY_LIST = [
|
|||
["res/themes/**", "webapp/themes"],
|
||||
["res/vector-icons/**", "webapp/vector-icons"],
|
||||
["node_modules/matrix-react-sdk/res/media/**", "webapp/media"],
|
||||
["node_modules/emojione/assets/svg/*", "webapp/emojione/svg/"],
|
||||
["node_modules/emojione/assets/png/*", "webapp/emojione/png/"],
|
||||
["node_modules/olm/olm_legacy.js", "webapp", { directwatch: 1 }],
|
||||
["./config.json", "webapp", { directwatch: 1 }],
|
||||
];
|
||||
|
|
|
@ -166,7 +166,7 @@ if __name__ == "__main__":
|
|||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"--include", nargs='*', default='./config*.json', help=(
|
||||
"--include", nargs='*', default=['./config*.json'], help=(
|
||||
"Symlink these files into the root of the deployed tarball. \
|
||||
Useful for config files and home pages. Supports glob syntax. \
|
||||
(Default: '%(default)s')"
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
if [ $USE_CUSTOM_SDKS == false ]
|
||||
then
|
||||
echo "skipping react-sdk and js-sdk installs: USE_CUSTOM_SDKS is false"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Linking js-sdk"
|
||||
git clone $JS_SDK_REPO js-sdk
|
||||
cd js-sdk
|
||||
git checkout $JS_SDK_BRANCH
|
||||
yarn link
|
||||
yarn --network-timeout=100000 install
|
||||
cd ../
|
||||
|
||||
echo "Linking react-sdk"
|
||||
git clone $REACT_SDK_REPO react-sdk
|
||||
cd react-sdk
|
||||
git checkout $REACT_SDK_BRANCH
|
||||
yarn link
|
||||
yarn link matrix-js-sdk
|
||||
yarn --network-timeout=100000 install
|
||||
cd ../
|
||||
|
||||
echo "Setting up riot-web with react-sdk and js-sdk packages"
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-react-sdk
|
|
@ -23,6 +23,9 @@ cp config.sample.json webapp/
|
|||
mkdir -p dist
|
||||
cp -r webapp riot-$version
|
||||
|
||||
# Just in case you have a local config, remove it before packaging
|
||||
rm riot-$version/config.json || true
|
||||
|
||||
# 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
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
#
|
||||
# auto-deploy script for https://riot.im/develop
|
||||
#
|
||||
# Listens for HTTP hits. When it gets one, downloads the artifact from jenkins
|
||||
# Listens for buildkite webhook pokes (https://buildkite.com/docs/apis/webhooks)
|
||||
# When it gets one, downloads the artifact from buildkite
|
||||
# and deploys it as the new version.
|
||||
#
|
||||
# Requires the following python packages:
|
||||
|
@ -16,6 +17,10 @@ import time
|
|||
import traceback
|
||||
from urlparse import urljoin
|
||||
import glob
|
||||
import re
|
||||
import shutil
|
||||
import threading
|
||||
from Queue import Queue
|
||||
|
||||
from flask import Flask, jsonify, request, abort
|
||||
|
||||
|
@ -23,10 +28,13 @@ from deploy import Deployer, DeployException
|
|||
|
||||
app = Flask(__name__)
|
||||
|
||||
arg_jenkins_url = None
|
||||
deployer = None
|
||||
arg_extract_path = None
|
||||
arg_symlink = None
|
||||
arg_webhook_token = None
|
||||
arg_api_token = None
|
||||
|
||||
workQueue = Queue()
|
||||
|
||||
def create_symlink(source, linkname):
|
||||
try:
|
||||
|
@ -39,81 +47,117 @@ def create_symlink(source, linkname):
|
|||
else:
|
||||
raise e
|
||||
|
||||
def req_headers():
|
||||
return {
|
||||
"Authorization": "Bearer %s" % (arg_api_token,),
|
||||
}
|
||||
|
||||
# Buildkite considers a poke to have failed if it has to wait more than 10s for
|
||||
# data (any data, not just the initial response) and it normally takes longer than
|
||||
# that to download an artifact from buildkite. Apparently there is no way in flask
|
||||
# to finish the response and then keep doing stuff, so instead this has to involve
|
||||
# threading. Sigh.
|
||||
def worker_thread():
|
||||
while True:
|
||||
toDeploy = workQueue.get()
|
||||
deploy_buildkite_artifact(*toDeploy)
|
||||
|
||||
@app.route("/", methods=["POST"])
|
||||
def on_receive_jenkins_poke():
|
||||
# {
|
||||
# "name": "VectorWebDevelop",
|
||||
# "build": {
|
||||
# "number": 8
|
||||
# }
|
||||
# }
|
||||
def on_receive_buildkite_poke():
|
||||
got_webhook_token = request.headers.get('X-Buildkite-Token')
|
||||
if got_webhook_token != arg_webbook_token:
|
||||
print("Denying request with incorrect webhook token: %s" % (got_webhook_token,))
|
||||
abort(400, "Incorrect webhook token")
|
||||
return
|
||||
|
||||
required_api_prefix = None
|
||||
if arg_buildkite_org is not None:
|
||||
required_api_prefix = 'https://api.buildkite.com/v2/organizations/%s' % (arg_buildkite_org,)
|
||||
|
||||
incoming_json = request.get_json()
|
||||
if not incoming_json:
|
||||
abort(400, "No JSON provided!")
|
||||
return
|
||||
print("Incoming JSON: %s" % (incoming_json,))
|
||||
|
||||
job_name = incoming_json.get("name")
|
||||
if not isinstance(job_name, basestring):
|
||||
abort(400, "Bad job name: %s" % (job_name,))
|
||||
event = incoming_json.get("event")
|
||||
if event is None:
|
||||
abort(400, "No 'event' specified")
|
||||
return
|
||||
|
||||
build_num = incoming_json.get("build", {}).get("number", 0)
|
||||
if not build_num or build_num <= 0 or not isinstance(build_num, int):
|
||||
abort(400, "Missing or bad build number")
|
||||
if event == 'ping':
|
||||
print("Got ping request - responding")
|
||||
return jsonify({'response': 'pong!'})
|
||||
|
||||
if event != 'build.finished':
|
||||
print("Rejecting '%s' event")
|
||||
abort(400, "Unrecognised event")
|
||||
return
|
||||
|
||||
return fetch_jenkins_build(job_name, build_num)
|
||||
|
||||
def fetch_jenkins_build(job_name, build_num):
|
||||
artifact_url = urljoin(
|
||||
arg_jenkins_url, "job/%s/%s/api/json" % (job_name, build_num)
|
||||
)
|
||||
artifact_response = requests.get(artifact_url).json()
|
||||
|
||||
# {
|
||||
# "actions": [],
|
||||
# "artifacts": [
|
||||
# {
|
||||
# "displayPath": "vector-043f6991a4ed-react-20f77d1224ef-js-0a7efe3e8bd5.tar.gz",
|
||||
# "fileName": "vector-043f6991a4ed-react-20f77d1224ef-js-0a7efe3e8bd5.tar.gz",
|
||||
# "relativePath": "vector-043f6991a4ed-react-20f77d1224ef-js-0a7efe3e8bd5.tar.gz"
|
||||
# }
|
||||
# ],
|
||||
# "building": false,
|
||||
# "description": null,
|
||||
# "displayName": "#11",
|
||||
# "duration": 137976,
|
||||
# "estimatedDuration": 132008,
|
||||
# "executor": null,
|
||||
# "fullDisplayName": "VectorWebDevelop #11",
|
||||
# "id": "11",
|
||||
# "keepLog": false,
|
||||
# "number": 11,
|
||||
# "queueId": 12254,
|
||||
# "result": "SUCCESS",
|
||||
# "timestamp": 1454432640079,
|
||||
# "url": "http://matrix.org/jenkins/job/VectorWebDevelop/11/",
|
||||
# "builtOn": "",
|
||||
# "changeSet": {},
|
||||
# "culprits": []
|
||||
# }
|
||||
if artifact_response.get("result") != "SUCCESS":
|
||||
abort(404, "Not deploying. Build was not marked as SUCCESS.")
|
||||
build_obj = incoming_json.get("build")
|
||||
if build_obj is None:
|
||||
abort(400, "No 'build' object")
|
||||
return
|
||||
|
||||
if len(artifact_response.get("artifacts", [])) != 1:
|
||||
abort(404, "Not deploying. Build has an unexpected number of artifacts.")
|
||||
build_url = build_obj.get('url')
|
||||
if build_url is None:
|
||||
abort(400, "build has no url")
|
||||
return
|
||||
|
||||
tar_gz_path = artifact_response["artifacts"][0]["relativePath"]
|
||||
if not tar_gz_path.endswith(".tar.gz"):
|
||||
abort(404, "Not deploying. Artifact is not a .tar.gz file")
|
||||
if required_api_prefix is not None and not build_url.startswith(required_api_prefix):
|
||||
print("Denying poke for build url with incorrect prefix: %s" % (build_url,))
|
||||
abort(400, "Invalid build url")
|
||||
return
|
||||
|
||||
tar_gz_url = urljoin(
|
||||
arg_jenkins_url, "job/%s/%s/artifact/%s" % (job_name, build_num, tar_gz_path)
|
||||
)
|
||||
build_num = build_obj.get('number')
|
||||
if build_num is None:
|
||||
abort(400, "build has no number")
|
||||
return
|
||||
|
||||
pipeline_obj = incoming_json.get("pipeline")
|
||||
if pipeline_obj is None:
|
||||
abort(400, "No 'pipeline' object")
|
||||
return
|
||||
|
||||
pipeline_name = pipeline_obj.get('name')
|
||||
if pipeline_name is None:
|
||||
abort(400, "pipeline has no name")
|
||||
return
|
||||
|
||||
artifacts_url = build_url + "/artifacts"
|
||||
artifacts_resp = requests.get(artifacts_url, headers=req_headers())
|
||||
artifacts_resp.raise_for_status()
|
||||
artifacts_array = artifacts_resp.json()
|
||||
|
||||
artifact_to_deploy = None
|
||||
for artifact in artifacts_array:
|
||||
if re.match(r"dist/.*.tar.gz", artifact['path']):
|
||||
artifact_to_deploy = artifact
|
||||
if artifact_to_deploy is None:
|
||||
print("No suitable artifacts found")
|
||||
return jsonify({})
|
||||
|
||||
# double paranoia check: make sure the artifact is on the right org too
|
||||
if required_api_prefix is not None and not artifact_to_deploy['url'].startswith(required_api_prefix):
|
||||
print("Denying poke for build url with incorrect prefix: %s" % (artifact_to_deploy['url'],))
|
||||
abort(400, "Refusing to deploy artifact from URL %s", artifact_to_deploy['url'])
|
||||
return
|
||||
|
||||
# there's no point building up a queue of things to deploy, so if there are any pending jobs,
|
||||
# remove them
|
||||
while not workQueue.empty():
|
||||
try:
|
||||
workQueue.get(False)
|
||||
except:
|
||||
pass
|
||||
workQueue.put([artifact_to_deploy, pipeline_name, build_num])
|
||||
|
||||
return jsonify({})
|
||||
|
||||
def deploy_buildkite_artifact(artifact, pipeline_name, build_num):
|
||||
artifact_response = requests.get(artifact['url'], headers=req_headers())
|
||||
artifact_response.raise_for_status()
|
||||
artifact_obj = artifact_response.json()
|
||||
|
||||
# we extract into a directory based on the build number. This avoids the
|
||||
# problem of multiple builds building the same git version and thus having
|
||||
|
@ -122,18 +166,16 @@ def fetch_jenkins_build(job_name, build_num):
|
|||
# a good deploy with a bad one
|
||||
# (b) we'll be overwriting the live deployment, which means people might
|
||||
# see half-written files.
|
||||
build_dir = os.path.join(arg_extract_path, "%s-#%s" % (job_name, build_num))
|
||||
build_dir = os.path.join(arg_extract_path, "%s-#%s" % (pipeline_name, build_num))
|
||||
try:
|
||||
extracted_dir = deploy_tarball(tar_gz_url, build_dir)
|
||||
extracted_dir = deploy_tarball(artifact_obj, build_dir)
|
||||
except DeployException as e:
|
||||
traceback.print_exc()
|
||||
abort(400, e.message)
|
||||
|
||||
create_symlink(source=extracted_dir, linkname=arg_symlink)
|
||||
|
||||
return jsonify({})
|
||||
|
||||
def deploy_tarball(tar_gz_url, build_dir):
|
||||
def deploy_tarball(artifact, build_dir):
|
||||
"""Download a tarball from jenkins and unpack it
|
||||
|
||||
Returns:
|
||||
|
@ -145,20 +187,25 @@ def deploy_tarball(tar_gz_url, build_dir):
|
|||
)
|
||||
os.mkdir(build_dir)
|
||||
|
||||
print("Fetching artifact %s -> %s..." % (artifact['download_url'], artifact['filename']))
|
||||
|
||||
# Download the tarball here as buildkite needs auth to do this
|
||||
# we don't pgp-sign buildkite artifacts, relying on HTTPS and buildkite
|
||||
# not being evil. If that's not good enough for you, don't use riot.im/develop.
|
||||
resp = requests.get(artifact['download_url'], stream=True, headers=req_headers())
|
||||
resp.raise_for_status()
|
||||
with open(artifact['filename'], 'wb') as ofp:
|
||||
shutil.copyfileobj(resp.raw, ofp)
|
||||
print("...download complete. Deploying...")
|
||||
|
||||
# we rely on the fact that flask only serves one request at a time to
|
||||
# ensure that we do not overwrite a tarball from a concurrent request.
|
||||
|
||||
return deployer.deploy(tar_gz_url, build_dir)
|
||||
return deployer.deploy(artifact['filename'], build_dir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser("Runs a Vector redeployment server.")
|
||||
parser.add_argument(
|
||||
"-j", "--jenkins", dest="jenkins", default="https://matrix.org/jenkins/", help=(
|
||||
"The base URL of the Jenkins web server. This will be hit to get the\
|
||||
built artifacts (the .gz file) for redeploying."
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-p", "--port", dest="port", default=4000, type=int, help=(
|
||||
"The port to listen on for requests from Jenkins."
|
||||
|
@ -204,13 +251,33 @@ if __name__ == "__main__":
|
|||
),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--webhook-token", dest="webhook_token", help=(
|
||||
"Only accept pokes with this buildkite token."
|
||||
), required=True,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--api-token", dest="api_token", help=(
|
||||
"API access token for buildkite. Require read_artifacts scope."
|
||||
), required=True,
|
||||
)
|
||||
|
||||
# We require a matching webhook token, but because we take everything else
|
||||
# about what to deploy from the poke body, we can be a little more paranoid
|
||||
# and only accept builds / artifacts from a specific buildkite org
|
||||
parser.add_argument(
|
||||
"--org", dest="buildkite_org", help=(
|
||||
"Lock down to this buildkite org"
|
||||
)
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.jenkins.endswith("/"): # important for urljoin
|
||||
arg_jenkins_url = args.jenkins
|
||||
else:
|
||||
arg_jenkins_url = args.jenkins + "/"
|
||||
arg_extract_path = args.extract
|
||||
arg_symlink = args.symlink
|
||||
arg_webbook_token = args.webhook_token
|
||||
arg_api_token = args.api_token
|
||||
arg_buildkite_org = args.buildkite_org
|
||||
|
||||
if not os.path.isdir(arg_extract_path):
|
||||
os.mkdir(arg_extract_path)
|
||||
|
@ -222,25 +289,20 @@ if __name__ == "__main__":
|
|||
for include in args.include:
|
||||
deployer.symlink_paths.update({ os.path.basename(pth): pth for pth in glob.iglob(include) })
|
||||
|
||||
|
||||
# we don't pgp-sign jenkins artifacts; instead we rely on HTTPS access to
|
||||
# the jenkins server (and the jenkins server not being compromised and/or
|
||||
# github not serving it compromised source). If that's not good enough for
|
||||
# you, don't use riot.im/develop.
|
||||
deployer.verify_signature = False
|
||||
|
||||
if args.tarball_uri is not None:
|
||||
build_dir = os.path.join(arg_extract_path, "test-%i" % (time.time()))
|
||||
deploy_tarball(args.tarball_uri, build_dir)
|
||||
else:
|
||||
print(
|
||||
"Listening on port %s. Extracting to %s%s. Symlinking to %s. Jenkins URL: %s. Include files: %s" %
|
||||
"Listening on port %s. Extracting to %s%s. Symlinking to %s. Include files: %s" %
|
||||
(args.port,
|
||||
arg_extract_path,
|
||||
" (clean after)" if deployer.should_clean else "",
|
||||
arg_symlink,
|
||||
arg_jenkins_url,
|
||||
deployer.symlink_paths,
|
||||
)
|
||||
)
|
||||
app.run(host="0.0.0.0", port=args.port, debug=True)
|
||||
fred = threading.Thread(target=worker_thread)
|
||||
fred.daemon = True
|
||||
fred.start()
|
||||
app.run(port=args.port, debug=False)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"Dismiss": "Затвори",
|
||||
"powered by Matrix": "базирано на Matrix",
|
||||
"Welcome to Riot.im": "Добре дошли в Riot.im",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Децентрализиран, шифрован чат и колаборация базирани на [matrix]",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Децентрализиран, шифрован чат и съвместна работа, базирани на [matrix]",
|
||||
"Search the room directory": "Търсене в директорията със стаи",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "В Matrix съществуват много стаи, свързани към вече съществуващи мрежи (Slack, IRC, Gitter и т.н.) или независими такива. Разгледайте директорията!",
|
||||
"Chat with Riot Bot": "Чати с Riot Bot",
|
||||
|
@ -37,10 +37,18 @@
|
|||
"Dev chat for the Dendrite dev team": "Чат за разработващия екип на Dendrite",
|
||||
"Co-ordination for Riot translators": "Координация за преводачи на Riot",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Може да настроите и собствен сървър за самоличност, но така няма да можете да каните потребители по имейл адрес или да бъдете поканени посредством вашия имейл адрес.",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Може да използвате настройките за собствен сървър за да влезете в друг Matrix сървър, чрез указване на адреса му. Това Ви позволява да използвате Riot със съществуващ Matrix акаунт принадлежащ към друг сървър.",
|
||||
"Sign In": "Вход",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Може да използвате настройките за собствен сървър за да влезете в друг Matrix сървър, чрез указване на адреса му. Това ви позволява да използвате Riot със съществуващ Matrix акаунт, принадлежащ към друг сървър.",
|
||||
"Sign In": "Вписване",
|
||||
"Create Account": "Създай акаунт",
|
||||
"Need help?": "Нужда от помощ?",
|
||||
"Explore rooms": "Открий стаи",
|
||||
"Room Directory": "Директория със стаи"
|
||||
"Room Directory": "Директория със стаи",
|
||||
"Unexpected error preparing the app. See console for details.": "Неочаквана грешка при подготвянето на приложението. Вижте конзолата за подробности.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Невалидна конфигурация: може да е указано само едно от: default_server_config, default_server_name, или default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Невалидна конфигурация: не е указан сървър по подразбиране.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Тази инсталация на Riot изглежда няма валидна конфигурация за сървър. Ако сте администраторът, моля поправете грешката по-долу",
|
||||
"Your Riot is misconfigured": "Riot не е конфигуриран правилно",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Riot конфигурацията ви съдържа невалиден JSON. Коригирайте проблема и презаредете страницата.",
|
||||
"The message from the parser is: %(message)s": "Грешката от парсъра е: %(message)s",
|
||||
"Invalid JSON": "Невалиден JSON"
|
||||
}
|
||||
|
|
|
@ -42,5 +42,6 @@
|
|||
"Room Directory": "Directori de sales",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Podeu emprar les opcions personalitzades del servidor per iniciar la sessió en altres servidors de Matrix especificant un URL de servidor personal diferent. Això us permet emprar el Riot amb un compte de Matrix existent en un servidor personal diferent.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "També podeu establir un servidor d'identitat personalitzat, però no podreu convidar usuaris o ser convidats vosaltres mateixos per adreça de correu electrònic.",
|
||||
"Sign In": "Inicia la sessió"
|
||||
"Sign In": "Inicia la sessió",
|
||||
"Invalid configuration: no default server specified.": "Configuració no vàlida: no s'ha especificat cap servidor per defecte."
|
||||
}
|
||||
|
|
|
@ -37,10 +37,18 @@
|
|||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Die benutzerdefinierten Server-Einstellungen kannst du verwenden, um dich auf anderen Matrix-Servern anzumelden, indem du eine abweichende Heimserver-URL eingibst.<br/>Somit ist es möglich, Riot mit einem bereits bestehendem Matrix-Benutzerkonto auf einem anderen Heimserver zu verwenden.<br/><br/>Außerdem kannst du einen benutzerdefinierten Identitätsserver eingeben. Allerdings kannst du in diesem Fall Benutzer nicht mehr per E-Mail-Adresse einladen und auch selbst nicht mehr per E-Mail-Adresse eingeladen werden.",
|
||||
"Co-ordination for Riot translators": "Koordination für Riot-Übersetzer",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Du kannst die erweiterte Serveroption nutzen um dich an einem anderen Matrixserver anzumelden, indem du eine andere Heimserver-URL angibst. Dies erlaubt dir, Riot mit einem existierenden Matrix-Konto auf einem anderen Heimserver zu nutzen.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Du kannst auch einen anderen Identitätsserver einstellen, allerdings kannst du dann andere Benutzer nicht mehr per E-Mail-Adresse einladen, ebenso wirst du selbst nicht mehr per E-Mail-Adresse eingeladen werden können.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Sie können auch einen benutzerdefinierten Identitätsserver festlegen, aber Sie können keine Benutzer per E-Mail-Adresse einladen oder selbst per E-Mail-Adresse eingeladen werden.",
|
||||
"Sign In": "Anmelden",
|
||||
"Create Account": "Konto erstellen",
|
||||
"Need help?": "Brauchst du Hilfe?",
|
||||
"Explore rooms": "Räume erkunden",
|
||||
"Room Directory": "Raumverzeichnis"
|
||||
"Room Directory": "Raumverzeichnis",
|
||||
"Unexpected error preparing the app. See console for details.": "Unerwarteter Fehler bei der Vorbereitung der App. Siehe Konsole für Details.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Ungültige Konfiguration: Es kann nur eine der Optionen default_server_config, default_server_name oder default_hs_url angegeben werden.",
|
||||
"Invalid configuration: no default server specified.": "Ungültige Konfiguration: Es wurde kein Standardserver angegeben.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Diese Installation von Riot scheint eine ungültige Serverkonfiguration zu haben. Wenn Sie der Administrator sind, korrigieren Sie bitte den folgenden Fehler",
|
||||
"Your Riot is misconfigured": "Dein Riot ist falsch konfiguriert",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Deine Riot Konfiguration enthält ungültiges JSON. Bitte korrigiere das Problem und lade die Seite neu.",
|
||||
"The message from the parser is: %(message)s": "Die Nachricht des Parsers ist: %(message)s",
|
||||
"Invalid JSON": "Ungültiges JSON"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.",
|
||||
"The message from the parser is: %(message)s": "The message from the parser is: %(message)s",
|
||||
"Invalid JSON": "Invalid JSON",
|
||||
"Your Riot is misconfigured": "Your Riot is misconfigured",
|
||||
"Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Invalid configuration: no default server specified.",
|
||||
"Riot Desktop on %(platformName)s": "Riot Desktop on %(platformName)s",
|
||||
"Unknown device": "Unknown device",
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s via %(browserName)s on %(osName)s",
|
||||
|
@ -15,8 +22,12 @@
|
|||
"Need help?": "Need help?",
|
||||
"Chat with Riot Bot": "Chat with Riot Bot",
|
||||
"Explore rooms": "Explore rooms",
|
||||
<<<<<<< HEAD
|
||||
"Room Directory": "Room Directory",
|
||||
"Search the room directory": "Search the room directory",
|
||||
"Get started with some tips from Riot Bot!": "Get started with some tips from Riot Bot!",
|
||||
"Push-to-Talk": "Push-to-Talk"
|
||||
=======
|
||||
"Room Directory": "Room Directory"
|
||||
>>>>>>> develop
|
||||
}
|
||||
|
|
|
@ -42,5 +42,12 @@
|
|||
"Create Account": "Create Account",
|
||||
"Need help?": "Need help?",
|
||||
"Explore rooms": "Explore rooms",
|
||||
"Room Directory": "Room Directory"
|
||||
"Room Directory": "Room Directory",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.",
|
||||
"The message from the parser is: %(message)s": "The message from the parser is: %(message)s",
|
||||
"Invalid JSON": "Invalid JSON",
|
||||
"Your Riot is misconfigured": "Your Riot is misconfigured",
|
||||
"Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Invalid configuration: no default server specified."
|
||||
}
|
||||
|
|
|
@ -36,10 +36,18 @@
|
|||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s per %(browserName)s je %(osName)s",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Vi povas uzi proprajn servilajn elektojn por saluti aliajn servilojn de Matrix, per specifo de alia hejmservila URL.<br/>Tio permesas al vi uzi klienton Riot kun jama konto de Matrix en alia hejmservilo.<br/><br/>Vi ankaŭ povas agordi propran identigan servilon, sed vi ne povos inviti uzantojn per retpoŝtadreso, aŭ esti invitata per retpoŝtadreso mem.",
|
||||
"Co-ordination for Riot translators": "Kunordigo por tradukantoj de Riot",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Vi povas ankaŭ agordi propran identigan servilon, sed vi ne eblos inviti uzantojn per retpoŝtadresoj, nek eblos esti invitita per retpoŝtadreso.",
|
||||
"Sign In": "Saluti",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Vi povas ankaŭ agordi propran identigan servilon, sed vi ne eblos inviti uzantojn per retpoŝtadresoj, nek tiel invitiĝi.",
|
||||
"Sign In": "Ensaluti",
|
||||
"Create Account": "Krei konton",
|
||||
"Need help?": "Ĉu vi bezonas helpon?",
|
||||
"Explore rooms": "Esplori ĉambrojn",
|
||||
"Room Directory": "Ĉambra dosierujo"
|
||||
"Room Directory": "Ĉambra dosierujo",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Vi povas uzi proprajn servilajn elekteblojn por ensaluti al aliaj serviloj de Matrix per doni alian hejmeservilan URL-on. Tio povigos vin uzi Riot kun jama konto de Matrix en alia hejmservilo.",
|
||||
"Unexpected error preparing the app. See console for details.": "Neatendita eraro okazis dum la preparado de la aplikaĵo. Rigardu la konzolon por detaloj.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Nevalida agordo: vi povas specifi nur unu elekteblon el « default_server_config », « default_server_name », aŭ « default_hs_url ».",
|
||||
"Invalid configuration: no default server specified.": "Nevalida agordo: neniu implicita servilo estas specifita.",
|
||||
"Your Riot is misconfigured": "Via kliento Riot estas misagordita",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Viaj Riot-agordoj enhavas nevalidan JSON-on. Bonvolu korekti la problemon kaj reŝarĝi la paĝon.",
|
||||
"The message from the parser is: %(message)s": "La mesaĝo el la analizilo estas: %(message)s",
|
||||
"Invalid JSON": "Nevalida JSON"
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"Riot is not supported on mobile web. Install the app?": "Riot no está soportado en navegadores Web móviles. ¿Quieres instalar la aplicación?",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "Debes usar HTTPS para hacer una llamada con pantalla compartida.",
|
||||
"Welcome to Riot.im": "Bienvenido a Riot.im",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Conversaciones cifradas y descentralizadas & colaboración con el poder de [matrix]",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Conversaciones cifradas y descentralizadas y colaboración con el poder de [matrix]",
|
||||
"Search the room directory": "Buscar en el directorio de salas",
|
||||
"Chat with Riot Bot": "Hablar con Riot Bot",
|
||||
"Get started with some tips from Riot Bot!": "¡Comenzar con algunos consejos de Riot Bot!",
|
||||
|
@ -42,5 +42,9 @@
|
|||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "También puedes definir un servidor de identidad personalizado, pero no podrás invitar a usuarios o ser inivitado usando direcciones de correo.",
|
||||
"Explore rooms": "Explorar salas",
|
||||
"Room Directory": "Directorio de salas",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Puedes usar la opción de servidor personalizado para iniciar sesión en otros servidores Matrix, especificando la dirección URL del servidor. Esto te permite usar una cuenta Matrix en un servidor diferente."
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Puedes usar la opción de servidor personalizado para iniciar sesión en otros servidores Matrix, especificando la dirección URL del servidor. Esto te permite usar una cuenta Matrix en un servidor diferente.",
|
||||
"Unexpected error preparing the app. See console for details.": "Error inesperado preparando la aplicación. Vea la consola para más detalles.",
|
||||
"Your Riot is misconfigured": "Riot tiene un error de configuración",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuración errónea: sólo puede especificar uno de default_server_config, default_server_name, o default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Configuración errónea: no se ha especificado servidor."
|
||||
}
|
||||
|
|
|
@ -42,5 +42,12 @@
|
|||
"Create Account": "Sortu kontua",
|
||||
"Need help?": "Laguntza behar?",
|
||||
"Explore rooms": "Arakatu gelak",
|
||||
"Room Directory": "Gelen direktorioa"
|
||||
"Room Directory": "Gelen direktorioa",
|
||||
"Unexpected error preparing the app. See console for details.": "Ustekabeko errorea aplikazioa prestatzean. Ikusi xehetasunak kontsolan.",
|
||||
"Your Riot is misconfigured": "Zure Riot gaizki konfiguratuta dago",
|
||||
"Invalid configuration: no default server specified.": "Konfigurazio baliogabea: Ez da lehenetsitako zerbitzaririk zehaztu.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Konfigurazio baliogabea: default_server_config, default_server_name, edo default_hs_url bat bakarra zehaztu daiteke.",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Zure Riot konfigurazioak baliogabeko JSON kodea du. Zuzendu arazoa eta kargatu orria berriro.",
|
||||
"The message from the parser is: %(message)s": "Prozesatzailearen mezua hau da: %(message)s",
|
||||
"Invalid JSON": "JSON baliogabea"
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"Dev chat for the Riot/Web dev team": "Kehittäjäkeskustelu Riot/Web kehitystiimille",
|
||||
"Dev chat for the Dendrite dev team": "Kehittäjäkeskustelu Dendrite kehitystiimille",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Matrixissa on olemassa monia huoneita, jotka on linkitetty olemassa oleviin verkkoihin (Slack, IRC, Gitter yms.). Tutustu hakemistoon!",
|
||||
"powered by Matrix": "Matrix",
|
||||
"powered by Matrix": "moottorina Matrix",
|
||||
"Riot is not supported on mobile web. Install the app?": "Riot ei tue laitettasi. Asenna mobiilisovellus?",
|
||||
"Design and implementation of E2E in Matrix": "Matrix päästä-päähän salauksen suunnittelu ja implementointi",
|
||||
"Contributing code to Matrix and Riot": "Osallistu kehitystyöhön",
|
||||
|
@ -37,9 +37,16 @@
|
|||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Voit käyttää edistyksellisiä asetuksia kirjautuaksesi muille Matrix palvelimille, määrittelemällä kotipalvelimen URL-osoitteen.<br/>Tämän avulla voit käyttää Riot:ia olemassa olevalla toisen Matrix palvelimen käyttäjätilillä.<br/><br/>Voit myös asettaa valinnaisen identiteettipalvelimen, mutta et voi kutsua käyttäjiä sähköpostiosoitteella tai tulla kutsutuksi.",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Voit käyttää mukautettuja palvelinasetuksia kirjautuaksesi muihin Matrix-palvelimiin. Tämä mahdollistaa Riotin käyttämisen toisella kotipalvelimella olevalla Matrix-tilillä.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Voit myös määrittää toisen identiteettipalvelimen, mutta et voi kutsua muita käyttäjiä sähköpostin perusteella tai saada itse kutsua sähköpostin perusteella.",
|
||||
"Sign In": "Kirjaudu sisään",
|
||||
"Sign In": "Kirjaudu",
|
||||
"Create Account": "Luo tili",
|
||||
"Need help?": "Tarvitsetko apua?",
|
||||
"Explore rooms": "Etsi huoneita",
|
||||
"Room Directory": "Huoneluettelo"
|
||||
"Room Directory": "Huoneluettelo",
|
||||
"Unexpected error preparing the app. See console for details.": "Odottamaton virhe sovellusta valmisteltaessa. Katso konsolista lisätietoja.",
|
||||
"Your Riot is misconfigured": "Riotin asetukset ovat pielessä",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Virheellinen asetus. Vain yhden seuraavista voi määrittää: default_server_config, default_server_name, tai default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Virheellinen asetus: oletuspalvelinta ei ole määritetty.",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Riot-asetuksissasi on virheellistä JSONia. Korjaa ongelma ja lataa sivu uudelleen.",
|
||||
"The message from the parser is: %(message)s": "Viesti jäsentimeltä: %(message)s",
|
||||
"Invalid JSON": "Virheellinen JSON"
|
||||
}
|
||||
|
|
|
@ -42,5 +42,13 @@
|
|||
"Create Account": "Créer un compte",
|
||||
"Need help?": "Besoin d'aide ?",
|
||||
"Explore rooms": "Explorer les salons",
|
||||
"Room Directory": "Répertoire de salons"
|
||||
"Room Directory": "Répertoire de salons",
|
||||
"Unexpected error preparing the app. See console for details.": "Une erreur inattendue est survenue pendant la préparation de l’application. Consultez la console pour avoir des détails.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuration invalide : il ne faut spécifier qu’un des trois champs entre default_server_config, default_server_name et default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Configuration invalide : aucun serveur par défaut spécifié.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Cette installation de Riot semble avoir une configuration de serveur non valide. Si vous êtes l’administrateur, corrigez l’erreur ci-dessous",
|
||||
"Your Riot is misconfigured": "Votre Riot est mal configuré",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Votre configuration de Riot contient du JSON non valide. Corrigez ce problème et rechargez la page.",
|
||||
"The message from the parser is: %(message)s": "Le message de l’analyseur est : %(message)s",
|
||||
"Invalid JSON": "JSON non valide"
|
||||
}
|
||||
|
|
|
@ -42,5 +42,13 @@
|
|||
"Create Account": "Fiók készítés",
|
||||
"Need help?": "Segíthetünk?",
|
||||
"Explore rooms": "Szobák felfedezése",
|
||||
"Room Directory": "Szoba lista"
|
||||
"Room Directory": "Szoba lista",
|
||||
"Unexpected error preparing the app. See console for details.": "Váratlan hiba történt az alkalmazás előkészítésénél. A részletekért nézd meg a konzolt.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Érvénytelen konfiguráció: csak egyet lehet megadni a default_server_config, default_server_name és default_hs_url közül.",
|
||||
"Invalid configuration: no default server specified.": "Érvénytelen konfiguráció: nincs megadva alapértelmezett szerver.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "A telepített Riotnak úgy tűnik hibás a szerver beállítása. Ha te vagy az adminisztrátor, kérlek javítsd az alábbi hibát",
|
||||
"Your Riot is misconfigured": "A Riotod hibásan van beállítva",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "A Riot beállításod érvénytelen JSON szöveget tartalmaz. Kérlek javítsd és töltsd újra az oldalt.",
|
||||
"The message from the parser is: %(message)s": "A feldolgozó algoritmus üzenete: %(message)s",
|
||||
"Invalid JSON": "Érvénytelen JSON"
|
||||
}
|
||||
|
|
|
@ -42,5 +42,13 @@
|
|||
"Create Account": "Crea account",
|
||||
"Need help?": "Serve aiuto?",
|
||||
"Explore rooms": "Esplora stanze",
|
||||
"Room Directory": "Elenco stanze"
|
||||
"Room Directory": "Elenco stanze",
|
||||
"Unexpected error preparing the app. See console for details.": "Errore inaspettato preparando l'app. Vedi la console per i dettagli.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configurazione non valida: specificare solo uno di default_server_config, default_server_name, o default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Configurazione non valida: nessun server predefinito specificato.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Questa installazione di Riot sembra avere una configurazione server non valida. Se sei l'amministratore, correggi l'errore sottostante",
|
||||
"Your Riot is misconfigured": "Il tuo Riot è configurato male",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "La tua configurazione di Riot contiene un JSON non valido. Correggi il problema e ricarica la pagina.",
|
||||
"The message from the parser is: %(message)s": "Il messaggio dal parser è: %(message)s",
|
||||
"Invalid JSON": "JSON non valido"
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"Custom Server Options": "カスタムサーバのオプション",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "他のホームサーバのURLを指定することで、他のMatrixサーバにサインインするためにカスタムサーバのオプションを利用できます。<br/>これにより、他のホームサーバ上で既存のMatrixアカウントを用いてRiotを利用できます。<br/><br/>カスタムアイデンティティサーバを立てることもできますが、メールアドレスでユーザを招待する、または自身が招待されることはできません。",
|
||||
"Dismiss": "やめる",
|
||||
"powered by Matrix": "Matrixによって動作しています",
|
||||
"powered by Matrix": "Matrix の支援により活動しています。",
|
||||
"Riot Desktop on %(platformName)s": "%(platformName)s向けデスクトップ版Riot",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "画面共有通話を行うにはHTTPS通信を使う必要があります。",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "分散型の、暗号化された会話とコラボレーション。[matrix]で動作しています",
|
||||
|
@ -35,5 +35,13 @@
|
|||
"Contributing code to Matrix and Riot": "MatrixとRiotにコードを提供する",
|
||||
"Dev chat for the Riot/Web dev team": "Riot/Web開発者チームのための開発者チャット",
|
||||
"Dev chat for the Dendrite dev team": "Dendrite開発者チームのための開発者チャット",
|
||||
"Co-ordination for Riot translators": "Riot 翻訳者による共同作業"
|
||||
"Co-ordination for Riot translators": "Riot 翻訳者による共同作業",
|
||||
"Unexpected error preparing the app. See console for details.": "アプリケーションの準備中に予期しないエラーが発生しました。詳細はコンソールを参照してください。",
|
||||
"Your Riot is misconfigured": "あなたの Riot は間違って設定されています。",
|
||||
"Invalid configuration: no default server specified.": "不正な設定です:デフォルトのサーバーが設定されていません。",
|
||||
"Sign In": "サインイン",
|
||||
"Create Account": "アカウントを作成する",
|
||||
"Need help?": "助けが必要ですか?",
|
||||
"Explore rooms": "部屋を探索する",
|
||||
"Room Directory": "部屋のディレクトリー"
|
||||
}
|
||||
|
|
|
@ -34,5 +34,16 @@
|
|||
"Dev chat for the Riot/Web dev team": "Riot/Web izstrādātāju komandas čats",
|
||||
"Dev chat for the Dendrite dev team": "Dendrite izstrādatāju komandas čats",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Matrix-ā pastāv daudzas neatkarīgas un/vai eksistējošiem tīmekļa resursiem (Slack, IRC, Gitter u.tml.) piesaistītas istabas. Ieskaties katalogā!",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Tu vari lietot \"custom\" servera opcijas, lai ielogotos citos Matrix serveros, norādot citu Bāzes servera URL.<br> Tas atļaus tev lietot Riot ar esošo Matrix kontu uz cita Bāzes servera.<br/><br/>Tu arī vari uzstādīt atsevišķu Identitāšu serveri, taču tad Tev nebūs iespēju uzaicināt lietotājus, izmantojot epasta adresi, vai pašam tikt uzaicinātam, izmantojot epasta adresi."
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Tu vari lietot \"custom\" servera opcijas, lai ielogotos citos Matrix serveros, norādot citu Bāzes servera URL.<br> Tas atļaus tev lietot Riot ar esošo Matrix kontu uz cita Bāzes servera.<br/><br/>Tu arī vari uzstādīt atsevišķu Identitāšu serveri, taču tad Tev nebūs iespēju uzaicināt lietotājus, izmantojot epasta adresi, vai pašam tikt uzaicinātam, izmantojot epasta adresi.",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Varat izmantot pielāgotās servera opcijas, lai pierakstītos citos Matrix serveros, norādot citu mājas servera URL. Tas ļauj jums izmantot Riot ar esošu Matrix kontu citā mājas serverī.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Varat arī iestatīt pielāgotu identitātes serveri, bet jūs nevarēsiet uzaicināt lietotājus izmantojot e-pasta adresi, kā arī tikt uzaicināts pēc e-pasta adreses.",
|
||||
"Sign In": "Ienākt",
|
||||
"Create Account": "Izveidot kontu",
|
||||
"Need help?": "Nepieciešama palīdzība?",
|
||||
"Explore rooms": "Atklāt istabas",
|
||||
"Room Directory": "Istabu Katalogs",
|
||||
"Unexpected error preparing the app. See console for details.": "Negaidīta kļūda, sagatavojot lietotni. Sīkāku informāciju skatiet konsolē.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Šai Riot instalācijai ir nekorekta servera konfigurācija. Ja esat administrators, lūdzu, izlabojiet tālāk norādīto kļūdu",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Nederīga konfigurācija: var norādīt tikai vienu no default_server_config, default_server_name, vai default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Nekorekta konfigurācija: nav norādīts noklusējuma serveris."
|
||||
}
|
||||
|
|
|
@ -41,6 +41,14 @@
|
|||
"Sign In": "Aanmelden",
|
||||
"Create Account": "Account aanmaken",
|
||||
"Need help?": "Hulp nodig?",
|
||||
"Explore rooms": "Kamers ontdekken",
|
||||
"Room Directory": "Gesprekscatalogus"
|
||||
"Explore rooms": "Gesprekken ontdekken",
|
||||
"Room Directory": "Gesprekscatalogus",
|
||||
"Unexpected error preparing the app. See console for details.": "Er is een onverwachte fout opgetreden bij het voorbereiden van de app. Bekijk de console voor details.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Ongeldige configuratie: kan slechts één van default_server_config, default_server_name, of default_hs_url opgeven.",
|
||||
"Invalid configuration: no default server specified.": "Ongeldige configuratie: geen standaardserver opgegeven.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "De serverconfiguratie van deze Riot-instantie lijkt ongeldig. Als u de beheerder bent, gelieve dan de fout hieronder te corrigeren",
|
||||
"Your Riot is misconfigured": "Uw Riot is verkeerd geconfigureerd",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Uw Riot-configuratie bevat ongeldige JSON. Corrigeer het probleem en herlaad de pagina.",
|
||||
"The message from the parser is: %(message)s": "Het bericht van de verwerker is: %(message)s",
|
||||
"Invalid JSON": "Ongeldige JSON"
|
||||
}
|
||||
|
|
|
@ -39,5 +39,6 @@
|
|||
"Create Account": "Stwórz konto",
|
||||
"Sign In": "Zaloguj",
|
||||
"Need help?": "Potrzebujesz pomocy?",
|
||||
"Room Directory": "Katalog pokojów"
|
||||
"Room Directory": "Katalog pokojów",
|
||||
"Explore rooms": "Przeglądaj pokoje"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Custom Server Options": "Выбор другого сервера",
|
||||
"Custom Server Options": "Параметры другого сервера",
|
||||
"Dismiss": "Отклонить",
|
||||
"powered by Matrix": "основано на Matrix",
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s с %(browserName)s на %(osName)s",
|
||||
|
@ -38,9 +38,14 @@
|
|||
"Co-ordination for Riot translators": "Координационный чат для переводчиков Riot",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Вы можете изменить параметры для входа на другие Matrix серверы, указав другой URL.\nЭто позволит использовать Riot с учетной записью Matrix, существующей на другом сервере.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Также можно изменить сервер идентификации, но без возможности приглашать (или быть приглашённым) по адресу электронной почты.",
|
||||
"Sign In": "Вход",
|
||||
"Sign In": "Войти в систему",
|
||||
"Create Account": "Создать аккаунт",
|
||||
"Need help?": "Помочь?",
|
||||
"Room Directory": "Каталог комнат",
|
||||
"Explore rooms": "Исследовать комнаты"
|
||||
"Explore rooms": "Исследовать комнаты",
|
||||
"Unexpected error preparing the app. See console for details.": "Неожиданная ошибка при подготовке приложения. Подробности см. в консоли.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Неверная конфигурация: может указывать только один из следующих параметров: default_server_config, default_server_name или default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Неверная конфигурация: сервер по умолчанию не указан.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Эта установка Riot, кажется, имеет неверную конфигурацию сервера. Если вы являетесь администратором, пожалуйста, исправьте ошибку ниже",
|
||||
"Your Riot is misconfigured": "Ваш Riot неправильно настроен"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Unexpected error preparing the app. See console for details.": "Unexpectit error came up gittin the app set up. See the console? Mair details ur thare."
|
||||
}
|
|
@ -1 +1,21 @@
|
|||
{}
|
||||
{
|
||||
"Riot Desktop on %(platformName)s": "Namizni Riot za %(platformName)s",
|
||||
"Unknown device": "Neznana naprava",
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s s %(browserName)s na %(osName)s",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "Za klic s skupno rabo zaslona potrebujete HTTPS.",
|
||||
"powered by Matrix": "poganja Matrix",
|
||||
"Custom Server Options": "Možnosti strežnika po meri",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Možnosti strežnika po meri lahko uporabite za prijavo v druge Matrix strežnike, s tem da podate drug URL domačega strežnika. To vam omogoča, da uporabljate Riot z obstoječim Matrix računom na drugem strežniku.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Nastavite lahko tudi strežnik za identiteto po meri, vendar ne boste mogli povabiti uporabnikov prek e-pošte, prav tako pa vas ne bodo mogli povabiti drugi.",
|
||||
"Dismiss": "Opusti",
|
||||
"Welcome to Riot.im": "Dobrodošli v Riot.im",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Decentralizirano šifrirano sporočanje & sodelovanje s pomočjo [matrix]",
|
||||
"Sign In": "Prijava",
|
||||
"Create Account": "Registracija",
|
||||
"Need help?": "Potrebujete pomoč?",
|
||||
"Chat with Riot Bot": "Klepetajte z Riot Botom",
|
||||
"Explore rooms": "Raziščite sobe",
|
||||
"Room Directory": "Imenik sob",
|
||||
"Search the room directory": "Preiščite imenik sob",
|
||||
"Get started with some tips from Riot Bot!": "Začnite z nekaterimi nasveti Riot Bota!"
|
||||
}
|
||||
|
|
|
@ -42,5 +42,13 @@
|
|||
"Create Account": "Krijoni Llogari",
|
||||
"Need help?": "Ju duhet ndihmë?",
|
||||
"Explore rooms": "Eksploroni dhoma",
|
||||
"Room Directory": "Listë Dhomash"
|
||||
"Room Directory": "Listë Dhomash",
|
||||
"Unexpected error preparing the app. See console for details.": "Gabim i papritur gjatë përgatitjes së aplikacionit. Për hollësi, shihni konsolën.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Formësim i pavlefshëm: mund të caktohet vetëm një prej default_server_config, default_server_name, ose default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Formësim i pavlefshëm: s’është caktuar shërbyes parazgjedhje.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "Ky instalim i Riot-it duket se ka një formësim të pavlefshëm për shërbyesin. Nëse jeni një përgjegjës, ju lutemi, ndreqni gabimin më poshtë",
|
||||
"Your Riot is misconfigured": "Riot-i juaj është i keqformësuar",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Formësimi juaj i Riot-it përmban JSON. Ju lutemi, ndreqeni problemin dhe ringarkoni faqen.",
|
||||
"The message from the parser is: %(message)s": "Mesazhi prej procesit është: %(message)s",
|
||||
"Invalid JSON": "JSON i pavlefshëm"
|
||||
}
|
||||
|
|
|
@ -37,10 +37,13 @@
|
|||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Ви можете використовувати параметри користувача сервера для входа на другі сервера Matrix, вказав другий URL-адресу домашнього сервера. <br/>Це дозволяє використовувати Riot з обліковим записом Matrix який існує на другому домашньому сервері.<br/><br/>Окрім цього, можливо встановити ідентифікаційний сервер користувача, але ви не зможете запросити других користувачів та бути запрошенному використовуючи адресу електронної пошти.",
|
||||
"Co-ordination for Riot translators": "Координаційний чат для перекладачів Riot",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Ви можете використати власні параметри сервера для входу в інші Matrix сервери, вказавши інший URL. Це дозволить використовувати Riot з наявним обліковим записом Matrix на іншому сервері.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Ви також можете встановити власний сервер ідентифікації, але Ви не зможете запрошувати користувачів або бути запрошеним за адресою електронної пошти.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Ви також можете встановити власний сервер ідентифікації, але Ви не зможете запрошувати користувачів (або бути запрошеним самому) за адресою електронної пошти.",
|
||||
"Need help?": "Допомогти?",
|
||||
"Sign In": "Вхід",
|
||||
"Create Account": "Створити аккаунт",
|
||||
"Explore rooms": "Дослідити кімнати",
|
||||
"Room Directory": "Каталог кімнат"
|
||||
"Room Directory": "Каталог кімнат",
|
||||
"Unexpected error preparing the app. See console for details.": "Неочікувана помилка при підготовці програми. Дивіться деталі у виводі консолі.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Невірна конфігурація: можна вказати лише default_server_config, default_server_name або default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Невірна конфігурація: не вказано сервер за замовчуванням."
|
||||
}
|
||||
|
|
|
@ -16,5 +16,7 @@
|
|||
"Get started with some tips from Riot Bot!": "Bắt đầu với các hướng dẫn từ Riot Bot!",
|
||||
"General discussion about Matrix and Riot": "Thảo luận chung về Matrix và Riot",
|
||||
"Discussion of all things Matrix!": "Thào luận về mọi vấn đề liên quan đến Matrix!",
|
||||
"Riot/Web & Desktop chat": "Riot/Web & Desktop chat"
|
||||
"Riot/Web & Desktop chat": "Riot/Web & Desktop chat",
|
||||
"Unexpected error preparing the app. See console for details.": "Lỗi xảy ra trong lúc chuẩn bị app. Xem console log để biết chi tiết.",
|
||||
"Your Riot is misconfigured": "Riot của bạn bị cấu hình sai"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"Unexpected error preparing the app. See console for details.": "’t Is een onverwachte foute ipgetreedn by ’t voorbereidn van den app. Bekykt de console vo details.",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "De serverconfiguroatie van deze Riot-instantie lykt oungeldig. A je gy den beheerder zyt, gelieve ton de foute hierounder te corrigeern",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Oungeldige configuroatie: ku moar één van default_server_config, default_server_name, of default_hs_url ipgeevn.",
|
||||
"Invalid configuration: no default server specified.": "Oungeldige configuroatie: geen standoardserver ipgegeevn.",
|
||||
"Riot Desktop on %(platformName)s": "Riot Desktop ip %(platformName)s",
|
||||
"Unknown device": "Ounbekend toestel",
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s via %(browserName)s ip %(osName)s",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "Je moet HTTPS gebruukn vo een iproep me schermdeeln te kunn startn.",
|
||||
"powered by Matrix": "meuglik gemakt deur Matrix",
|
||||
"Custom Server Options": "Angepaste serverinstelliengn",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Je kut d’angepaste serverinstelliengn gebruukn vo jen eigen an te melden by andere Matrix-servers, deur een andere thuusserver-URL in te geevn. Dit lat je toe van Riot te gebruukn met e bestoande Matrix-account by een andere thuusserver.",
|
||||
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Je kut ook een angepasten identiteitsserver instelln, ma je goa geen gebruukers kunn uutnodign via e-mail, of zelve via e-mail uutgenodigd wirden.",
|
||||
"Dismiss": "Afwyzn",
|
||||
"Welcome to Riot.im": "Welgekommn by Riot.im",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Gedecentraliseerd en versleuteld chattn & soamenwerkn meuglik gemakt deur [matrix]",
|
||||
"Sign In": "Anmeldn",
|
||||
"Create Account": "Account anmoakn",
|
||||
"Need help?": "Hulp nodig?",
|
||||
"Chat with Riot Bot": "Chattn me Riot-robot",
|
||||
"Explore rooms": "Gesprekkn ountdekkn",
|
||||
"Room Directory": "Gesprekscataloog",
|
||||
"Your Riot is misconfigured": "Je Riot is verkeerd geconfigureerd gewist",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Je Riot-configuroatie bevat oungeldigen JSON. Corrigeer ’t probleem en herload ’t blad.",
|
||||
"The message from the parser is: %(message)s": "’t Bericht van de verwerker is: %(message)s",
|
||||
"Invalid JSON": "Oungeldigen JSON"
|
||||
}
|
|
@ -42,5 +42,13 @@
|
|||
"Create Account": "建立帳號",
|
||||
"Need help?": "需要協助?",
|
||||
"Explore rooms": "探索聊天室",
|
||||
"Room Directory": "聊天室目錄"
|
||||
"Room Directory": "聊天室目錄",
|
||||
"Unexpected error preparing the app. See console for details.": "準備應用程式時發生未預期的錯誤。請見主控台以取得更多資訊。",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "無效的設定:只能指定 default_server_config、default_server_name 或 default_hs_url 其中之一。",
|
||||
"Invalid configuration: no default server specified.": "無效設定:未指定預設的伺服器。",
|
||||
"This installation of Riot seems to have an invalid server configuration. If you are the administrator, please correct the error below": "這個 Riot 安裝似乎有無效的伺服器設定。如果您是管理員,請在下方更正錯誤",
|
||||
"Your Riot is misconfigured": "您的 Riot 沒有設定好",
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "您的 Riot 包含無效的 JSON。請修正問題並重新整理頁面。",
|
||||
"The message from the parser is: %(message)s": "從解析器而來的訊息為:%(message)s",
|
||||
"Invalid JSON": "無效的 JSON"
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
import Promise from 'bluebird';
|
||||
import request from 'browser-request';
|
||||
|
||||
// Load the config file. First try to load up a domain-specific config of the
|
||||
// form "config.$domain.json" and if that fails, fall back to config.json.
|
||||
export async function getVectorConfig(relativeLocation) {
|
||||
if (relativeLocation === undefined) relativeLocation = '';
|
||||
if (relativeLocation !== '' && !relativeLocation.endsWith('/')) relativeLocation += '/';
|
||||
|
@ -37,28 +39,32 @@ function getConfig(configJsonFilename) {
|
|||
request(
|
||||
{ method: "GET", url: configJsonFilename },
|
||||
(err, response, body) => {
|
||||
if (err || response.status < 200 || response.status >= 300) {
|
||||
// Lack of a config isn't an error, we should
|
||||
// just use the defaults.
|
||||
// Also treat a blank config as no config, assuming
|
||||
// the status code is 0, because we don't get 404s
|
||||
// from file: URIs so this is the only way we can
|
||||
// not fail if the file doesn't exist when loading
|
||||
// from a file:// URI.
|
||||
if (response) {
|
||||
if (response.status == 404 || (response.status == 0 && body == '')) {
|
||||
resolve({});
|
||||
try {
|
||||
if (err || response.status < 200 || response.status >= 300) {
|
||||
// Lack of a config isn't an error, we should
|
||||
// just use the defaults.
|
||||
// Also treat a blank config as no config, assuming
|
||||
// the status code is 0, because we don't get 404s
|
||||
// from file: URIs so this is the only way we can
|
||||
// not fail if the file doesn't exist when loading
|
||||
// from a file:// URI.
|
||||
if (response) {
|
||||
if (response.status == 404 || (response.status == 0 && body == '')) {
|
||||
resolve({});
|
||||
}
|
||||
}
|
||||
reject({err: err, response: response});
|
||||
return;
|
||||
}
|
||||
reject({err: err, response: response});
|
||||
return;
|
||||
}
|
||||
|
||||
// We parse the JSON ourselves rather than use the JSON
|
||||
// parameter, since this throws a parse error on empty
|
||||
// which breaks if there's no config.json and we're
|
||||
// loading from the filesystem (see above).
|
||||
resolve(JSON.parse(body));
|
||||
// We parse the JSON ourselves rather than use the JSON
|
||||
// parameter, since this throws a parse error on empty
|
||||
// which breaks if there's no config.json and we're
|
||||
// loading from the filesystem (see above).
|
||||
resolve(JSON.parse(body));
|
||||
} catch (e) {
|
||||
reject({err: e});
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
</script>
|
||||
<script src="<%= htmlWebpackPlugin.files.chunks['bundle'].entry %>"></script>
|
||||
<img src="<%= require('matrix-react-sdk/res/img/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
|
||||
<img src="<%= require('matrix-react-sdk/res/img/e2e/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
|
||||
<audio id="messageAudio">
|
||||
<source src="media/message.ogg" type="audio/ogg" />
|
||||
<source src="media/message.mp3" type="audio/mpeg" />
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/*
|
||||
Copyright 2015, 2016 OpenMarket Ltd
|
||||
Copyright 2017 Vector Creations Ltd
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2018, 2019 New Vector Ltd
|
||||
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -43,8 +44,11 @@ import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
|
|||
sdk.loadSkin(require('../component-index'));
|
||||
import VectorConferenceHandler from 'matrix-react-sdk/lib/VectorConferenceHandler';
|
||||
import Promise from 'bluebird';
|
||||
import request from 'browser-request';
|
||||
import * as languageHandler from 'matrix-react-sdk/lib/languageHandler';
|
||||
import {_t, _td, newTranslatableError} from 'matrix-react-sdk/lib/languageHandler';
|
||||
import AutoDiscoveryUtils from 'matrix-react-sdk/lib/utils/AutoDiscoveryUtils';
|
||||
import {AutoDiscovery} from "matrix-js-sdk/lib/autodiscovery";
|
||||
import * as Lifecycle from "matrix-react-sdk/lib/Lifecycle";
|
||||
|
||||
import url from 'url';
|
||||
|
||||
|
@ -62,8 +66,6 @@ import Olm from 'olm';
|
|||
|
||||
import CallHandler from 'matrix-react-sdk/lib/CallHandler';
|
||||
|
||||
import {getVectorConfig} from './getconfig';
|
||||
|
||||
let lastLocationHashSet = null;
|
||||
|
||||
// Disable warnings for now: we use deprecated bluebird functions
|
||||
|
@ -115,7 +117,7 @@ function routeUrl(location) {
|
|||
}
|
||||
|
||||
function onHashChange(ev) {
|
||||
if (decodeURIComponent(window.location.hash) == lastLocationHashSet) {
|
||||
if (decodeURIComponent(window.location.hash) === lastLocationHashSet) {
|
||||
// we just set this: no need to route it!
|
||||
return;
|
||||
}
|
||||
|
@ -155,7 +157,7 @@ function makeRegistrationUrl(params) {
|
|||
|
||||
const keys = Object.keys(params);
|
||||
for (let i = 0; i < keys.length; ++i) {
|
||||
if (i == 0) {
|
||||
if (i === 0) {
|
||||
url += '?';
|
||||
} else {
|
||||
url += '&';
|
||||
|
@ -166,38 +168,6 @@ function makeRegistrationUrl(params) {
|
|||
return url;
|
||||
}
|
||||
|
||||
export function getConfig(configJsonFilename) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
request(
|
||||
{ method: "GET", url: configJsonFilename },
|
||||
(err, response, body) => {
|
||||
if (err || response.status < 200 || response.status >= 300) {
|
||||
// Lack of a config isn't an error, we should
|
||||
// just use the defaults.
|
||||
// Also treat a blank config as no config, assuming
|
||||
// the status code is 0, because we don't get 404s
|
||||
// from file: URIs so this is the only way we can
|
||||
// not fail if the file doesn't exist when loading
|
||||
// from a file:// URI.
|
||||
if (response) {
|
||||
if (response.status == 404 || (response.status == 0 && body == '')) {
|
||||
resolve({});
|
||||
}
|
||||
}
|
||||
reject({err: err, response: response});
|
||||
return;
|
||||
}
|
||||
|
||||
// We parse the JSON ourselves rather than use the JSON
|
||||
// parameter, since this throws a parse error on empty
|
||||
// which breaks if there's no config.json and we're
|
||||
// loading from the filesystem (see above).
|
||||
resolve(JSON.parse(body));
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function onTokenLoginCompleted() {
|
||||
// if we did a token login, we're now left with the token, hs and is
|
||||
// url as query params in the url; a little nasty but let's redirect to
|
||||
|
@ -248,14 +218,21 @@ async function loadApp() {
|
|||
PlatformPeg.set(new WebPlatform());
|
||||
}
|
||||
|
||||
// Load the config file. First try to load up a domain-specific config of the
|
||||
// form "config.$domain.json" and if that fails, fall back to config.json.
|
||||
const platform = PlatformPeg.get();
|
||||
|
||||
let configJson;
|
||||
let configError;
|
||||
let configSyntaxError = false;
|
||||
try {
|
||||
configJson = await getVectorConfig();
|
||||
configJson = await platform.getConfig();
|
||||
} catch (e) {
|
||||
configError = e;
|
||||
|
||||
if (e && e.err && e.err instanceof SyntaxError) {
|
||||
console.error("SyntaxError loading config:", e);
|
||||
configSyntaxError = true;
|
||||
configJson = {}; // to prevent errors between here and loading CSS for the error box
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: We call this twice, once here and once in MatrixChat as a prop. We call it here to ensure
|
||||
|
@ -325,6 +302,33 @@ async function loadApp() {
|
|||
}
|
||||
}
|
||||
|
||||
// Now that we've loaded the theme (CSS), display the config syntax error if needed.
|
||||
if (configSyntaxError) {
|
||||
const errorMessage = (
|
||||
<div>
|
||||
<p>
|
||||
{_t(
|
||||
"Your Riot configuration contains invalid JSON. Please correct the problem " +
|
||||
"and reload the page.",
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"The message from the parser is: %(message)s",
|
||||
{message: configError.err.message || _t("Invalid JSON")},
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
const GenericErrorPage = sdk.getComponent("structures.GenericErrorPage");
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<GenericErrorPage message={errorMessage} title={_t("Your Riot is misconfigured")} />,
|
||||
document.getElementById('matrixchat'),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const validBrowser = checkBrowserFeatures([
|
||||
"displaytable", "flexbox", "es5object", "es5function", "localstorage",
|
||||
"objectfit", "indexeddb", "webworkers",
|
||||
|
@ -338,25 +342,40 @@ async function loadApp() {
|
|||
Unable to load config file: please refresh the page to try again.
|
||||
</div>, document.getElementById('matrixchat'));
|
||||
} else if (validBrowser || acceptInvalidBrowser) {
|
||||
const platform = PlatformPeg.get();
|
||||
platform.startUpdater();
|
||||
|
||||
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<MatrixChat
|
||||
onNewScreen={onNewScreen}
|
||||
makeRegistrationUrl={makeRegistrationUrl}
|
||||
ConferenceHandler={VectorConferenceHandler}
|
||||
config={configJson}
|
||||
realQueryParams={params}
|
||||
startingFragmentQueryParams={fragparts.params}
|
||||
enableGuest={!configJson.disable_guests}
|
||||
onTokenLoginCompleted={onTokenLoginCompleted}
|
||||
initialScreenAfterLogin={getScreenFromLocation(window.location)}
|
||||
defaultDeviceDisplayName={platform.getDefaultDeviceDisplayName()}
|
||||
/>,
|
||||
document.getElementById('matrixchat'),
|
||||
);
|
||||
// Don't bother loading the app until the config is verified
|
||||
verifyServerConfig().then((newConfig) => {
|
||||
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<MatrixChat
|
||||
onNewScreen={onNewScreen}
|
||||
makeRegistrationUrl={makeRegistrationUrl}
|
||||
ConferenceHandler={VectorConferenceHandler}
|
||||
config={newConfig}
|
||||
realQueryParams={params}
|
||||
startingFragmentQueryParams={fragparts.params}
|
||||
enableGuest={!configJson.disable_guests}
|
||||
onTokenLoginCompleted={onTokenLoginCompleted}
|
||||
initialScreenAfterLogin={getScreenFromLocation(window.location)}
|
||||
defaultDeviceDisplayName={platform.getDefaultDeviceDisplayName()}
|
||||
/>,
|
||||
document.getElementById('matrixchat'),
|
||||
);
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
|
||||
let errorMessage = err.translatedMessage
|
||||
|| _t("Unexpected error preparing the app. See console for details.");
|
||||
errorMessage = <span>{errorMessage}</span>;
|
||||
|
||||
// Like the compatibility page, AWOOOOOGA at the user
|
||||
const GenericErrorPage = sdk.getComponent("structures.GenericErrorPage");
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<GenericErrorPage message={errorMessage} title={_t("Your Riot is misconfigured")} />,
|
||||
document.getElementById('matrixchat'),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
console.error("Browser is missing required features.");
|
||||
// take to a different landing page to AWOOOOOGA at the user
|
||||
|
@ -390,7 +409,7 @@ function loadOlm() {
|
|||
}).then(() => {
|
||||
console.log("Using WebAssembly Olm");
|
||||
}).catch((e) => {
|
||||
console.log("Failed to load Olm: trying legacy version");
|
||||
console.log("Failed to load Olm: trying legacy version", e);
|
||||
return new Promise((resolve, reject) => {
|
||||
const s = document.createElement('script');
|
||||
s.src = 'olm_legacy.js'; // XXX: This should be cache-busted too
|
||||
|
@ -428,4 +447,99 @@ async function loadLanguage() {
|
|||
}
|
||||
}
|
||||
|
||||
async function verifyServerConfig() {
|
||||
let validatedConfig;
|
||||
try {
|
||||
console.log("Verifying homeserver configuration");
|
||||
|
||||
// Note: the query string may include is_url and hs_url - we only respect these in the
|
||||
// context of email validation. Because we don't respect them otherwise, we do not need
|
||||
// to parse or consider them here.
|
||||
|
||||
// Note: Although we throw all 3 possible configuration options through a .well-known-style
|
||||
// verification, we do not care if the servers are online at this point. We do moderately
|
||||
// care if they are syntactically correct though, so we shove them through the .well-known
|
||||
// validators for that purpose.
|
||||
|
||||
const config = SdkConfig.get();
|
||||
let wkConfig = config['default_server_config']; // overwritten later under some conditions
|
||||
const serverName = config['default_server_name'];
|
||||
const hsUrl = config['default_hs_url'];
|
||||
const isUrl = config['default_is_url'];
|
||||
|
||||
const incompatibleOptions = [wkConfig, serverName, hsUrl].filter(i => !!i);
|
||||
if (incompatibleOptions.length > 1) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw newTranslatableError(_td(
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, " +
|
||||
"or default_hs_url.",
|
||||
));
|
||||
}
|
||||
if (incompatibleOptions.length < 1) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw newTranslatableError(_td("Invalid configuration: no default server specified."));
|
||||
}
|
||||
|
||||
if (hsUrl) {
|
||||
console.log("Config uses a default_hs_url - constructing a default_server_config using this information");
|
||||
console.warn(
|
||||
"DEPRECATED CONFIG OPTION: In the future, default_hs_url will not be accepted. Please use " +
|
||||
"default_server_config instead.",
|
||||
);
|
||||
|
||||
wkConfig = {
|
||||
"m.homeserver": {
|
||||
"base_url": hsUrl,
|
||||
},
|
||||
};
|
||||
if (isUrl) {
|
||||
wkConfig["m.identity_server"] = {
|
||||
"base_url": isUrl,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
let discoveryResult = null;
|
||||
if (wkConfig) {
|
||||
console.log("Config uses a default_server_config - validating object");
|
||||
discoveryResult = await AutoDiscovery.fromDiscoveryConfig(wkConfig);
|
||||
}
|
||||
|
||||
if (serverName) {
|
||||
console.log("Config uses a default_server_name - doing .well-known lookup");
|
||||
console.warn(
|
||||
"DEPRECATED CONFIG OPTION: In the future, default_server_name will not be accepted. Please " +
|
||||
"use default_server_config instead.",
|
||||
);
|
||||
discoveryResult = await AutoDiscovery.findClientConfig(serverName);
|
||||
}
|
||||
|
||||
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
|
||||
} catch (e) {
|
||||
const {hsUrl, isUrl, userId} = Lifecycle.getLocalStorageSessionVars();
|
||||
if (hsUrl && userId) {
|
||||
console.error(e);
|
||||
console.warn("A session was found - suppressing config error and using the session's homeserver");
|
||||
|
||||
console.log("Using pre-existing hsUrl and isUrl: ", {hsUrl, isUrl});
|
||||
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
|
||||
} else {
|
||||
// the user is not logged in, so scream
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
validatedConfig.isDefault = true;
|
||||
|
||||
// Just in case we ever have to debug this
|
||||
console.log("Using homeserver config:", validatedConfig);
|
||||
|
||||
// Add the newly built config to the actual config for use by the app
|
||||
console.log("Updating SdkConfig with validated discovery information");
|
||||
SdkConfig.add({"validated_server_config": validatedConfig});
|
||||
|
||||
return SdkConfig.get();
|
||||
}
|
||||
|
||||
loadApp();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,19 +6,102 @@ function onBackToRiotClick() {
|
|||
window.location.href = '../';
|
||||
}
|
||||
|
||||
// NEVER pass user-controlled content to this function! Hardcoded strings only please.
|
||||
function renderConfigError(message) {
|
||||
const contactMsg = "If this is unexpected, please contact your system administrator " +
|
||||
"or technical support representative.";
|
||||
message = `<h2>Error loading Riot</h2><p>${message}</p><p>${contactMsg}</p>`;
|
||||
|
||||
const toHide = document.getElementsByClassName("mx_HomePage_container");
|
||||
const errorContainers = document.getElementsByClassName("mx_HomePage_errorContainer");
|
||||
|
||||
for (const e of toHide) {
|
||||
// We have to clear the content because .style.display='none'; doesn't work
|
||||
// due to an !important in the CSS.
|
||||
e.innerHTML = '';
|
||||
}
|
||||
for (const e of errorContainers) {
|
||||
e.style.display = 'block';
|
||||
e.innerHTML = message;
|
||||
}
|
||||
}
|
||||
|
||||
async function initPage() {
|
||||
document.getElementById('back_to_riot_button').onclick = onBackToRiotClick;
|
||||
|
||||
const config = await getVectorConfig('..');
|
||||
let hsUrl;
|
||||
if (config && config['default_hs_url']) {
|
||||
hsUrl = config['default_hs_url'];
|
||||
let config = await getVectorConfig('..');
|
||||
|
||||
// We manually parse the config similar to how validateServerConfig works because
|
||||
// calling that function pulls in roughly 4mb of JS we don't use.
|
||||
|
||||
const wkConfig = config['default_server_config']; // overwritten later under some conditions
|
||||
const serverName = config['default_server_name'];
|
||||
const defaultHsUrl = config['default_hs_url'];
|
||||
const defaultIsUrl = config['default_is_url'];
|
||||
|
||||
const incompatibleOptions = [wkConfig, serverName, defaultHsUrl].filter(i => !!i);
|
||||
if (incompatibleOptions.length > 1) {
|
||||
return renderConfigError(
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, " +
|
||||
"or default_hs_url.",
|
||||
);
|
||||
}
|
||||
if (incompatibleOptions.length < 1) {
|
||||
return renderConfigError("Invalid configuration: no default server specified.");
|
||||
}
|
||||
|
||||
let hsUrl = '';
|
||||
let isUrl = '';
|
||||
|
||||
if (wkConfig && wkConfig['m.homeserver']) {
|
||||
hsUrl = wkConfig['m.homeserver']['base_url'];
|
||||
|
||||
if (wkConfig['m.identity_server']) {
|
||||
isUrl = wkConfig['m.identity_server']['base_url'];
|
||||
}
|
||||
}
|
||||
|
||||
if (serverName) {
|
||||
// We also do our own minimal .well-known validation to avoid pulling in the js-sdk
|
||||
try {
|
||||
const result = await fetch(`https://${serverName}/.well-known/matrix/client`);
|
||||
const wkConfig = await result.json();
|
||||
if (wkConfig && wkConfig['m.homeserver']) {
|
||||
hsUrl = wkConfig['m.homeserver']['base_url'];
|
||||
|
||||
if (wkConfig['m.identity_server']) {
|
||||
isUrl = wkConfig['m.identity_server']['base_url'];
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return renderConfigError("Unable to fetch homeserver configuration");
|
||||
}
|
||||
}
|
||||
|
||||
if (defaultHsUrl) {
|
||||
hsUrl = defaultHsUrl;
|
||||
isUrl = defaultIsUrl;
|
||||
}
|
||||
|
||||
if (!hsUrl) {
|
||||
return renderConfigError("Unable to locate homeserver");
|
||||
}
|
||||
|
||||
if (hsUrl && !hsUrl.endsWith('/')) hsUrl += '/';
|
||||
if (hsUrl && hsUrl !== 'https://matrix.org/') {
|
||||
if (isUrl && !isUrl.endsWith('/')) isUrl += '/';
|
||||
|
||||
if (hsUrl !== 'https://matrix.org/') {
|
||||
document.getElementById('step2_container').style.display = 'block';
|
||||
document.getElementById('hs_url').innerHTML = hsUrl;
|
||||
document.getElementById('hs_url').innerText = hsUrl;
|
||||
document.getElementById('step_login_header').innerHTML= 'Step 3: Register or Log in';
|
||||
|
||||
if (isUrl && isUrl !== "https://vector.im/") {
|
||||
document.getElementById('default_is').style.display = 'none';
|
||||
document.getElementById('custom_is').style.display = 'block';
|
||||
document.getElementById('is_url').style.display = 'block';
|
||||
document.getElementById('is_url').innerText = isUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Copyright 2016 Aviral Dasgupta
|
||||
Copyright 2016 OpenMarket Ltd
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -121,6 +122,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
});
|
||||
}
|
||||
|
||||
async getConfig(): Promise<{}> {
|
||||
return this._ipcCall('getConfig');
|
||||
}
|
||||
|
||||
async onUpdateDownloaded(ev, updateInfo) {
|
||||
dis.dispatch({
|
||||
action: 'new_version',
|
||||
|
@ -161,14 +166,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
// Notifications in Electron use the HTML5 notification API
|
||||
const notification = new global.Notification(
|
||||
title,
|
||||
{
|
||||
body: msg,
|
||||
icon: avatarUrl,
|
||||
silent: true, // we play our own sounds
|
||||
},
|
||||
);
|
||||
const notifBody = {
|
||||
body: msg,
|
||||
silent: true, // we play our own sounds
|
||||
};
|
||||
if (avatarUrl) notifBody['icon'] = avatarUrl;
|
||||
const notification = new global.Notification(title, notifBody);
|
||||
|
||||
notification.onclick = () => {
|
||||
dis.dispatch({
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Copyright 2016 Aviral Dasgupta
|
||||
Copyright 2016 OpenMarket Ltd
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -21,6 +22,7 @@ limitations under the License.
|
|||
import BasePlatform from 'matrix-react-sdk/lib/BasePlatform';
|
||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||
import dis from 'matrix-react-sdk/lib/dispatcher';
|
||||
import {getVectorConfig} from "../getconfig";
|
||||
|
||||
import Favico from 'favico.js';
|
||||
|
||||
|
@ -39,22 +41,37 @@ export default class VectorBasePlatform extends BasePlatform {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
// The 'animations' are really low framerate and look terrible.
|
||||
// Also it re-starts the animation every time you set the badge,
|
||||
// and we set the state each time, even if the value hasn't changed,
|
||||
// so we'd need to fix that if enabling the animation.
|
||||
this.favicon = new Favico({animation: 'none'});
|
||||
this.showUpdateCheck = false;
|
||||
this._updateFavicon();
|
||||
|
||||
this.startUpdateCheck = this.startUpdateCheck.bind(this);
|
||||
this.stopUpdateCheck = this.stopUpdateCheck.bind(this);
|
||||
}
|
||||
|
||||
async getConfig(): Promise<{}> {
|
||||
return getVectorConfig();
|
||||
}
|
||||
|
||||
getHumanReadableName(): string {
|
||||
return 'Vector Base Platform'; // no translation required: only used for analytics
|
||||
}
|
||||
|
||||
/**
|
||||
* Delay creating the `Favico` instance until first use (on the first notification) as
|
||||
* it uses canvas, which can trigger a permission prompt in Firefox's resist
|
||||
* fingerprinting mode.
|
||||
* See https://github.com/vector-im/riot-web/issues/9605.
|
||||
*/
|
||||
get favicon() {
|
||||
if (this._favicon) {
|
||||
return this._favicon;
|
||||
}
|
||||
// The 'animations' are really low framerate and look terrible.
|
||||
// Also it re-starts the animation every time you set the badge,
|
||||
// and we set the state each time, even if the value hasn't changed,
|
||||
// so we'd need to fix that if enabling the animation.
|
||||
this._favicon = new Favico({ animation: 'none' });
|
||||
return this._favicon;
|
||||
}
|
||||
|
||||
_updateFavicon() {
|
||||
try {
|
||||
// This needs to be in in a try block as it will throw
|
||||
|
|
|
@ -76,15 +76,13 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Object) {
|
||||
const notification = new global.Notification(
|
||||
title,
|
||||
{
|
||||
body: msg,
|
||||
icon: avatarUrl,
|
||||
tag: "vector",
|
||||
silent: true, // we play our own sounds
|
||||
},
|
||||
);
|
||||
const notifBody = {
|
||||
body: msg,
|
||||
tag: "vector",
|
||||
silent: true, // we play our own sounds
|
||||
};
|
||||
if (avatarUrl) notifBody['icon'] = avatarUrl;
|
||||
const notification = new global.Notification(title, notifBody);
|
||||
|
||||
notification.onclick = function() {
|
||||
dis.dispatch({
|
||||
|
|
|
@ -50,6 +50,10 @@ initRageshake();
|
|||
|
||||
global.mxSendRageshake = function(text, withLogs) {
|
||||
if (withLogs === undefined) withLogs = true;
|
||||
if (!text || !text.trim()) {
|
||||
console.error("Cannot send a rageshake without a message - please tell us what went wrong");
|
||||
return;
|
||||
}
|
||||
require(['matrix-react-sdk/lib/rageshake/submit-rageshake'], (s) => {
|
||||
s(SdkConfig.get().bug_report_endpoint_url, {
|
||||
userText: text,
|
||||
|
|
|
@ -37,6 +37,8 @@ const ReactDOM = require('react-dom');
|
|||
const ReactTestUtils = require('react-addons-test-utils');
|
||||
const expect = require('expect');
|
||||
import Promise from 'bluebird';
|
||||
import {makeType} from "matrix-react-sdk/lib/utils/TypeUtils";
|
||||
import {ValidatedServerConfig} from "matrix-react-sdk/lib/utils/AutoDiscoveryUtils";
|
||||
|
||||
const test_utils = require('../test-utils');
|
||||
const MockHttpBackend = require('matrix-mock-request');
|
||||
|
@ -96,8 +98,19 @@ describe('joining a room', function() {
|
|||
|
||||
PlatformPeg.set(new WebPlatform());
|
||||
|
||||
const config = {
|
||||
validated_server_config: makeType(ValidatedServerConfig, {
|
||||
hsUrl: HS_URL,
|
||||
hsName: "TEST_ENVIRONMENT",
|
||||
hsNameIsDifferent: false, // yes, we lie
|
||||
isUrl: IS_URL,
|
||||
}),
|
||||
};
|
||||
|
||||
const mc = (
|
||||
<MatrixChat config={{}}
|
||||
<MatrixChat
|
||||
config={config}
|
||||
serverConfig={config.validated_server_config}
|
||||
makeRegistrationUrl={()=>{throw new Error("unimplemented");}}
|
||||
initialScreenAfterLogin={{
|
||||
screen: 'directory',
|
||||
|
|
|
@ -39,6 +39,8 @@ import dis from 'matrix-react-sdk/lib/dispatcher';
|
|||
import * as test_utils from '../test-utils';
|
||||
import MockHttpBackend from 'matrix-mock-request';
|
||||
import {parseQs, parseQsFromFragment} from '../../src/vector/url_utils';
|
||||
import {makeType} from "matrix-react-sdk/lib/utils/TypeUtils";
|
||||
import {ValidatedServerConfig} from "matrix-react-sdk/lib/utils/AutoDiscoveryUtils";
|
||||
|
||||
const DEFAULT_HS_URL='http://my_server';
|
||||
const DEFAULT_IS_URL='http://my_is';
|
||||
|
@ -146,6 +148,12 @@ describe('loading:', function() {
|
|||
const config = Object.assign({
|
||||
default_hs_url: DEFAULT_HS_URL,
|
||||
default_is_url: DEFAULT_IS_URL,
|
||||
validated_server_config: makeType(ValidatedServerConfig, {
|
||||
hsUrl: DEFAULT_HS_URL,
|
||||
hsName: "TEST_ENVIRONMENT",
|
||||
hsNameIsDifferent: false, // yes, we lie
|
||||
isUrl: DEFAULT_IS_URL,
|
||||
}),
|
||||
embeddedPages: {
|
||||
homeUrl: 'data:text/html;charset=utf-8;base64,PGh0bWw+PC9odG1sPg==',
|
||||
},
|
||||
|
@ -160,6 +168,7 @@ describe('loading:', function() {
|
|||
<MatrixChat
|
||||
onNewScreen={onNewScreen}
|
||||
config={config}
|
||||
serverConfig={config.validated_server_config}
|
||||
realQueryParams={params}
|
||||
startingFragmentQueryParams={fragParts.params}
|
||||
enableGuest={true}
|
||||
|
@ -230,6 +239,10 @@ describe('loading:', function() {
|
|||
uriFragment: "#/room/!room:id",
|
||||
});
|
||||
|
||||
// Pass the liveliness checks
|
||||
httpBackend.when("GET", "/versions").respond(200, {versions: ["r0.4.0"]});
|
||||
httpBackend.when("GET", "/api/v1").respond(200, {});
|
||||
|
||||
Promise.delay(1).then(() => {
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
|
@ -267,6 +280,10 @@ describe('loading:', function() {
|
|||
uriFragment: "#/login",
|
||||
});
|
||||
|
||||
// Pass the liveliness checks
|
||||
httpBackend.when("GET", "/versions").respond(200, {versions: ["r0.4.0"]});
|
||||
httpBackend.when("GET", "/api/v1").respond(200, {});
|
||||
|
||||
return awaitLoginComponent(matrixChat).then(() => {
|
||||
// we expect a single <Login> component
|
||||
ReactTestUtils.findRenderedComponentWithType(
|
||||
|
@ -275,8 +292,13 @@ describe('loading:', function() {
|
|||
// the only outstanding request should be a GET /login
|
||||
// (in particular there should be no /register request for
|
||||
// guest registration).
|
||||
const allowedRequests = [
|
||||
"/_matrix/client/r0/login",
|
||||
"/versions",
|
||||
"/api/v1",
|
||||
];
|
||||
for (const req of httpBackend.requests) {
|
||||
if (req.method === 'GET' && req.path.endsWith('/_matrix/client/r0/login')) {
|
||||
if (req.method === 'GET' && allowedRequests.find(p => req.path.endsWith(p))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -377,6 +399,10 @@ describe('loading:', function() {
|
|||
});
|
||||
|
||||
it('shows a login view', function() {
|
||||
// Pass the liveliness checks
|
||||
httpBackend.when("GET", "/versions").respond(200, {versions: ["r0.4.0"]});
|
||||
httpBackend.when("GET", "/api/v1").respond(200, {});
|
||||
|
||||
// we expect a single <Login> component
|
||||
ReactTestUtils.findRenderedComponentWithType(
|
||||
matrixChat, sdk.getComponent('structures.auth.Login'),
|
||||
|
@ -385,8 +411,13 @@ describe('loading:', function() {
|
|||
// the only outstanding request should be a GET /login
|
||||
// (in particular there should be no /register request for
|
||||
// guest registration, nor /sync, etc).
|
||||
const allowedRequests = [
|
||||
"/_matrix/client/r0/login",
|
||||
"/versions",
|
||||
"/api/v1",
|
||||
];
|
||||
for (const req of httpBackend.requests) {
|
||||
if (req.method === 'GET' && req.path.endsWith('/_matrix/client/r0/login')) {
|
||||
if (req.method === 'GET' && allowedRequests.find(p => req.path.endsWith(p))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -395,6 +426,10 @@ describe('loading:', function() {
|
|||
});
|
||||
|
||||
it('shows the homepage after login', function() {
|
||||
// Pass the liveliness checks
|
||||
httpBackend.when("GET", "/versions").respond(200, {versions: ["r0.4.0"]});
|
||||
httpBackend.when("GET", "/api/v1").respond(200, {});
|
||||
|
||||
return completeLogin(matrixChat).then(() => {
|
||||
// we should see a home page, even though we previously had
|
||||
// a stored mx_last_room_id
|
||||
|
@ -616,11 +651,21 @@ describe('loading:', function() {
|
|||
|
||||
// check that we have a Login component, send a 'user:pass' login,
|
||||
// and await the HTTP requests.
|
||||
function completeLogin(matrixChat) {
|
||||
async function completeLogin(matrixChat) {
|
||||
// we expect a single <Login> component
|
||||
const login = ReactTestUtils.findRenderedComponentWithType(
|
||||
matrixChat, sdk.getComponent('structures.auth.Login'));
|
||||
|
||||
// When we switch to the login component, it'll hit the login endpoint
|
||||
// for proof of life and to get flows. We'll only give it one option.
|
||||
httpBackend.when('GET', '/login')
|
||||
.respond(200, {"flows": [{"type": "m.login.password"}]});
|
||||
httpBackend.flush(); // We already would have tried the GET /login request
|
||||
|
||||
// Give the component some time to finish processing the login flows before
|
||||
// continuing.
|
||||
await Promise.delay(100);
|
||||
|
||||
httpBackend.when('POST', '/login').check(function(req) {
|
||||
expect(req.data.type).toEqual('m.login.password');
|
||||
expect(req.data.identifier.type).toEqual('m.id.user');
|
||||
|
|
|
@ -71,12 +71,12 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
test: /\.(gif|png|svg|ttf|xml|ico)$/,
|
||||
test: /\.(gif|png|svg|ttf|woff|woff2|xml|ico)$/,
|
||||
// Use a content-based hash in the name so that we can set a long cache
|
||||
// lifetime for assets while still delivering changes quickly.
|
||||
oneOf: [
|
||||
{
|
||||
// Images referenced in CSS files
|
||||
// Assets referenced in CSS files
|
||||
issuer: /\.(scss|css)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
|
@ -92,11 +92,15 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
// Images referenced in HTML and JS files
|
||||
// Assets referenced in HTML and JS files
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[hash:7].[ext]',
|
||||
outputPath: getImgOutputPath,
|
||||
publicPath: function(url, resourcePath) {
|
||||
const outputPath = getImgOutputPath(url, resourcePath);
|
||||
return toPublicPath(outputPath);
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue