Compare commits
No commits in common. "develop" and "kegan/3pid-inv" have entirely different histories.
develop
...
kegan/3pid
|
@ -1,9 +0,0 @@
|
|||
# Exclude a bunch of stuff which can make the build context a larger than it needs to be
|
||||
test/
|
||||
webapp/
|
||||
lib/
|
||||
node_modules/
|
||||
karma-reports/
|
||||
.idea/
|
||||
.tmp/
|
||||
config.json*
|
|
@ -1,23 +0,0 @@
|
|||
# Copyright 2017 Aviral Dasgupta
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset=utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
|
@ -1,2 +0,0 @@
|
|||
src/vector/modernizr.js
|
||||
src/component-index.js
|
23
.eslintrc.js
|
@ -1,23 +0,0 @@
|
|||
module.exports = {
|
||||
"extends": ["matrix-org", "matrix-org/react"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
},
|
||||
"rules": {
|
||||
"quotes": "off",
|
||||
},
|
||||
"overrides": [{
|
||||
"files": ["src/**/*.{ts, tsx}"],
|
||||
"extends": ["matrix-org/ts", "matrix-org/react"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
},
|
||||
"rules": {
|
||||
"quotes": "off",
|
||||
// While converting to ts we allow this
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"prefer-promise-reject-errors": "off",
|
||||
},
|
||||
}],
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
patreon: matrixdotorg
|
||||
liberapay: matrixdotorg
|
|
@ -1,46 +0,0 @@
|
|||
<!-- Please report security issues by email to security@matrix.org -->
|
||||
|
||||
<!-- This is a bug report template. By following the instructions below and
|
||||
filling out the sections with your information, you will help the us to get all
|
||||
the necessary data to fix your issue.
|
||||
|
||||
You can also preview your report before submitting it. You may remove sections
|
||||
that aren't relevant to your particular case.
|
||||
|
||||
Text between <!-- and --> marks will be invisible in the report.
|
||||
-->
|
||||
|
||||
### Description
|
||||
|
||||
Describe here the problem that you are experiencing, or the feature you are requesting.
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
- For bugs, list the steps
|
||||
- that reproduce the bug
|
||||
- using hyphens as bullet points
|
||||
|
||||
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! -->
|
||||
|
||||
<!-- Include screenshots if possible: you can drag and drop images below. -->
|
||||
|
||||
### Version information
|
||||
|
||||
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->
|
||||
|
||||
- **Platform**: web (in-browser) or desktop?
|
||||
|
||||
For the web app:
|
||||
|
||||
- **Browser**: Chrome, Safari, Firefox? which version?
|
||||
- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
|
||||
- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web?
|
||||
|
||||
For the desktop app:
|
||||
|
||||
- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
|
||||
- **Version**: 1.x.y <!-- check the user settings panel if unsure -->
|
|
@ -1,56 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Please report security issues by email to security@matrix.org -->
|
||||
|
||||
<!-- This is a bug report template. By following the instructions below and
|
||||
filling out the sections with your information, you will help the us to get all
|
||||
the necessary data to fix your issue.
|
||||
|
||||
You can also preview your report before submitting it. You may remove sections
|
||||
that aren't relevant to your particular case.
|
||||
|
||||
Text between <!-- and --> marks will be invisible in the report.
|
||||
-->
|
||||
|
||||
### Description
|
||||
|
||||
Describe here the problem that you are experiencing, or the feature you are requesting.
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
- For bugs, list the steps
|
||||
- that reproduce the bug
|
||||
- using hyphens as bullet points
|
||||
|
||||
Describe how what happens differs from what you expected.
|
||||
|
||||
<!-- 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. -->
|
||||
|
||||
### Version information
|
||||
|
||||
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->
|
||||
|
||||
- **Platform**: web (in-browser) or desktop?
|
||||
|
||||
For the web app:
|
||||
|
||||
- **Browser**: Chrome, Safari, Firefox? which version?
|
||||
- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
|
||||
- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web?
|
||||
|
||||
For the desktop app:
|
||||
|
||||
- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
|
||||
- **Version**: 1.x.y <!-- check the user settings panel if unsure -->
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: Suggestion or Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: suggestion
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your suggestion related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
|
@ -1,58 +0,0 @@
|
|||
---
|
||||
name: User Interface or Usability Bug report
|
||||
about: Please include screenshots in UI/UX bug reports
|
||||
title: ''
|
||||
labels: bug, ui/ux
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- A picture's worth a thousand words: PLEASE INCLUDE A SCREENSHOT :P -->
|
||||
|
||||
<!-- Please report security issues by email to security@matrix.org -->
|
||||
|
||||
<!-- This is a bug report template. By following the instructions below and
|
||||
filling out the sections with your information, you will help the us to get all
|
||||
the necessary data to fix your issue.
|
||||
|
||||
You can also preview your report before submitting it. You may remove sections
|
||||
that aren't relevant to your particular case.
|
||||
|
||||
Text between <!-- and --> marks will be invisible in the report.
|
||||
-->
|
||||
|
||||
### Description
|
||||
|
||||
Describe here the problem that you are experiencing, or the feature you are requesting.
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
- For bugs, list the steps
|
||||
- that reproduce the bug
|
||||
- using hyphens as bullet points
|
||||
|
||||
Describe how what happens differs from what you expected.
|
||||
|
||||
<!-- 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. -->
|
||||
|
||||
### Version information
|
||||
|
||||
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->
|
||||
|
||||
- **Platform**: web (in-browser) or desktop?
|
||||
|
||||
For the web app:
|
||||
|
||||
- **Browser**: Chrome, Safari, Firefox? which version?
|
||||
- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
|
||||
- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web?
|
||||
|
||||
For the desktop app:
|
||||
|
||||
- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc?
|
||||
- **Version**: 1.x.y <!-- check the user settings panel if unsure -->
|
|
@ -1,21 +1,7 @@
|
|||
/build
|
||||
/cert.pem
|
||||
/dist
|
||||
/key.pem
|
||||
/lib
|
||||
/node_modules
|
||||
/packages/
|
||||
/webapp
|
||||
/.npmrc
|
||||
/*.log
|
||||
package-lock.json
|
||||
node_modules
|
||||
vector/bundle.*
|
||||
lib
|
||||
.DS_Store
|
||||
electron/dist
|
||||
electron/pub
|
||||
**/.idea
|
||||
/config.json
|
||||
/config.json.*
|
||||
/config.local*.json
|
||||
/src/component-index.js
|
||||
/.tmp
|
||||
/webpack-stats.json
|
||||
key.pem
|
||||
cert.pem
|
||||
vector/components.css
|
||||
|
|
|
@ -5,34 +5,10 @@
|
|||
"setClasses"
|
||||
],
|
||||
"feature-detects": [
|
||||
"test/css/animations",
|
||||
"test/css/displaytable",
|
||||
"test/css/filters",
|
||||
"test/css/flexbox",
|
||||
"test/es5/specification",
|
||||
"test/css/objectfit",
|
||||
|
||||
"test/es5/date",
|
||||
"test/es5/function",
|
||||
"test/es5/object",
|
||||
"test/es5/undefined",
|
||||
|
||||
"test/es6/array",
|
||||
"test/es6/collections",
|
||||
"test/es6/promises",
|
||||
"test/es6/string",
|
||||
|
||||
"test/svg",
|
||||
"test/svg/asimg",
|
||||
"test/svg/filters",
|
||||
|
||||
"test/url/parser",
|
||||
"test/url/urlsearchparams",
|
||||
|
||||
"test/cors",
|
||||
"test/crypto",
|
||||
"test/iframe/sandbox",
|
||||
"test/json",
|
||||
"test/network/fetch",
|
||||
"test/storage/localstorage"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
example
|
||||
examples
|
||||
build/.module-cache
|
|
@ -1,26 +0,0 @@
|
|||
// Copied from react-sdk
|
||||
// TODO: Only keep one copy of this for synchronization purposes
|
||||
module.exports = {
|
||||
"extends": "stylelint-config-standard",
|
||||
"plugins": [
|
||||
"stylelint-scss",
|
||||
],
|
||||
"rules": {
|
||||
"indentation": 4,
|
||||
"comment-empty-line-before": null,
|
||||
"declaration-empty-line-before": null,
|
||||
"length-zero-no-unit": null,
|
||||
"rule-empty-line-before": null,
|
||||
"color-hex-length": null,
|
||||
"max-empty-lines": null,
|
||||
"number-no-trailing-zeros": null,
|
||||
"number-leading-zero": null,
|
||||
"selector-list-comma-newline-after": null,
|
||||
"at-rule-no-unknown": null,
|
||||
"no-descending-specificity": null,
|
||||
"scss/at-rule-no-unknown": [true, {
|
||||
// https://github.com/vector-im/riot-web/issues/10544
|
||||
"ignoreAtRules": ["define-mixin"],
|
||||
}],
|
||||
}
|
||||
};
|
|
@ -7,12 +7,3 @@ include:
|
|||
|
||||
* https://github.com/neko259
|
||||
Improved scrollbar CSS
|
||||
|
||||
* Florent VIOLLEAU (https://github.com/floviolleau) <floviolleau at gmail dot com>
|
||||
Improve README.md for a better understanding of installation instructions
|
||||
|
||||
* Michael Telatynski (https://github.com/t3chguy)
|
||||
Improved consistency of inverted elements in dark theme across browsers
|
||||
|
||||
* Alexandr Korsak (https://github.com/oivoodoo)
|
||||
Improved multiple file uploading
|
||||
|
|
4217
CHANGELOG.md
|
@ -0,0 +1,31 @@
|
|||
Changes in vector v0.1.2 (2015-10-28)
|
||||
======================================
|
||||
* Support Room Avatars
|
||||
* Fullscreen video calls
|
||||
* Mute mic in VoIP calls
|
||||
* Fix bug with multiple desktop notifications
|
||||
* Context menu on messages
|
||||
* Better hover-over on member list
|
||||
* Support CAS auth
|
||||
* Many other bug fixes
|
||||
|
||||
Changes in vector v0.1.1 (2015-08-10)
|
||||
======================================
|
||||
|
||||
* Support logging in with an email address
|
||||
* Use the Vector identity server
|
||||
* Fix a bug where the client was not stopped properly on logout
|
||||
* Fix bugs where field values would be forgotten if login or registration failed
|
||||
* Improve URL bar navigation
|
||||
* Add explanatory help text on advanced server options
|
||||
* Fix a bug which caused execptions on malformed VoIP invitations
|
||||
* Remove superfluous scrollbars on Firefox
|
||||
* Numerous CSS fixes
|
||||
* Improved accessibility
|
||||
* Support command-click / middle click to open image in a new tab
|
||||
* Improved room directory
|
||||
* Fix display of text with many combining unicode points
|
||||
|
||||
Changes in vector v0.1.0 (2015-08-10)
|
||||
======================================
|
||||
Initial release
|
|
@ -1,4 +1,4 @@
|
|||
Contributing code to Riot
|
||||
=========================
|
||||
Contributing code to Vector
|
||||
===========================
|
||||
|
||||
Riot follows the same pattern as https://github.com/matrix-org/matrix-js-sdk/blob/master/CONTRIBUTING.rst.
|
||||
Vector follows the same pattern as https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.rst
|
||||
|
|
40
Dockerfile
|
@ -1,40 +0,0 @@
|
|||
# Builder
|
||||
FROM node:12 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 apt-get update && apt-get install -y git dos2unix \
|
||||
# These packages are required for building Canvas on architectures like Arm
|
||||
# See https://www.npmjs.com/package/canvas#compiling
|
||||
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . /src
|
||||
RUN dos2unix /src/scripts/docker-link-repos.sh && bash /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
|
||||
|
||||
# Ensure we populate the version file
|
||||
RUN dos2unix /src/scripts/docker-write-version.sh && bash /src/scripts/docker-write-version.sh
|
||||
|
||||
|
||||
# App
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /src/webapp /app
|
||||
|
||||
# Insert wasm type into Nginx mime.types file so they load correctly.
|
||||
RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html \
|
||||
&& ln -s /app /usr/share/nginx/html
|
424
README.md
|
@ -1,391 +1,87 @@
|
|||
Element
|
||||
=======
|
||||
Vector/Web
|
||||
==========
|
||||
|
||||
Element (formerly known as Vector and Riot) is a Matrix web client built using the [Matrix
|
||||
React SDK](https://github.com/matrix-org/matrix-react-sdk).
|
||||
Vector is a Matrix web client built using the Matrix React SDK (https://github.com/matrix-org/matrix-react-sdk).
|
||||
|
||||
Supported Environments
|
||||
======================
|
||||
|
||||
Element has several tiers of support for different environments:
|
||||
|
||||
* Supported
|
||||
* Definition: Issues **actively triaged**, regressions **block** the release
|
||||
* Last 2 major versions of Chrome, Firefox, and Safari on desktop OSes
|
||||
* Latest release of official Element Desktop app on desktop OSes
|
||||
* Desktop OSes means macOS, Windows, and Linux versions for desktop devices
|
||||
that are actively supported by the OS vendor and receive security updates
|
||||
* Experimental
|
||||
* Definition: Issues **accepted**, regressions **do not block** the release
|
||||
* Element as an installed PWA via current stable version of Chrome, Firefox, and Safari
|
||||
* Mobile web for current stable version of Chrome, Firefox, and Safari on Android, iOS, and iPadOS
|
||||
* Not supported
|
||||
* Definition: Issues only affecting unsupported environments are **closed**
|
||||
* Everything else
|
||||
|
||||
For accessing Element on an Android or iOS device, we currently recommend the
|
||||
native apps [riot-android](https://github.com/vector-im/riot-android)
|
||||
and [riot-ios](https://github.com/vector-im/riot-ios).
|
||||
|
||||
Getting Started
|
||||
Getting started
|
||||
===============
|
||||
|
||||
The easiest way to test Element is to just use the hosted copy at https://app.element.io.
|
||||
The `develop` branch is continuously deployed by Jenkins at https://develop.element.io
|
||||
for those who like living dangerously.
|
||||
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
|
||||
2. Clone the repo: `git clone https://github.com/vector-im/vector-web.git`
|
||||
3. Switch to the SDK directory: `cd vector-web`
|
||||
4. Install the prerequisites: `npm install`
|
||||
5. Start the development builder and a testing server: `npm start`
|
||||
6. Wait a few seconds for the initial build to finish.
|
||||
7. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector.
|
||||
|
||||
To host your own copy of Element, the quickest bet is to use a pre-built
|
||||
released version of Element:
|
||||
With `npm start`, any changes you make to the source files will cause a rebuild so
|
||||
your changes will show up when you refresh.
|
||||
|
||||
1. Download the latest version from https://github.com/vector-im/riot-web/releases
|
||||
1. Untar the tarball on your web server
|
||||
1. Move (or symlink) the `riot-x.x.x` directory to an appropriate name
|
||||
1. Configure the correct caching headers in your webserver (see below)
|
||||
1. If desired, copy `config.sample.json` to `config.json` and edit it
|
||||
as desired. See the [configuration docs](docs/config.md) for details.
|
||||
1. Enter the URL into your browser and log into Element!
|
||||
|
||||
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 for the security of your chats will need to serve Element
|
||||
over HTTPS. Major browsers also do not allow you to use VoIP/video
|
||||
chats over HTTP, as WebRTC is only usable over HTTPS.
|
||||
There are some exceptions like when using localhost, which is
|
||||
considered a [secure context](https://developer.mozilla.org/docs/Web/Security/Secure_Contexts)
|
||||
and thus allowed.
|
||||
|
||||
To install Element as a desktop application, see [Running as a desktop
|
||||
app](#running-as-a-desktop-app) below.
|
||||
|
||||
Important Security Note
|
||||
=======================
|
||||
|
||||
We do not recommend running Element from the same domain name as your Matrix
|
||||
homeserver. The reason is the risk of XSS (cross-site-scripting)
|
||||
vulnerabilities that could occur if someone caused Element to load and render
|
||||
malicious user generated content from a Matrix API which then had trusted
|
||||
access to Element (or other apps) due to sharing the same domain.
|
||||
|
||||
We have put some coarse mitigations into place to try to protect against this
|
||||
situation, but it's still not good practice to do it in the first place. See
|
||||
https://github.com/vector-im/riot-web/issues/1977 for more details.
|
||||
|
||||
Building From Source
|
||||
====================
|
||||
|
||||
Element is a modular webapp built with modern ES6 and uses a Node.js build system.
|
||||
Ensure you have the latest LTS version of Node.js installed.
|
||||
|
||||
Using `yarn` instead of `npm` is recommended. Please see the Yarn [install
|
||||
guide](https://classic.yarnpkg.com/en/docs/install) if you do not have it already.
|
||||
|
||||
1. Install or update `node.js` so that your `node` is at least v10.x.
|
||||
1. Install `yarn` if not present already.
|
||||
1. Clone the repo: `git clone https://github.com/vector-im/riot-web.git`.
|
||||
1. Switch to the riot-web directory: `cd riot-web`.
|
||||
1. Install the prerequisites: `yarn install`.
|
||||
* If you're using the `develop` branch, then it is recommended to set up a
|
||||
proper development environment (see [Setting up a dev
|
||||
environment](#setting-up-a-dev-environment) below). Alternatively, you
|
||||
can use https://develop.element.io - the continuous integration release of
|
||||
the develop branch.
|
||||
1. Configure the app by copying `config.sample.json` to `config.json` and
|
||||
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.
|
||||
|
||||
Note that `yarn dist` is not supported on Windows, so Windows users can run `yarn build`,
|
||||
which will build all the necessary files into the `webapp` directory. The version of Element
|
||||
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.
|
||||
|
||||
Running as a Desktop app
|
||||
========================
|
||||
|
||||
Element 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 build it yourself, follow the instructions at https://github.com/vector-im/riot-desktop.
|
||||
|
||||
Many thanks to @aviraldg for the initial work on the Electron integration.
|
||||
|
||||
Other options for running as a desktop app:
|
||||
* @asdf:matrix.org points out that you can use nativefier and it just works(tm)
|
||||
|
||||
```bash
|
||||
yarn global add nativefier
|
||||
nativefier https://app.element.io/
|
||||
```
|
||||
|
||||
The [configuration docs](docs/config.md#desktop-app-configuration) show how to
|
||||
override the desktop app's default settings if desired.
|
||||
|
||||
Running from Docker
|
||||
===================
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
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
|
||||
===========
|
||||
|
||||
Element supports a variety of settings to configure default servers, behaviour, themes, etc.
|
||||
See the [configuration docs](docs/config.md) for more details.
|
||||
|
||||
Labs Features
|
||||
=============
|
||||
|
||||
Some features of Element may be enabled by flags in the `Labs` section of the settings.
|
||||
Some of these features are described in [labs.md](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md).
|
||||
|
||||
Caching requirements
|
||||
====================
|
||||
|
||||
Element requires the following URLs not to be cached, when/if you are serving Element from your own webserver:
|
||||
```
|
||||
/config.*.json
|
||||
/i18n
|
||||
/home
|
||||
/sites
|
||||
/index.html
|
||||
```
|
||||
For production use, run `npm run build` to build all the necessary files
|
||||
into the `vector` directory and run your own server.
|
||||
|
||||
Development
|
||||
===========
|
||||
|
||||
Before attempting to develop on Riot you **must** read the [developer guide
|
||||
for `matrix-react-sdk`](https://github.com/matrix-org/matrix-react-sdk#developer-guide), which
|
||||
also defines the design, architecture and style for Element too.
|
||||
For simple tweaks, you can work on any of the source files within Vector with the
|
||||
setup above, and your changes will cause an instant rebuild.
|
||||
|
||||
Before starting work on a feature, it's best to ensure your plan aligns well
|
||||
with our vision for Riot. Please chat with the team in
|
||||
[#riot-dev:matrix.org](https://matrix.to/#/#riot-dev:matrix.org) before you
|
||||
start so we can ensure it's something we'd be willing to merge.
|
||||
However, all serious development on Vector happens on the `develop` branch. This typically
|
||||
depends on the `develop` snapshot versions of `matrix-react-sdk` and `matrix-js-sdk`
|
||||
too, which isn't handled by Vector's `package.json`. To get the right dependencies, check out
|
||||
the `develop` branches of these libraries and then use `npm link` to tell Vector
|
||||
about them:
|
||||
|
||||
You should also familiarise yourself with the ["Here be Dragons" guide
|
||||
](https://docs.google.com/document/d/12jYzvkidrp1h7liEuLIe6BMdU0NUjndUYI971O06ooM)
|
||||
to the tame & not-so-tame dragons (gotchas) which exist in the codebase.
|
||||
1. `git clone git@github.com:matrix-org/matrix-react-sdk.git`
|
||||
2. `cd matrix-react-sdk`
|
||||
3. `git checkout develop`
|
||||
4. `npm install`
|
||||
5. `npm run build`
|
||||
6. `npm start` (to start the dev rebuilder)
|
||||
7. `cd ../vector-web`
|
||||
8. Link the react sdk package into the example:
|
||||
`npm link path/to/your/react/sdk`
|
||||
|
||||
The idea of Element is to be a relatively lightweight "skin" of customisations on
|
||||
top of the underlying `matrix-react-sdk`. `matrix-react-sdk` provides both the
|
||||
higher and lower level React components useful for building Matrix communication
|
||||
apps using React.
|
||||
Similarly, you may need to `npm link path/to/your/js/sdk` in your `matrix-react-sdk`
|
||||
directory.
|
||||
|
||||
After creating a new component you must run `yarn reskindex` to regenerate
|
||||
the `component-index.js` for the app (used in future for skinning).
|
||||
If you add or remove any components from the Vector skin, you will need to rebuild
|
||||
the skin's index by running, `npm run reskindex`.
|
||||
|
||||
Please note that Element is intended to run correctly without access to the public
|
||||
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
|
||||
hosted by external CDNs or servers but instead please package all dependencies
|
||||
into Element itself.
|
||||
You may need to run `npm i source-map-loader` in matrix-js-sdk if you get errors
|
||||
about "Cannot resolve module 'source-map-loader'" due to shortcomings in webpack.
|
||||
|
||||
Setting up a dev environment
|
||||
============================
|
||||
Deployment
|
||||
==========
|
||||
|
||||
Much of the functionality in Element is actually in the `matrix-react-sdk` and
|
||||
`matrix-js-sdk` modules. It is possible to set these up in a way that makes it
|
||||
easy to track the `develop` branches in git and to make local changes without
|
||||
having to manually rebuild each time.
|
||||
Just run `npm run build` and then mount the `vector` directory on your webserver to
|
||||
actually serve up the app, which is entirely static content.
|
||||
|
||||
First clone and build `matrix-js-sdk`:
|
||||
Enabling encryption
|
||||
===================
|
||||
|
||||
``` bash
|
||||
git clone https://github.com/matrix-org/matrix-js-sdk.git
|
||||
pushd matrix-js-sdk
|
||||
git checkout develop
|
||||
yarn link
|
||||
yarn install
|
||||
popd
|
||||
```
|
||||
End-to-end encryption in Vector and Matrix is not yet considered ready for
|
||||
day-to-day use; it is experimental and should be considered only as a
|
||||
proof-of-concept. See https://matrix.org/jira/browse/SPEC-162 for an overview
|
||||
of the current progress.
|
||||
|
||||
Then similarly with `matrix-react-sdk`:
|
||||
To build a version of vector with support for end-to-end encryption, install
|
||||
the olm module with `npm i https://matrix.org/packages/npm/olm/olm-0.1.0.tgz`
|
||||
before running `npm start`. The olm library will be detected and used if
|
||||
available.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/matrix-org/matrix-react-sdk.git
|
||||
pushd matrix-react-sdk
|
||||
git checkout develop
|
||||
yarn link
|
||||
yarn link matrix-js-sdk
|
||||
yarn install
|
||||
popd
|
||||
```
|
||||
|
||||
Finally, build and start Element itself:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/vector-im/riot-web.git
|
||||
cd riot-web
|
||||
git checkout develop
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-react-sdk
|
||||
yarn install
|
||||
yarn start
|
||||
```
|
||||
|
||||
|
||||
Wait a few seconds for the initial build to finish; you should see something like:
|
||||
```
|
||||
Hash: b0af76309dd56d7275c8
|
||||
Version: webpack 1.12.14
|
||||
Time: 14533ms
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 4.2 MB 0 [emitted] main
|
||||
bundle.css 91.5 kB 0 [emitted] main
|
||||
bundle.js.map 5.29 MB 0 [emitted] main
|
||||
bundle.css.map 116 kB 0 [emitted] main
|
||||
+ 1013 hidden modules
|
||||
```
|
||||
Remember, the command will not terminate since it runs the web server
|
||||
and rebuilds source files when they change. This development server also
|
||||
disables caching, so do NOT use it in production.
|
||||
|
||||
Configure the app by copying `config.sample.json` to `config.json` and
|
||||
modifying it. See the [configuration docs](docs/config.md) for details.
|
||||
|
||||
Open http://127.0.0.1:8080/ in your browser to see your newly built Riot.
|
||||
|
||||
**Note**: The build script uses inotify by default on Linux to monitor directories
|
||||
for changes. If the inotify watch limit is too low your build will silently fail.
|
||||
To avoid this issue, we recommend a limit of at least 128M.
|
||||
|
||||
To set a new inotify watch limit, execute:
|
||||
To enable encryption for a room, type
|
||||
|
||||
```
|
||||
$ sudo sysctl fs.inotify.max_user_watches=131072
|
||||
$ sudo sysctl -p
|
||||
/encrypt on
|
||||
```
|
||||
|
||||
If you wish, you can make this new limit permanent, by executing:
|
||||
in the message bar in that room. Vector will then generate a set of keys, and
|
||||
encrypt all outgoing messages in that room. (Note that other people in that
|
||||
room will send messages in the clear unless they also `/encrypt on`.)
|
||||
|
||||
```
|
||||
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
|
||||
$ sudo sysctl -p
|
||||
```
|
||||
___
|
||||
Note that historical encrypted messages cannot currently be decoded - history
|
||||
is therefore lost when the page is reloaded.
|
||||
|
||||
When you make changes to `matrix-react-sdk` or `matrix-js-sdk` they should be
|
||||
automatically picked up by webpack and built.
|
||||
|
||||
If you add or remove any components from the Element skin, you will need to rebuild
|
||||
the skin's index by running, `yarn reskindex`.
|
||||
|
||||
If any of these steps error with, `file table overflow`, you are probably on a mac
|
||||
which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again.
|
||||
You'll need to do this in each new terminal you open before building Element.
|
||||
|
||||
Running the tests
|
||||
-----------------
|
||||
|
||||
There are a number of application-level tests in the `tests` directory; these
|
||||
are designed to run in a browser instance under the control of
|
||||
[karma](https://karma-runner.github.io). To run them:
|
||||
|
||||
* Make sure you have Chrome installed (a recent version, like 59)
|
||||
* Make sure you have `matrix-js-sdk` and `matrix-react-sdk` installed and
|
||||
built, as above
|
||||
* `yarn test`
|
||||
|
||||
The above will run the tests under Chrome in a `headless` mode.
|
||||
|
||||
You can also tell karma to run the tests in a loop (every time the source
|
||||
changes), in an instance of Chrome on your desktop, with `yarn
|
||||
test-multi`. This also gives you the option of running the tests in 'debug'
|
||||
mode, which is useful for stepping through the tests in the developer tools.
|
||||
|
||||
### End-to-End tests
|
||||
|
||||
See [matrix-react-sdk](https://github.com/matrix-org/matrix-react-sdk/#end-to-end-tests) how to run the end-to-end tests.
|
||||
|
||||
Translations
|
||||
============
|
||||
|
||||
To add a new translation, head to the [translating doc](docs/translating.md).
|
||||
|
||||
For a developer guide, see the [translating dev doc](docs/translating-dev.md).
|
||||
|
||||
[<img src="https://translate.riot.im/widgets/riot-web/-/multi-auto.svg" alt="translationsstatus" width="340">](https://translate.riot.im/engage/riot-web/?utm_source=widget)
|
||||
|
||||
Triaging issues
|
||||
===============
|
||||
|
||||
Issues will be triaged by the core team using the below set of tags.
|
||||
|
||||
Tags are meant to be used in combination - e.g.:
|
||||
* P1 critical bug == really urgent stuff that should be next in the bugfixing todo list
|
||||
* "release blocker" == stuff which is blocking us from cutting the next release.
|
||||
* P1 feature type:voip == what VoIP features should we be working on next?
|
||||
|
||||
priority: **compulsory**
|
||||
|
||||
* P1: top priority - i.e. pool of stuff which we should be working on next
|
||||
* P2: still need to fix, but lower than P1
|
||||
* P3: non-urgent
|
||||
* P4: interesting idea - bluesky some day
|
||||
* P5: recorded for posterity/to avoid duplicates. No intention to resolves right now.
|
||||
|
||||
bug or feature: **compulsory**
|
||||
|
||||
* bug
|
||||
* feature
|
||||
|
||||
bug severity: **compulsory, if bug**
|
||||
|
||||
* critical - whole app doesn't work
|
||||
* major - entire feature doesn't work
|
||||
* minor - partially broken feature (but still usable)
|
||||
* cosmetic - feature works functionally but UI/UX is broken
|
||||
|
||||
types
|
||||
* type:* - refers to a particular part of the app; used to filter bugs
|
||||
on a given topic - e.g. VOIP, signup, timeline, etc.
|
||||
|
||||
additional categories (self-explanatory):
|
||||
|
||||
* release blocker
|
||||
* ui/ux (think of this as cosmetic)
|
||||
* network (specific to network conditions)
|
||||
* platform specific
|
||||
* accessibility
|
||||
* maintenance
|
||||
* performance
|
||||
* i18n
|
||||
* blocked - whether this issue currently can't be progressed due to outside factors
|
||||
|
||||
community engagement
|
||||
* easy
|
||||
* hacktoberfest
|
||||
* bounty? - proposal to be included in a bounty programme
|
||||
* bounty - included in Status Open Bounty
|
||||
There is currently no visual indication of whether encryption is enabled for a
|
||||
room, or whether a particular message was encrypted.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
module.exports = "css-file-stub";
|
|
@ -1,23 +0,0 @@
|
|||
module.exports = {
|
||||
"sourceMaps": true,
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": [
|
||||
"last 2 Chrome versions", "last 2 Firefox versions", "last 2 Safari versions"
|
||||
],
|
||||
}],
|
||||
"@babel/preset-typescript",
|
||||
"@babel/preset-flow",
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
["@babel/plugin-proposal-decorators", {legacy: true}],
|
||||
"@babel/plugin-proposal-export-default-from",
|
||||
"@babel/plugin-proposal-numeric-separator",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-proposal-object-rest-spread",
|
||||
"@babel/plugin-transform-flow-comments",
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"default_hs_url": "https://matrix.org",
|
||||
"default_is_url": "https://vector.im"
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix-client.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,
|
||||
"disable_3pid_login": false,
|
||||
"brand": "Element",
|
||||
"integrations_ui_url": "https://scalar.vector.im/",
|
||||
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar.vector.im/api",
|
||||
"https://scalar-staging.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"defaultCountryCode": "GB",
|
||||
"showLabsSettings": false,
|
||||
"features": {
|
||||
"feature_new_spinner": "labs",
|
||||
"feature_pinning": "labs",
|
||||
"feature_custom_status": "labs",
|
||||
"feature_custom_tags": "labs",
|
||||
"feature_state_counters": "labs"
|
||||
},
|
||||
"default_federate": true,
|
||||
"default_theme": "light",
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"matrix.org"
|
||||
]
|
||||
},
|
||||
"welcomeUserId": "@riot-bot:matrix.org",
|
||||
"piwik": {
|
||||
"url": "https://piwik.riot.im/",
|
||||
"whitelistedHSUrls": ["https://matrix.org"],
|
||||
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
|
||||
"siteId": 1
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false,
|
||||
"https://matrix-client.matrix.org": false
|
||||
},
|
||||
"settingDefaults": {
|
||||
"breadcrumbs": true
|
||||
},
|
||||
"jitsi": {
|
||||
"preferredDomain": "jitsi.riot.im"
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"name": "Riot",
|
||||
"description": "A glossy Matrix collaboration client for the web.",
|
||||
"repository": {
|
||||
"url": "https://github.com/vector-im/riot-web",
|
||||
"license": "Apache License 2.0"
|
||||
},
|
||||
"bugs": {
|
||||
"list": "https://github.com/vector-im/riot-web/issues",
|
||||
"report": "https://github.com/vector-im/riot-web/issues/new/choose"
|
||||
},
|
||||
"keywords": [
|
||||
"chat",
|
||||
"riot",
|
||||
"matrix"
|
||||
]
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
# App load order
|
||||
|
||||
Old slow flow:
|
||||
![image](https://user-images.githubusercontent.com/2403652/73848963-00a2a080-4821-11ea-97d4-1200fc2638f3.png)
|
||||
|
||||
Current more parallel flow:
|
||||
![image](https://user-images.githubusercontent.com/2403652/83146440-303a2900-a0ee-11ea-806b-4f53f039b957.png)
|
||||
|
||||
<details><summary>Code</summary>
|
||||
<p>
|
||||
<pre><code>
|
||||
digraph G {
|
||||
node [shape=box];
|
||||
|
||||
subgraph cluster_0 {
|
||||
color=orange;
|
||||
node [style=filled];
|
||||
label = "index.ts";
|
||||
|
||||
entrypoint, s0, ready [shape=point];
|
||||
rageshake, config, i18n, theme, skin, olm [shape=parallelogram];
|
||||
mobile [shape=diamond, label="mobile"];
|
||||
modernizr [shape=diamond];
|
||||
redirect, incompatible [shape=egg];
|
||||
|
||||
entrypoint -> rageshake;
|
||||
rageshake -> mobile [color=blue];
|
||||
mobile -> s0 [label="No"];
|
||||
mobile -> redirect [label="Yes"];
|
||||
|
||||
s0 -> platform;
|
||||
s0 -> olm;
|
||||
platform -> config;
|
||||
|
||||
config -> i18n [color=blue];
|
||||
config -> theme [color=blue];
|
||||
config -> skin [color=blue];
|
||||
|
||||
i18n -> modernizr [color=blue];
|
||||
theme -> modernizr [color=blue];
|
||||
skin -> modernizr [color=blue];
|
||||
|
||||
modernizr -> ready [label="Yes"];
|
||||
modernizr -> incompatible [label="No"];
|
||||
incompatible -> ready [label="user ignore"];
|
||||
|
||||
olm -> ready [color=red];
|
||||
config -> ready [color=red];
|
||||
skin -> ready [color=red];
|
||||
theme -> ready [color=red];
|
||||
i18n -> ready [color=red];
|
||||
}
|
||||
|
||||
subgraph cluster_1 {
|
||||
color = green;
|
||||
node [style=filled];
|
||||
label = "init.tsx";
|
||||
|
||||
ready -> loadApp;
|
||||
loadApp -> matrixchat;
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</p>
|
||||
</details>
|
||||
|
||||
Key:
|
||||
+ Parallelogram: async/await task
|
||||
+ Box: sync task
|
||||
+ Diamond: conditional branch
|
||||
+ Egg: user interaction
|
||||
+ Blue arrow: async task is allowed to settle but allowed to fail
|
||||
+ Red arrow: async task success is asserted
|
||||
|
||||
Notes:
|
||||
+ A task begins when all its dependencies (arrows going into it) are fulfilled.
|
||||
+ The success of setting up rageshake is never asserted, riot-web has a fallback path for running without IDB (and thus rageshake).
|
||||
+ Everything is awaited to be settled before the Modernizr check, to allow it to make use of things like i18n if they are successful.
|
||||
|
||||
Underlying dependencies:
|
||||
![image](https://user-images.githubusercontent.com/2403652/73848977-08624500-4821-11ea-9830-bb0317c41086.png)
|
146
docs/config.md
|
@ -1,146 +0,0 @@
|
|||
Configuration
|
||||
=============
|
||||
|
||||
You can configure the app by copying `config.sample.json` to
|
||||
`config.json` and customising it:
|
||||
|
||||
For a good example, see https://develop.element.io/config.json.
|
||||
|
||||
1. `default_server_config` sets the default homeserver and identity server URL for
|
||||
Element 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 Element 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.
|
||||
* Element 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.
|
||||
* As of Element 1.4.0, identity servers are optional. See [Identity servers](#identity-servers) below.
|
||||
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 and are [documented](labs.md). The feature flag process is
|
||||
[documented](feature-flags.md) as well.
|
||||
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. If an array is passed, an image is chosen randomly for each visit.
|
||||
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. `reportEvent`: Configures the dialog for reporting content to the homeserver
|
||||
admin.
|
||||
1. `adminMessageMD`: An extra message to show on the reporting dialog to
|
||||
mention homeserver-specific policies. Accepts Markdown.
|
||||
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
|
||||
server is not Element 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. `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 Element 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 Element.
|
||||
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.
|
||||
1. `settingDefaults`: Defaults for settings that support the `config` level,
|
||||
as an object mapping setting name to value (note that the "theme" setting
|
||||
is special cased to the `default_theme` in the config file).
|
||||
1. `disable_custom_urls`: disallow the user to change the
|
||||
default homeserver when signing up or logging in.
|
||||
1. `permalinkPrefix`: Used to change the URL that Element generates permalinks with.
|
||||
By default, this is "https://matrix.to" to generate matrix.to (spec) permalinks.
|
||||
Set this to your Riot instance URL if you run an unfederated server (eg:
|
||||
"https://riot.example.org").
|
||||
1. `jitsi`: Used to change the default conference options. Learn more about the
|
||||
Jitsi options at [jitsi.md](./jitsi.md).
|
||||
1. `preferredDomain`: The domain name of the preferred Jitsi instance. Defaults
|
||||
to `jitsi.riot.im`. This is used whenever a user clicks on the voice/video
|
||||
call buttons - integration managers may use a different domain.
|
||||
1. `enable_presence_by_hs_url`: The property key should be the URL of the homeserver
|
||||
and its value defines whether to enable/disable the presence status display
|
||||
from that homeserver. If no options are configured, presence is shown for all
|
||||
homeservers.
|
||||
1. `disable_guests`: Disables guest access tokens and auto-guest registrations.
|
||||
Defaults to false (guests are allowed).
|
||||
1. `disable_login_language_selector`: Disables the login language selector. Defaults
|
||||
to false (language selector is shown).
|
||||
1. `disable_3pid_login`: Disables 3rd party identity options on login and registration form
|
||||
Defaults to false (3rd party identity options are shown).
|
||||
1. `default_federate`: Default option for room federation when creating a room
|
||||
Defaults to true (room federation enabled).
|
||||
|
||||
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 Element
|
||||
appear in some websites like Facebook, and indeed Element 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 Element, 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 Element.
|
||||
|
||||
Identity servers
|
||||
================
|
||||
|
||||
The identity server is used for inviting other users to a room via third party
|
||||
identifiers like emails and phone numbers. It is not used to store your password
|
||||
or account information.
|
||||
|
||||
As of Element 1.4.0, all identity server functions are optional and you are
|
||||
prompted to agree to terms before data is sent to the identity server.
|
||||
|
||||
Element will check multiple sources when looking for an identity server to use in
|
||||
the following order of preference:
|
||||
|
||||
1. The identity server set in the user's account data
|
||||
* For a new user, no value is present in their account data. It is only set
|
||||
if the user visits Settings and manually changes their identity server.
|
||||
2. The identity server provided by the `.well-known` lookup that occurred at
|
||||
login
|
||||
3. The identity server provided by the Riot config file
|
||||
|
||||
If none of these sources have an identity server set, then Element will prompt the
|
||||
user to set an identity server first when attempting to use features that
|
||||
require one.
|
||||
|
||||
Currently, the only two public identity servers are https://vector.im and
|
||||
https://matrix.org, however in the future identity servers will be
|
||||
decentralised.
|
||||
|
||||
Desktop app configuration
|
||||
=========================
|
||||
|
||||
See https://github.com/vector-im/riot-desktop#user-specified-configjson
|
16
docs/e2ee.md
|
@ -1,16 +0,0 @@
|
|||
# End to end encryption by default
|
||||
|
||||
By default, Element will create encrypted DM rooms if the user you are chatting with has keys uploaded on their account.
|
||||
For private room creation, Element will default to encryption on but give you the choice to opt-out.
|
||||
|
||||
## Disabling encryption by default
|
||||
|
||||
Set the following on your homeserver's
|
||||
`/.well-known/matrix/client` config:
|
||||
```json
|
||||
{
|
||||
"im.vector.riot.e2ee": {
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
```
|
|
@ -1,135 +0,0 @@
|
|||
# Feature flags
|
||||
|
||||
When developing new features for Element, we use feature flags to give us more
|
||||
flexibility and control over when and where those features are enabled.
|
||||
|
||||
For example, flags make the following things possible:
|
||||
|
||||
* Extended testing of a feature via labs on develop
|
||||
* Enabling features when ready instead of the first moment the code is released
|
||||
* Testing a feature with a specific set of users (by enabling only on a specific
|
||||
Riot instance)
|
||||
|
||||
The size of the feature controlled by a feature flag may vary widely: it could
|
||||
be a large project like reactions or a smaller change to an existing algorithm.
|
||||
A large project might use several feature flags if it's useful to control the
|
||||
deployment of different portions independently.
|
||||
|
||||
Everyone involved in a feature (engineering, design, product, reviewers) should
|
||||
think about its deployment plan up front as best as possible so we can have the
|
||||
right feature flags in place from the start.
|
||||
|
||||
## Interaction with spec process
|
||||
|
||||
Historically, we have often used feature flags to guard client features that
|
||||
depend on unstable spec features. Unfortunately, there was never clear agreement
|
||||
about how long such a flag should live for, when it should be removed, etc.
|
||||
|
||||
Under the [new spec
|
||||
process](https://github.com/matrix-org/matrix-doc/pull/2324), server-side
|
||||
unstable features can be used by clients and enabled by default as long as
|
||||
clients commit to doing the associated clean up work once a feature stabilises.
|
||||
|
||||
## Starting work on a feature
|
||||
|
||||
When starting work on a feature, we should create a matching feature flag:
|
||||
|
||||
1. Add a new
|
||||
[setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
|
||||
of the form:
|
||||
```js
|
||||
"feature_cats": {
|
||||
isFeature: true,
|
||||
displayName: _td("Adds cats everywhere"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
```
|
||||
2. Check whether the feature is enabled as appropriate:
|
||||
```js
|
||||
SettingsStore.isFeatureEnabled("feature_cats")
|
||||
```
|
||||
3. Add the feature to the set of labs on
|
||||
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json)
|
||||
and [nightly](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/nightly/config.json):
|
||||
```json
|
||||
"features": {
|
||||
"feature_cats": "labs"
|
||||
},
|
||||
```
|
||||
4. Document the feature in the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
|
||||
|
||||
With these steps completed, the feature is disabled by default, but can be
|
||||
enabled on develop and nightly by interested users for testing.
|
||||
|
||||
Different features may have different deployment plans for when to enable where.
|
||||
The following lists a few common options.
|
||||
|
||||
## Enabling by default on develop and nightly
|
||||
|
||||
Set the feature to `enable` in the
|
||||
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json)
|
||||
and
|
||||
[nightly](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/nightly/config.json)
|
||||
configs:
|
||||
|
||||
```json
|
||||
"features": {
|
||||
"feature_cats": "enable"
|
||||
},
|
||||
```
|
||||
|
||||
## Enabling by default on staging, app, and release
|
||||
|
||||
Set the feature to `enable` in the
|
||||
[staging / app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json)
|
||||
and
|
||||
[release](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/release/config.json)
|
||||
configs.
|
||||
|
||||
**Warning:** While this does mean the feature is enabled by default for
|
||||
https://app.element.io and official Element Desktop builds, it will not be enabled by
|
||||
default for self-hosted installs, custom desktop builds, etc. To cover those
|
||||
cases as well, the best options at the moment are converting to a regular
|
||||
setting defaulted on or to remove the flag. Simply enabling the existing flag by
|
||||
default in `Settings.js`
|
||||
[does not work currently](https://github.com/vector-im/riot-web/issues/10360).
|
||||
|
||||
## Feature deployed successfully
|
||||
|
||||
Once we're confident that a feature is working well, we should remove the flag:
|
||||
|
||||
1. Remove the [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
|
||||
2. Remove all `isFeatureEnabled` lines that test for the feature's setting
|
||||
3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
|
||||
4. Remove feature state from
|
||||
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json),
|
||||
[nightly](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/nightly/config.json),
|
||||
[staging / app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json),
|
||||
and
|
||||
[release](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/release/config.json)
|
||||
configs
|
||||
5. Celebrate! 🥳
|
||||
|
||||
## Convert to a regular setting (optional)
|
||||
|
||||
Sometimes we decide a feature should always be user-controllable as a setting
|
||||
even after it has been fully deployed. In that case, we would craft a new,
|
||||
regular setting:
|
||||
|
||||
1. Remove the feature flag from
|
||||
[settings](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
|
||||
and add a regular setting with the appropriate levels for your feature
|
||||
2. Replace the `isFeatureEnabled` lines with `getValue` or similar calls
|
||||
according to the [settings
|
||||
docs](https://github.com/matrix-org/matrix-react-sdk/blob/develop/docs/settings.md)
|
||||
(checking carefully, as we may want a different mix of code paths when the
|
||||
feature is always present but gated by a setting)
|
||||
3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
|
||||
4. Remove feature state from
|
||||
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json),
|
||||
[nightly](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/nightly/config.json),
|
||||
[staging / app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json),
|
||||
and
|
||||
[release](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/release/config.json)
|
||||
configs
|
|
@ -1,100 +0,0 @@
|
|||
# Jitsi wrapper developer docs
|
||||
|
||||
*If you're looking for information on how to set up Jitsi in your Element, see
|
||||
[jitsi.md](./jitsi.md) instead.*
|
||||
|
||||
These docs are for developers wondering how the different conference buttons work
|
||||
within Element. If you're not a developer, you're probably looking for [jitsi.md](./jitsi.md).
|
||||
|
||||
## Brief introduction to widgets
|
||||
|
||||
Widgets are embedded web applications in a room, controlled through state events, and
|
||||
have a `url` property. They are largely specified by [MSC1236](https://github.com/matrix-org/matrix-doc/issues/1236)
|
||||
and have extensions proposed under [MSC1286](https://github.com/matrix-org/matrix-doc/issues/1286).
|
||||
|
||||
The `url` is typically something we shove into an iframe with sandboxing (see `AppTile`
|
||||
in the react-sdk), though for some widgets special integration can be done. v2 widgets
|
||||
have a `data` object which helps achieve that special integration, though v1 widgets
|
||||
are best iframed and left alone.
|
||||
|
||||
Widgets have a `postMessage` API they can use to interact with Element, which also allows
|
||||
Element to interact with them. Typically this is most used by the sticker picker (an
|
||||
account-level widget), though widgets like the Jitsi widget will request permissions to
|
||||
get 'stuck' into the room list during a conference.
|
||||
|
||||
Widgets can be added with the `/addwidget <url>` command.
|
||||
|
||||
## Brief introduction to integration managers
|
||||
|
||||
Integration managers (like Scalar and Dimension) are accessible via the 4 squares in
|
||||
the top right of the room and provide a simple UI over top of bridges, bots, and other
|
||||
stuff to plug into a room. They are a separate service to Element and are thus iframed
|
||||
in a dialog as well. They also have a `postMessage` API they can use to interact with
|
||||
the client to create things like widgets, give permissions to bridges, and generally
|
||||
set everything up for the integration the user is working with.
|
||||
|
||||
Integration managers do not currently have a spec associated with them, though efforts
|
||||
are underway in [MSC1286](https://github.com/matrix-org/matrix-doc/issues/1286).
|
||||
|
||||
## Widgets configured by integration managers
|
||||
|
||||
Integration managers will often "wrap" a widget by using a widget `url` which points
|
||||
to the integration manager instead of to where the user requested the widget be. For
|
||||
example, a custom widget added in an integration manager for https://matrix.org will
|
||||
end up creating a widget with a URL like `https://integrations.example.org?widgetUrl=https%3A%2F%2Fmatrix.org`.
|
||||
|
||||
The integration manager's wrapper will typically have another iframe to isolate the
|
||||
widget from the client by yet another layer. The wrapper often provides other functionality
|
||||
which might not be available on the embedded site, such as a fullscreen button or the
|
||||
communication layer with the client (all widgets *should* be talking to the client
|
||||
over `postMessage`, even if they aren't going to be using the widget APIs).
|
||||
|
||||
Widgets added with the `/addwidget` command will *not* be wrapped as they are not going
|
||||
through an integration manager. The widgets themselves *should* also work outside of
|
||||
Element. Widgets currently have a "pop out" button which opens them in a new tab and
|
||||
therefore have no connection back to Riot.
|
||||
|
||||
## Jitsi widgets from integration managers
|
||||
|
||||
Integration managers will create an entire widget event and send it over `postMessage`
|
||||
for the client to add to the room. This means that the integration manager gets to
|
||||
decide the conference domain, conference name, and other aspects of the widget. As
|
||||
a result, users can end up with a Jitsi widget that does not use the same conference
|
||||
server they specified in their config.json - this is expected.
|
||||
|
||||
Some integration managers allow the user to change the conference name while others
|
||||
will generate one for the user.
|
||||
|
||||
## Jitsi widgets generated by Element itself
|
||||
|
||||
When the user clicks on the call buttons by the composer, the integration manager is
|
||||
not involved in the slightest. Instead, Element itself generates a widget event, this time
|
||||
using the config.json parameters, and publishes that to the room. If there's only two
|
||||
people in the room, a plain WebRTC call is made instead of using a widget at all - these
|
||||
are defined in the Matrix specification.
|
||||
|
||||
The Jitsi widget created by Element uses a local `jitsi.html` wrapper (or one hosted by
|
||||
`https://app.element.io` for desktop users or those on non-https domains) as the widget
|
||||
`url`. The wrapper has some basic functionality for talking to Element to ensure the
|
||||
required `postMessage` calls are fulfilled.
|
||||
|
||||
**Note**: Per [jitsi.md](./jitsi.md) the `preferredDomain` can also come from the server's
|
||||
client .well-known data.
|
||||
|
||||
## The Jitsi wrapper in Element
|
||||
|
||||
Whenever Element sees a Jitsi widget, it ditches the `url` and instead replaces it with
|
||||
its local wrapper, much like what it would do when creating a widget. However, instead
|
||||
of using one from [app.element.io](https://app.element.io), it will use one local to the client instead.
|
||||
|
||||
The wrapper is used to provide a consistent experience to users, as well as being faster
|
||||
and less risky to load. The local wrapper URL is populated with the conference information
|
||||
from the original widget (which could be a v1 or v2 widget) so the user joins the right
|
||||
call.
|
||||
|
||||
Critically, when the widget URL is reconstructed it does *not* take into account the
|
||||
config.json's `preferredDomain` for Jitsi. If it did this, users would end up on different
|
||||
conference servers and therefore different calls entirely.
|
||||
|
||||
**Note**: Per [jitsi.md](./jitsi.md) the `preferredDomain` can also come from the server's
|
||||
client .well-known data.
|
|
@ -1,58 +0,0 @@
|
|||
# Jitsi in Element
|
||||
|
||||
Element uses [Jitsi](https://jitsi.org/) for conference calls, which provides options for
|
||||
self-hosting your own server and supports most major platforms.
|
||||
|
||||
1:1 calls, or calls between you and one other person, do not use Jitsi. Instead, those
|
||||
calls work directly between clients or via TURN servers configured on the respective
|
||||
homeservers.
|
||||
|
||||
There's a number of ways to start a Jitsi call: the easiest way is to click on the
|
||||
voice or video buttons near the message composer in a room with more than 2 people. This
|
||||
will add a Jitsi widget which allows anyone in the room to join.
|
||||
|
||||
Integration managers (available through the 4 squares in the top right of the room) may
|
||||
provide their own approaches for adding Jitsi widgets.
|
||||
|
||||
## Configuring Element to use your self-hosted Jitsi server
|
||||
|
||||
Element will use the Jitsi server that is embedded in the widget, even if it is not the
|
||||
one you configured. This is because conference calls must be held on a single Jitsi
|
||||
server and cannot be split over multiple servers.
|
||||
|
||||
However, you can configure Element to *start* a conference with your Jitsi server by adding
|
||||
to your [config](./config.md) the following:
|
||||
```json
|
||||
{
|
||||
"jitsi": {
|
||||
"preferredDomain": "your.jitsi.example.org"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The default is `jitsi.riot.im` (a free service offered by Element), and the demo site for
|
||||
Jitsi uses `meet.jit.si` (also free).
|
||||
|
||||
Once you've applied the config change, refresh Element and press the call button. This
|
||||
should start a new conference on your Jitsi server.
|
||||
|
||||
**Note**: The widget URL will point to a `jitsi.html` page hosted by Element. The Jitsi
|
||||
domain will appear later in the URL as a configuration parameter.
|
||||
|
||||
**Hint**: If you want everyone on your homeserver to use the same Jitsi server by
|
||||
default, and you are using riot-web 1.6 or newer, set the following on your homeserver's
|
||||
`/.well-known/matrix/client` config:
|
||||
```json
|
||||
{
|
||||
"im.vector.riot.jitsi": {
|
||||
"preferredDomain": "your.jitsi.example.org"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Mobile app support
|
||||
|
||||
Currently the Element mobile apps do not support custom Jitsi servers and will instead
|
||||
use the default `jitsi.riot.im` server. When users on the mobile apps join the call,
|
||||
they will be joining a different conference which has the same name, but not the same
|
||||
participants. This is a known bug and which needs to be fixed.
|
96
docs/labs.md
|
@ -1,96 +0,0 @@
|
|||
# Labs features
|
||||
|
||||
If Labs is enabled in the [Element config](config.md), you can enable some of these features by going
|
||||
to `Settings->Labs`. This list is non-exhaustive and subject to change, chat in
|
||||
[#element-web:matrix.org](https://matrix.to/#/#element-web:matrix.org) for more information.
|
||||
|
||||
**Be warned! Labs features are not finalised, they may be fragile, they may change, they may be
|
||||
dropped. Ask in the room if you are unclear about any details here.**
|
||||
|
||||
## New spinner design (`feature_new_spinner`)
|
||||
|
||||
Replaces the old spinner image with a new, svg-based one featuring a sleeker design.
|
||||
|
||||
## Message pinning (`feature_pinning`)
|
||||
|
||||
Allows you to pin messages in the room. To pin a message, use the 3 dots to the right of the message
|
||||
and select "Pin".
|
||||
|
||||
## Custom status (`feature_custom_status`)
|
||||
|
||||
An experimental approach for supporting custom status messages across DMs. To set a status, click on
|
||||
your avatar next to the message composer.
|
||||
|
||||
## Custom tags (`feature_custom_tags`)
|
||||
|
||||
An experimental approach for dealing with custom tags. Custom tags will appear in the bottom portion
|
||||
of the community filter panel.
|
||||
|
||||
Setting custom tags is not supported by Element.
|
||||
|
||||
## Render simple counters in room header (`feature_state_counters`)
|
||||
|
||||
Allows rendering of labelled counters above the message list.
|
||||
|
||||
Once enabled, send a custom state event to a room to set values:
|
||||
|
||||
1. In a room, type `/devtools` to bring up the devtools interface
|
||||
2. Click "Send Custom Event"
|
||||
3. Toggle from "Event" to "State Event"
|
||||
4. Set the event type to: `re.jki.counter` and give it a unique key
|
||||
5. Specify the content in the following format:
|
||||
|
||||
```
|
||||
{
|
||||
"link": "",
|
||||
"severity": "normal",
|
||||
"title": "my counter",
|
||||
"value": 0
|
||||
}
|
||||
```
|
||||
|
||||
That's it. Now should see your new counter under the header.
|
||||
|
||||
## Multiple integration managers (`feature_many_integration_managers`)
|
||||
|
||||
Exposes a way to access all the integration managers known to Element. This is an implementation of [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957).
|
||||
|
||||
## New ways to ignore people (`feature_mjolnir`)
|
||||
|
||||
When enabled, a new settings tab appears for users to be able to manage their ban lists.
|
||||
This is a different kind of ignoring where the ignored user's messages still get rendered,
|
||||
but are hidden by default.
|
||||
|
||||
Ban lists are rooms within Matrix, proposed as [MSC2313](https://github.com/matrix-org/matrix-doc/pull/2313).
|
||||
[Mjolnir](https://github.com/matrix-org/mjolnir) is a set of moderation tools which support
|
||||
ban lists.
|
||||
|
||||
## Verifications in DMs (`feature_dm_verification`)
|
||||
|
||||
An implementation of [MSC2241](https://github.com/matrix-org/matrix-doc/pull/2241). When enabled, verification might not work with devices which don't support MSC2241.
|
||||
|
||||
This also includes a new implementation of the user & member info panel, designed to share more code between showing community members & room members. Built on top of this new panel is also a new UX for verification from the member panel.
|
||||
|
||||
The setting will be removed in a future release, enabling it non-optionally for
|
||||
all users.
|
||||
|
||||
## Bridge info tab (`feature_bridge_state`)
|
||||
|
||||
Adds a "Bridge Info" tab to the Room Settings dialog, if a compatible bridge is
|
||||
present in the room. The Bridge info tab pulls information from the `m.bridge` state event ([MSC2346](https://github.com/matrix-org/matrix-doc/pull/2346)). Since the feature is based upon a MSC, most
|
||||
bridges are not expected to be compatible, and users should not rely on this
|
||||
tab as the single source of truth just yet.
|
||||
|
||||
## Presence indicator in room list (`feature_presence_in_room_list`)
|
||||
|
||||
This adds a presence indicator in the room list next to DM rooms where the other
|
||||
person is online.
|
||||
|
||||
## Custom themes (`feature_custom_themes`)
|
||||
|
||||
Custom themes are possible through Element's [theme support](./theming.md), though
|
||||
normally these themes need to be defined in the config for Element. This labs flag
|
||||
adds an ability for end users to add themes themselves by using a URL to the JSON
|
||||
theme definition.
|
||||
|
||||
For some sample themes, check out [aaronraimist/element-themes](https://github.com/aaronraimist/element-themes).
|
|
@ -1,53 +0,0 @@
|
|||
## Memory leaks
|
||||
|
||||
Element usually emits slow behaviour just before it is about to crash. Getting a
|
||||
memory snapshot (below) just before that happens is ideal in figuring out what
|
||||
is going wrong.
|
||||
|
||||
Common symptoms are clicking on a room and it feels like the tab froze and scrolling
|
||||
becoming jumpy/staggered.
|
||||
|
||||
If you receive a white screen (electron) or the chrome crash page, it is likely
|
||||
run out of memory and it is too late for a memory profile. Please do report when
|
||||
this happens though so we can try and narrow down what might have gone wrong.
|
||||
|
||||
## Memory profiles/snapshots
|
||||
|
||||
When investigating memory leaks/problems it's usually important to compare snapshots
|
||||
from different points in the Element session lifecycle. Most importantly, a snapshot
|
||||
to establish the baseline or "normal" memory usage is useful. Taking a snapshot
|
||||
roughly 30-60 minutes after starting Element is a good time to establish "normal"
|
||||
memory usage for the app - anything after that is at risk of hiding the memory leak
|
||||
and anything newer is still in the warmup stages of the app.
|
||||
|
||||
**Memory profiles can contain sensitive information.** If you are submitting a memory
|
||||
profile to us for debugging purposes, please pick the appropriate Element developer and
|
||||
send them over an encrypted private message. *Do not share your memory profile in
|
||||
public channels or with people you do not trust.*
|
||||
|
||||
### Taking a memory profile (Firefox)
|
||||
|
||||
1. Press CTRL+SHIFT+I (I as in eye).
|
||||
2. Click the Memory tab.
|
||||
3. Press the camera icon in the top left of the pane.
|
||||
4. Wait a bit (coffee is a good option).
|
||||
5. When the save button appears on the left side of the panel, click it to save the
|
||||
profile locally.
|
||||
6. Compress the file (gzip or regular zip) to make the file smaller.
|
||||
7. Send the compressed file to whoever asked for it (if you trust them).
|
||||
|
||||
While the profile is in progress, the tab might be frozen or unresponsive.
|
||||
|
||||
### Taking a memory profile (Chrome/Desktop)
|
||||
|
||||
1. Press CTRL+SHIFT+I (I as in eye).
|
||||
2. Click the Memory tab.
|
||||
3. Select "Heap Snapshot" and the app.element.io VM instance (not the indexeddb one).
|
||||
4. Click "Take Snapshot".
|
||||
5. Wait a bit (coffee is a good option).
|
||||
6. When the save button appears on the left side of the panel, click it to save the
|
||||
profile locally.
|
||||
7. Compress the file (gzip or regular zip) to make the file smaller.
|
||||
8. Send the compressed file to whoever asked for it (if you trust them).
|
||||
|
||||
While the profile is in progress, the tab might be frozen or unresponsive.
|
|
@ -1,60 +0,0 @@
|
|||
# Native Node Modules
|
||||
|
||||
For some features, the desktop version of Element can make use of native Node
|
||||
modules. These allow Riot to integrate with the desktop in ways that a browser
|
||||
cannot.
|
||||
|
||||
While native modules enable powerful new features, they must be complied for
|
||||
each operating system. For official Element releases, we will always build these
|
||||
modules from source to ensure we can trust the compiled output. In the future,
|
||||
we may offer a pre-compiled path for those who want to use these features in a
|
||||
custom build of Element without installing the various build tools required.
|
||||
|
||||
Do note that compiling a module for a particular operating system
|
||||
(Linux/macOS/Windows) will need to be done on that operating system.
|
||||
Cross-compiling from a host OS for a different target OS may be possible, but
|
||||
we don't support this flow with Element dependencies at this time.
|
||||
|
||||
At the moment, we need to make some changes to the Element release process before
|
||||
we can support native Node modules at release time, so these features are
|
||||
currently disabled by default until that is resolved. The following sections
|
||||
explain the manual steps you can use with a custom build of Element to enable
|
||||
these features if you'd like to try them out.
|
||||
|
||||
## Adding Seshat for search in E2E encrypted rooms
|
||||
|
||||
Seshat is a native Node module that adds support for local event indexing and
|
||||
full text search in E2E encrypted rooms.
|
||||
|
||||
Since Seshat is written in Rust, the Rust compiler and related tools need to be
|
||||
installed before installing Seshat itself. To install Rust please consult the
|
||||
official Rust [documentation](https://www.rust-lang.org/tools/install).
|
||||
|
||||
Seshat also depends on the SQLCipher library to store its data in encrypted form
|
||||
on disk. You'll need to install it via your OS package manager.
|
||||
|
||||
After installing the Rust compiler and SQLCipher, Seshat support can be added
|
||||
using yarn inside the `electron_app/` directory:
|
||||
|
||||
yarn add matrix-seshat
|
||||
|
||||
You will have to rebuild the native libraries against electron's version of
|
||||
of node rather than your system node, using the `electron-build-env` tool.
|
||||
This is also needed to when pulling in changes to Seshat using `yarn link`.
|
||||
Again from the `electron_app/` directory:
|
||||
|
||||
yarn add electron-build-env
|
||||
|
||||
Recompiling Seshat itself can be done like so:
|
||||
|
||||
yarn run electron-build-env -- --electron 6.1.1 -- neon build matrix-seshat --release
|
||||
|
||||
Please make sure to include all the `--` as well as the `--release` command line
|
||||
switch at the end. Modify your electron version accordingly depending on the
|
||||
version that is installed on your system.
|
||||
|
||||
After this is done the Electron version of Element can be run from the main folder
|
||||
as usual using:
|
||||
|
||||
yarn electron
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
# Review Guidelines
|
||||
|
||||
The following summarises review guidelines that we follow for pull requests in
|
||||
Element Web and other supporting repos. These are just guidelines (not strict
|
||||
rules) and may be updated over time.
|
||||
|
||||
## Code Review
|
||||
|
||||
When reviewing code, here are some things we look for and also things we avoid:
|
||||
|
||||
### We review for
|
||||
|
||||
* Correctness
|
||||
* Performance
|
||||
* Accessibility
|
||||
* Security
|
||||
* Comments and documentation where needed
|
||||
* Sharing knowledge of different areas among the team
|
||||
* Ensuring it's something we're comfortable maintaining for the long term
|
||||
* Progress indicators and local echo where appropriate with network activity
|
||||
|
||||
### We should avoid
|
||||
|
||||
* Style nits that are already handled by the linter
|
||||
* Dramatically increasing scope
|
||||
|
||||
### Good practices
|
||||
|
||||
* Use empathetic language
|
||||
* See also [Mindful Communication in Code
|
||||
Reviews](https://kickstarter.engineering/a-guide-to-mindful-communication-in-code-reviews-48aab5282e5e)
|
||||
and [How to Do Code Reviews Like a Human](https://mtlynch.io/human-code-reviews-1/)
|
||||
* Authors should prefer smaller commits for easier reviewing and bisection
|
||||
* Reviewers should be explicit about required versus optional changes
|
||||
* Reviews are conversations and the PR author should feel comfortable
|
||||
discussing and pushing back on changes before making them
|
||||
* Core team should lead by example through their tone and language
|
||||
* Take the time to thank and point out good code changes
|
||||
* Using softer language like "please" and "what do you think?" goes a long way
|
||||
towards making others feel like colleagues working towards a common goal
|
||||
|
||||
### Workflow
|
||||
|
||||
* Authors should request review from the riot-web team by default (if someone on
|
||||
the team is clearly the expert in an area, a direct review request to them may
|
||||
be more appropriate)
|
||||
* Reviewers should remove the team review request and request review from
|
||||
themselves when starting a review to avoid double review
|
||||
* If there are multiple related PRs authors should reference each of the PRs in
|
||||
the others before requesting review. Reviewers might start reviewing from
|
||||
different places and could miss other required PRs.
|
||||
* Avoid force pushing to a PR after the first round of review
|
||||
* Use the GitHub default of merge commits when landing (avoid alternate options
|
||||
like squash or rebase)
|
||||
* PR author merges after review (assuming they have write access)
|
||||
* Assign issues only when in progress to indicate to others what can be picked
|
||||
up
|
||||
|
||||
## Design and Product Review
|
||||
|
||||
We want to ensure that all changes to Element fit with our design and product
|
||||
vision. We often request review from those teams so they can provide their
|
||||
perspective.
|
||||
|
||||
In more detail, our usual process for changes that affect the UI or alter user
|
||||
functionality is:
|
||||
|
||||
* For changes that will go live when merged, always flag Design and Product
|
||||
teams as appropriate
|
||||
* For changes guarded by a feature flag, Design and Product review is not
|
||||
required (though may still be useful) since we can continue tweaking
|
||||
|
||||
As it can be difficult to review design work from looking at just the changed
|
||||
files in a PR, authors should be prepared for Design and / or Product teams to
|
||||
request a link to an ad-hoc build of Element (hosted anywhere) that can be used for
|
||||
the review. In the future, we [hope to automate
|
||||
this](https://github.com/vector-im/riot-web/issues/12624) for every PR.
|
||||
|
||||
Before starting work on a feature, it's best to ensure your plan aligns well
|
||||
with our vision for Element. Please chat with the team in
|
||||
[#element-dev:matrix.org](https://matrix.to/#/#element-dev:matrix.org) before you
|
||||
start so we can ensure it's something we'd be willing to merge.
|
|
@ -1,68 +0,0 @@
|
|||
== Skinning refactor ==
|
||||
|
||||
matrix-react-sdk
|
||||
- base images
|
||||
- base CSS
|
||||
- all the components needed to build a workable app (including the top layer)
|
||||
|
||||
element-web: the Element skin
|
||||
- Element-specific classes (e.g. login header/footer)
|
||||
- Element-specific themes
|
||||
- light
|
||||
- dark
|
||||
|
||||
i.e. the only things which should go into element-web are bits which apply vector-specific skinning
|
||||
specifically "Stuff that any other brand would not want to use. (e.g. Element logos, links, T&Cs)"
|
||||
- Questions:
|
||||
- Electron app? (should probably be a separate repo in its own right? but might as well go here for now)
|
||||
- index.html & index.js? (should be in matrix-react-sdk, given the SDK is useless without them?)
|
||||
|
||||
ideally matrix-react-sdk itself should ship with a default skin which actually works built in.
|
||||
|
||||
status skin (can go in the same app for now)
|
||||
- has status theme
|
||||
- which inherits from Element light theme
|
||||
- how do we share graphics between skins?
|
||||
- shove them into react-sdk, or...
|
||||
- guess we do ../../vector/img
|
||||
- this means keeping the skin name in the images (unless /img is a shortcut to the right skin's images)
|
||||
|
||||
out of scope:
|
||||
- making the components more independent, so they can be used in isolation.
|
||||
- that said, the bits which should probably be used by being embeded into a different app:
|
||||
- login/reg
|
||||
- RoomView + RoomSettings
|
||||
- MessageComposer
|
||||
- RoomList
|
||||
- MemberList
|
||||
- MemberInfo
|
||||
- Voip UI
|
||||
- UserSettings
|
||||
- sharing different js-sdks between the different isolated modules
|
||||
|
||||
other changes:
|
||||
- how do we handle i18n?
|
||||
- each skin should really be its own i18n project. As long as all the commonality stuff is in matrix-react-sdk this shouldn't be too bad.
|
||||
- ability to associate components with a given skin
|
||||
- skins/vector/src <-- components
|
||||
- skins/vector/css
|
||||
- skins/vector/img
|
||||
- skins/vector/fonts
|
||||
- gather together themes (per skin) into a single place too
|
||||
- skins/vector/themes/foo/css
|
||||
- skins/vector/themes/foo/img
|
||||
- skins/vector/themes/foo/fonts
|
||||
- ideally riot-web would contain almost nothing but skins/vector directory.
|
||||
- ability to entirely replace CSS rather than override it for a given theme
|
||||
- e.g. if we replace `Login.js` with `StatusLogin.js`, then we should similarly be able to replace `_Login.scss` with `_StatusLogin.scss`.
|
||||
|
||||
random thoughts;
|
||||
- should we be able to change the entire skin at runtime (more like wordpress) - to the extent of replacing entire components?
|
||||
- might pose security issues if a theme can be swapped out to replace MatrixChat or other fundamental functionality at runtime
|
||||
- if so, perhaps skins & themes should converge...
|
||||
|
||||
-----------------
|
||||
|
||||
Immediate plan for Status:
|
||||
* Implement it as a theme for the Element skin
|
||||
* Ideally move skins to a sensible level (possibly even including src?)
|
|
@ -1,98 +0,0 @@
|
|||
Theming Element
|
||||
============
|
||||
|
||||
Themes are a very basic way of providing simple alternative look & feels to the
|
||||
Element app via CSS & custom imagery.
|
||||
|
||||
They are *NOT* co be confused with 'skins', which describe apps which sit on top
|
||||
of matrix-react-sdk - e.g. in theory Element itself is a react-sdk skin.
|
||||
As of Jan 2017, skins are not fully supported; Element is the only available skin.
|
||||
|
||||
To define a theme for Element:
|
||||
|
||||
1. Pick a name, e.g. `teal`. at time of writing we have `light` and `dark`.
|
||||
2. Fork `src/skins/vector/css/themes/dark.scss` to be `teal.scss`
|
||||
3. Fork `src/skins/vector/css/themes/_base.scss` to be `_teal.scss`
|
||||
4. Override variables in `_teal.scss` as desired. You may wish to delete ones
|
||||
which don't differ from `_base.scss`, to make it clear which are being
|
||||
overridden. If every single colour is being changed (as per `_dark.scss`)
|
||||
then you might as well keep them all.
|
||||
5. Add the theme to the list of entrypoints in webpack.config.js
|
||||
6. Add the theme to the list of themes in matrix-react-sdk's UserSettings.js
|
||||
7. Sit back and admire your handywork.
|
||||
|
||||
In future, the assets for a theme will probably be gathered together into a
|
||||
single directory tree.
|
||||
|
||||
Custom Themes
|
||||
=============
|
||||
|
||||
Themes derived from the built in themes may also be defined in settings.
|
||||
|
||||
To avoid name collisions, the internal name of a theme is
|
||||
`custom-${theme.name}`. So if you want to set the custom theme below as the
|
||||
default theme, you would use `default_theme: "custom-Electric Blue"`.
|
||||
|
||||
eg. in config.json:
|
||||
|
||||
```
|
||||
"settingDefaults": {
|
||||
"custom_themes": [
|
||||
{
|
||||
"name": "Electric Blue",
|
||||
"is_dark": false,
|
||||
"fonts": {
|
||||
"faces": [
|
||||
{
|
||||
"font-family": "Inter",
|
||||
"src": [{"url": "/fonts/Inter.ttf", "format": "ttf"}]
|
||||
}
|
||||
],
|
||||
"general": "Inter, sans",
|
||||
"monospace": "'Courier New'"
|
||||
},
|
||||
"colors": {
|
||||
"accent-color": "#3596fc",
|
||||
"primary-color": "#368bd6",
|
||||
"warning-color": "#ff4b55",
|
||||
"sidebar-color": "#27303a",
|
||||
"roomlist-background-color": "#f3f8fd",
|
||||
"roomlist-text-color": "#2e2f32",
|
||||
"roomlist-text-secondary-color": "#61708b",
|
||||
"roomlist-highlights-color": "#ffffff",
|
||||
"roomlist-separator-color": "#e3e8f0",
|
||||
"timeline-background-color": "#ffffff",
|
||||
"timeline-text-color": "#2e2f32",
|
||||
"timeline-text-secondary-color": "#61708b",
|
||||
"timeline-highlights-color": "#f3f8fd",
|
||||
"username-colors": ["#ff0000", ...]
|
||||
"avatar-background-colors": ["#cc0000", ...]
|
||||
}
|
||||
}, {
|
||||
"name": "Deep Purple",
|
||||
"is_dark": true,
|
||||
"colors": {
|
||||
"accent-color": "#6503b3",
|
||||
"primary-color": "#368bd6",
|
||||
"warning-color": "#b30356",
|
||||
"sidebar-color": "#15171B",
|
||||
"roomlist-background-color": "#22262E",
|
||||
"roomlist-text-color": "#A1B2D1",
|
||||
"roomlist-text-secondary-color": "#EDF3FF",
|
||||
"roomlist-highlights-color": "#343A46",
|
||||
"roomlist-separator-color": "#a1b2d1",
|
||||
"timeline-background-color": "#181b21",
|
||||
"timeline-text-color": "#EDF3FF",
|
||||
"timeline-text-secondary-color": "#A1B2D1",
|
||||
"timeline-highlights-color": "#22262E"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`username-colors` is expected to contain 8 colors. `avatar-background-colors` is expected to contain 3 colors. Both values are optional and have fallbacks from the built-in theme.
|
||||
|
||||
These are exposed as `--username-colors_0`, ... and `--avatar-background-colors_0`, ... respectively in CSS.
|
||||
|
||||
All properties in `fonts` are optional, and will default to the standard Riot fonts.
|
|
@ -1,63 +0,0 @@
|
|||
# How to translate Element (Dev Guide)
|
||||
|
||||
## Requirements
|
||||
|
||||
- A working [Development Setup](../../#setting-up-a-dev-environment)
|
||||
- Including up-to-date versions of matrix-react-sdk and matrix-js-sdk
|
||||
- Latest LTS version of Node.js installed
|
||||
- Be able to understand English
|
||||
- Be able to understand the language you want to translate Element into
|
||||
|
||||
## Translating strings vs. marking strings for translation
|
||||
|
||||
Translating strings are done with the `_t()` function found in matrix-react-sdk/lib/languageHandler.js. It is recommended to call this function wherever you introduce a string constant which should be translated. However, translating can not be performed until after the translation system has been initialized. Thus, sometimes translation must be performed at a different location in the source code than where the string is introduced. This breaks some tooling and makes it difficult to find translatable strings. Therefore, there is the alternative `_td()` function which is used to mark strings for translation, without actually performing the translation (which must still be performed separately, and after the translation system has been initialized).
|
||||
|
||||
Basically, whenever a translatable string is introduced, you should call either `_t()` immediately OR `_td()` and later `_t()`.
|
||||
|
||||
Example:
|
||||
```
|
||||
// Module-level constant
|
||||
const COLORS = {
|
||||
'#f8481c': _td('reddish orange'), // Can't call _t() here yet
|
||||
'#fc2647': _td('pinky red') // Use _td() instead so the text is picked up for translation anyway
|
||||
}
|
||||
|
||||
// Function that is called some time after i18n has been loaded
|
||||
function getColorName(hex) {
|
||||
return _t(COLORS[hex]); // Perform actual translation here
|
||||
}
|
||||
```
|
||||
|
||||
## Adding new strings
|
||||
|
||||
1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed.
|
||||
1. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method). If the string is introduced at a point before the translation system has not yet been initialized, use `_td()` instead, and call `_t()` at the appropriate time.
|
||||
1. Run `yarn i18n` to update ``src/i18n/strings/en_EN.json``
|
||||
1. If you added a string with a plural, you can add other English plural variants to ``src/i18n/strings/en_EN.json`` (remeber to edit the one in the same project as the source file containing your new translation).
|
||||
|
||||
## Editing existing strings
|
||||
|
||||
1. Edit every occurrence of the string inside `_t()` and `_td()` in the JSX files.
|
||||
1. Run `yarn i18n` to update `src/i18n/strings/en_EN.json`. (Be sure to run this in the same project as the JSX files you just edited.)
|
||||
1. Run `yarn prunei18n` to remove the old string from `src/i18n/strings/*.json`.
|
||||
|
||||
## Adding variables inside a string.
|
||||
|
||||
1. Extend your ``_t()`` call. Instead of ``_t(STRING)`` use ``_t(STRING, {})``
|
||||
1. Decide how to name it. Please think about if the person who has to translate it can understand what it does. E.g. using the name 'recipient' is bad, because a translator does not know if it is the name of a person, an email address, a user ID, etc. Rather use e.g. recipientEmailAddress.
|
||||
1. Add it to the array in ``_t`` for example ``_t(STRING, {variable: this.variable})``
|
||||
1. Add the variable inside the string. The syntax for variables is ``%(variable)s``. Please note the _s_ at the end. The name of the variable has to match the previous used name.
|
||||
|
||||
- You can use the special ``count`` variable to choose between multiple versions of the same string, in order to get the correct pluralization. E.g. ``_t('You have %(count)s new messages', { count: 2 })`` would show 'You have 2 new messages', while ``_t('You have %(count)s new messages', { count: 1 })`` would show 'You have one new message' (assuming a singular version of the string has been added to the translation file. See above). Passing in ``count`` is much prefered over having an if-statement choose the correct string to use, because some languages have much more complicated plural rules than english (e.g. they might need a completely different form if there are three things rather than two).
|
||||
- If you want to translate text that includes e.g. hyperlinks or other HTML you have to also use tag substitution, e.g. ``_t('<a>Click here!</a>', {}, { 'a': (sub) => <a>{sub}</a> })``. If you don't do the tag substitution you will end up showing literally '<a>' rather than making a hyperlink.
|
||||
- You can also use React components with normal variable substitution if you want to insert HTML markup, e.g. ``_t('Your email address is %(emailAddress)s', { emailAddress: <i>{userEmailAddress}</i> })``.
|
||||
|
||||
## Things to know/Style Guides
|
||||
|
||||
- Do not use `_t()` inside ``getDefaultProps``: the translations aren't loaded when `getDefaultProps` is called, leading to missing translations. Use `_td()` to indicate that `_t()` will be called on the string later.
|
||||
- If using translated strings as constants, translated strings can't be in constants loaded at class-load time since the translations won't be loaded. Mark the strings using `_td()` instead and perform the actual translation later.
|
||||
- If a string is presented in the UI with punctuation like a full stop, include this in the translation strings, since punctuation varies between languages too.
|
||||
- Avoid "translation in parts", i.e. concatenating translated strings or using translated strings in variable substitutions. Context is important for translations, and translating partial strings this way is simply not always possible.
|
||||
- Concatenating strings often also introduces an implicit assumption about word order (e.g. that the subject of the sentence comes first), which is incorrect for many languages.
|
||||
- Translation 'smell test': If you have a string that does not begin with a capital letter (is not the start of a sentence) or it ends with e.g. ':' or a preposition (e.g. 'to') you should recheck that you are not trying to translate a partial sentence.
|
||||
- If you have multiple strings, that are almost identical, except some part (e.g. a word or two) it is still better to translate the full sentence multiple times. It may seem like inefficient repetion, but unlike programming where you try to minimize repetition, translation is much faster if you have many, full, clear, sentences to work with, rather than fewer, but incomplete sentence fragments.
|
|
@ -1,64 +0,0 @@
|
|||
# How to translate Element
|
||||
|
||||
## Requirements
|
||||
|
||||
- Web Browser
|
||||
- Be able to understand English
|
||||
- Be able to understand the language you want to translate Element into
|
||||
|
||||
## Step 0: Join #riotweb-translations:matrix.org
|
||||
|
||||
1. Come and join https://matrix.to/#/#riotweb-translations:matrix.org
|
||||
2. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)
|
||||
|
||||
## Step 1: Preparing your Weblate Profile
|
||||
|
||||
1. Head to https://translate.riot.im and register either via Github or email
|
||||
2. After registering check if you got an email to verify your account and click the link (if there is none head to step 1.4)
|
||||
3. Log into weblate
|
||||
4. Head to https://translate.riot.im/accounts/profile/ and select the languages you know and maybe another language you know too.
|
||||
6. Head to https://translate.riot.im/accounts/profile/#subscriptions and select Element Web as Project
|
||||
|
||||
## How to check if your language already is being translated
|
||||
|
||||
Go to https://translate.riot.im/projects/riot-web/ and visit the 2 sub-projects.
|
||||
If your language is listed go to Step 2a and if not go to Step 2b
|
||||
|
||||
## Step 2a: Helping on existing languages.
|
||||
|
||||
1. Head to one of the projects listed https://translate.riot.im/projects/riot-web/
|
||||
2. Click on the ``translate`` button on the right side of your language
|
||||
3. Fill in the translations in the writeable field. You will see the original English string and the string of your second language above.
|
||||
|
||||
Head to the explanations under Steb 2b
|
||||
|
||||
## Step 2b: Adding a new language
|
||||
|
||||
1. Go to one of the projects listed https://translate.riot.im/projects/riot-web/
|
||||
2. Click the ``Start new translation`` button at the bottom
|
||||
3. Select a language
|
||||
4. Start translating like in 2a.3
|
||||
5. Repeat these steps for the other projects which are listed at the link of step 2b.1
|
||||
|
||||
### What means the green button under the text field?
|
||||
|
||||
The green button let you save our translations directly. Please only use it if you are 100% sure about that translation. If you do not know a translation please DO NOT click that button. Use the arrows above the translations field and click to the right.
|
||||
|
||||
### What means the yellow button under the text field?
|
||||
|
||||
The yellow button has to be used if you are unsure about the translation but you have a rough idea. It adds a new suggestion to the string which can than be reviewed by others.
|
||||
|
||||
### What are "%(something)s"?
|
||||
|
||||
These things are variables that are expanded when displayed by Element. They can be room names, usernames or similar. If you find one, you can move to the right place for your language, but not delete it as the variable will be missing if you do.
|
||||
|
||||
A special case is `%(urlStart)s` and `%(urlEnd)s` which are used to mark the beginning of a hyperlink (i.e. `<a href="/somewhere">` and `</a>`. You must keep these markers surrounding the equivalent string in your language that needs to be hyperlinked.
|
||||
|
||||
### "I want to come back to this string. How?"
|
||||
|
||||
You can use inside the translation field "Review needed" checkbox. It will be shown as Strings that need to be reviewed.
|
||||
|
||||
|
||||
### Further reading
|
||||
|
||||
The official Weblate doc provides some more in-deepth explanation on how to do translations and talks about do and don'ts. You can find it at: https://docs.weblate.org/en/latest/user/translating.html
|
|
@ -1,12 +0,0 @@
|
|||
This directory contains the config files and deployment scripts for the official
|
||||
element.io distribution of Element Web.
|
||||
|
||||
You probably do not want to build with this config unless you're building the
|
||||
official element.io distribution, but these files may be useful if you want to
|
||||
inspect the configuration used there.
|
||||
|
||||
Element Desktop uses a separate config (see
|
||||
https://github.com/vector-im/riot-desktop/tree/develop/element.io).
|
||||
|
||||
Deployment scripts (such as app/deploy.py) are meant to be run on the web server
|
||||
hosting the Element installation.
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"default_server_name": "matrix.org",
|
||||
"brand": "Element",
|
||||
"integrations_ui_url": "https://scalar.vector.im/",
|
||||
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar.vector.im/api",
|
||||
"https://scalar-staging.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"features": {
|
||||
},
|
||||
"piwik": {
|
||||
"url": "https://piwik.riot.im/",
|
||||
"siteId": 1,
|
||||
"policyUrl": "https://matrix.org/legal/riot-im-cookie-policy"
|
||||
},
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"matrix.org"
|
||||
]
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false,
|
||||
"https://matrix-client.matrix.org": false
|
||||
},
|
||||
"terms_and_conditions_links": [
|
||||
{
|
||||
"url": "https://riot.im/privacy",
|
||||
"text": "Privacy Policy"
|
||||
},
|
||||
{
|
||||
"url": "https://matrix.org/legal/riot-im-cookie-policy",
|
||||
"text": "Cookie Policy"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
#!/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)
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
"default_server_name": "matrix.org",
|
||||
"brand": "Element",
|
||||
"integrations_ui_url": "https://scalar-staging.vector.im/",
|
||||
"integrations_rest_url": "https://scalar-staging.vector.im/api",
|
||||
"integrations_widgets_urls": [
|
||||
"https://scalar.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar.vector.im/api",
|
||||
"https://scalar-staging.vector.im/_matrix/integrations/v1",
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"features": {
|
||||
"feature_new_spinner": "labs",
|
||||
"feature_pinning": "labs",
|
||||
"feature_custom_status": "labs",
|
||||
"feature_custom_tags": "labs",
|
||||
"feature_state_counters": "labs",
|
||||
"feature_many_integration_managers": "labs",
|
||||
"feature_mjolnir": "labs",
|
||||
"feature_dm_verification": "labs",
|
||||
"feature_bridge_state": "labs",
|
||||
"feature_presence_in_room_list": "labs",
|
||||
"feature_custom_themes": "labs"
|
||||
},
|
||||
"piwik": {
|
||||
"url": "https://piwik.riot.im/",
|
||||
"siteId": 1,
|
||||
"policyUrl": "https://matrix.org/legal/riot-im-cookie-policy"
|
||||
},
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"matrix.org"
|
||||
]
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false,
|
||||
"https://matrix-client.matrix.org": false
|
||||
},
|
||||
"terms_and_conditions_links": [
|
||||
{
|
||||
"url": "https://riot.im/privacy",
|
||||
"text": "Privacy Policy"
|
||||
},
|
||||
{
|
||||
"url": "https://matrix.org/legal/riot-im-cookie-policy",
|
||||
"text": "Cookie Policy"
|
||||
}
|
||||
]
|
||||
}
|
194
package.json
|
@ -1,169 +1,59 @@
|
|||
{
|
||||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"version": "1.7.2",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"name": "vector-web",
|
||||
"version": "0.1.2",
|
||||
"description": "Vector webapp",
|
||||
"author": "matrix.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vector-im/riot-web"
|
||||
"url": "https://github.com/vector-im/vector-web"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"files": [
|
||||
"lib",
|
||||
"res",
|
||||
"src",
|
||||
"webpack.config.js",
|
||||
"scripts",
|
||||
"docs",
|
||||
"release.sh",
|
||||
"deploy",
|
||||
"CHANGELOG.md",
|
||||
"CONTRIBUTING.rst",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"AUTHORS.rst",
|
||||
"package.json",
|
||||
"contribute.json"
|
||||
],
|
||||
"style": "bundle.css",
|
||||
"matrix-react-parent": "matrix-react-sdk",
|
||||
"scripts": {
|
||||
"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",
|
||||
"reskindex": "reskindex -h src/header",
|
||||
"reskindex:watch": "reskindex -h src/header -w",
|
||||
"reskindex:watch-react": "node scripts/yarn-sub.js matrix-react-sdk reskindex:watch",
|
||||
"clean": "rimraf lib webapp",
|
||||
"build": "yarn clean && yarn build:genfiles && yarn build:compile && yarn build:types && yarn build:bundle",
|
||||
"build-stats": "yarn clean && yarn build:genfiles && yarn build:compile && yarn build:types && yarn build:bundle-stats",
|
||||
"build:jitsi": "node scripts/build-jitsi.js",
|
||||
"build:res": "node scripts/copy-res.js",
|
||||
"build:genfiles": "yarn reskindex && yarn build:res && yarn build:jitsi",
|
||||
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||
"build:compile": "babel -d lib --verbose --extensions \".ts,.js,.tsx\" src",
|
||||
"build:bundle": "webpack --progress --bail --mode production",
|
||||
"build:bundle-stats": "webpack --progress --bail --mode production --json > webpack-stats.json",
|
||||
"build:types": "tsc --emitDeclarationOnly --jsx react",
|
||||
"dist": "scripts/package.sh",
|
||||
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,reskindex-react,res,riot-js \"yarn reskindex:watch\" \"yarn reskindex:watch-react\" \"yarn start:res\" \"yarn start:js\"",
|
||||
"start:res": "yarn build:jitsi && node scripts/copy-res.js -w",
|
||||
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --progress --mode development",
|
||||
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
|
||||
"lint:js": "eslint src",
|
||||
"lint:types": "tsc --noEmit --jsx react",
|
||||
"lint:style": "stylelint 'res/css/**/*.scss'",
|
||||
"test": "jest"
|
||||
"build:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css --no-watch",
|
||||
"build:compile": "babel --source-maps -d lib src",
|
||||
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
|
||||
"build": "npm run build:css && npm run build:compile && npm run build:bundle",
|
||||
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
|
||||
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",
|
||||
"//cache": "Note the -c 1 below due to https://code.google.com/p/chromium/issues/detail?id=508270",
|
||||
"start": "parallelshell \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
|
||||
"clean": "rimraf lib vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css*",
|
||||
"prepublish": "npm run build:css && npm run build:compile"
|
||||
},
|
||||
"dependencies": {
|
||||
"browser-request": "^0.3.3",
|
||||
"gfm.css": "^1.1.2",
|
||||
"highlight.js": "^9.13.1",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
|
||||
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.9.0",
|
||||
"react-dom": "^16.9.0",
|
||||
"sanitize-html": "^1.19.1",
|
||||
"ua-parser-js": "^0.7.19",
|
||||
"url": "^0.11.0"
|
||||
"classnames": "^2.1.2",
|
||||
"extract-text-webpack-plugin": "^0.9.1",
|
||||
"filesize": "^3.1.2",
|
||||
"flux": "~2.0.3",
|
||||
"gemini-scrollbar": "^1.3.0",
|
||||
"gfm.css": "^1.1.1",
|
||||
"highlight.js": "^9.0.0",
|
||||
"linkifyjs": "^2.0.0-beta.4",
|
||||
"matrix-js-sdk": "https://github.com/matrix-org/matrix-js-sdk.git#develop",
|
||||
"matrix-react-sdk": "https://github.com/matrix-org/matrix-react-sdk.git#develop",
|
||||
"modernizr": "^3.1.0",
|
||||
"q": "^1.4.1",
|
||||
"react": "^0.14.2",
|
||||
"react-dnd": "^2.0.2",
|
||||
"react-dnd-html5-backend": "^2.0.0",
|
||||
"react-dom": "^0.14.2",
|
||||
"react-gemini-scrollbar": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.7.5",
|
||||
"@babel/core": "^7.7.5",
|
||||
"@babel/plugin-proposal-class-properties": "^7.7.4",
|
||||
"@babel/plugin-proposal-decorators": "^7.7.4",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.7.4",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.7.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
|
||||
"@babel/plugin-transform-flow-comments": "^7.7.4",
|
||||
"@babel/plugin-transform-runtime": "^7.7.6",
|
||||
"@babel/preset-env": "^7.7.6",
|
||||
"@babel/preset-flow": "^7.7.4",
|
||||
"@babel/preset-react": "^7.7.4",
|
||||
"@babel/preset-typescript": "^7.7.4",
|
||||
"@babel/register": "^7.7.4",
|
||||
"@babel/runtime": "^7.7.6",
|
||||
"@types/flux": "^3.1.9",
|
||||
"@types/modernizr": "^3.5.3",
|
||||
"@types/node": "^12.12.41",
|
||||
"@types/react": "16.9",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"autoprefixer": "^9.7.3",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-jest": "^24.9.0",
|
||||
"babel-loader": "^8.0.6",
|
||||
"canvas": "^2.6.1",
|
||||
"chokidar": "^3.3.1",
|
||||
"concurrently": "^4.0.1",
|
||||
"cpx": "^1.3.2",
|
||||
"css-loader": "^3.3.2",
|
||||
"eslint": "7.3.1",
|
||||
"eslint-config-matrix-org": "^0.1.2",
|
||||
"eslint-plugin-babel": "^4.1.2",
|
||||
"eslint-plugin-flowtype": "^2.50.3",
|
||||
"eslint-plugin-react": "^7.11.1",
|
||||
"eslint-plugin-react-hooks": "^2.2.0",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
"fake-indexeddb": "^3.0.0",
|
||||
"file-loader": "^5.0.2",
|
||||
"fs-extra": "^0.30.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"jest": "^24.9.0",
|
||||
"jest-environment-jsdom-fourteen": "^1.0.1",
|
||||
"babel": "^5.8.23",
|
||||
"babel-core": "^5.8.25",
|
||||
"babel-loader": "^5.3.2",
|
||||
"catw": "^1.0.1",
|
||||
"css-raw-loader": "^0.1.1",
|
||||
"http-server": "^0.8.4",
|
||||
"json-loader": "^0.5.3",
|
||||
"loader-utils": "^1.2.3",
|
||||
"matrix-mock-request": "^1.2.3",
|
||||
"matrix-react-test-utils": "^0.2.2",
|
||||
"mini-css-extract-plugin": "^0.8.0",
|
||||
"minimist": "^1.2.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"modernizr": "^3.6.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
"postcss-easings": "^2.0.0",
|
||||
"postcss-extend": "^1.0.5",
|
||||
"postcss-hexrgba": "^2.0.0",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-mixins": "^6.2.3",
|
||||
"postcss-nested": "^4.2.1",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"postcss-scss": "^2.0.0",
|
||||
"postcss-simple-vars": "^5.0.2",
|
||||
"postcss-strip-inline-comments": "^0.1.5",
|
||||
"parallelshell": "^1.2.0",
|
||||
"rimraf": "^2.4.3",
|
||||
"shell-escape": "^0.2.0",
|
||||
"stylelint": "^12.0.1",
|
||||
"terser-webpack-plugin": "^2.3.0",
|
||||
"typescript": "^3.7.3",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-dev-server": "^3.9.0"
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "jest-environment-jsdom-fourteen",
|
||||
"testMatch": [
|
||||
"<rootDir>/test/**/*-test.js"
|
||||
],
|
||||
"setupFilesAfterEnv": [
|
||||
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"\\.(css|scss)$": "<rootDir>/__mocks__/cssMock.js",
|
||||
"\\.(gif|png|svg|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
|
||||
"\\$webapp/i18n/languages.json": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/languages.json",
|
||||
"^browser-request$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/browser-request.js",
|
||||
"^react$": "<rootDir>/node_modules/react",
|
||||
"^react-dom$": "<rootDir>/node_modules/react-dom",
|
||||
"^matrix-js-sdk$": "<rootDir>/node_modules/matrix-js-sdk/src",
|
||||
"^matrix-react-sdk$": "<rootDir>/node_modules/matrix-react-sdk/src"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"/node_modules/(?!matrix-js-sdk).+$",
|
||||
"/node_modules/(?!matrix-react-sdk).+$"
|
||||
]
|
||||
"source-map-loader": "^0.1.5",
|
||||
"webpack": "^1.12.6"
|
||||
}
|
||||
}
|
||||
|
|
70
release.sh
|
@ -1,70 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to perform a release of element-web.
|
||||
#
|
||||
# Requires github-changelog-generator; to install, do
|
||||
# pip install git+https://github.com/matrix-org/github-changelog-generator.git
|
||||
|
||||
set -e
|
||||
|
||||
orig_args=$@
|
||||
|
||||
# chomp any args starting with '-' as these need to go
|
||||
# through to the release script and otherwise we'll get
|
||||
# confused about what the version arg is.
|
||||
while [[ "$1" == -* ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
for i in matrix-js-sdk matrix-react-sdk
|
||||
do
|
||||
echo "Checking version of $i..."
|
||||
depver=`cat package.json | jq -r .dependencies[\"$i\"]`
|
||||
latestver=`yarn info -s $i dist-tags.next`
|
||||
if [ "$depver" != "$latestver" ]
|
||||
then
|
||||
echo "The latest version of $i is $latestver but package.json depends on $depver."
|
||||
echo -n "Type 'u' to auto-upgrade, 'c' to continue anyway, or 'a' to abort:"
|
||||
read resp
|
||||
if [ "$resp" != "u" ] && [ "$resp" != "c" ]
|
||||
then
|
||||
echo "Aborting."
|
||||
exit 1
|
||||
fi
|
||||
if [ "$resp" == "u" ]
|
||||
then
|
||||
echo "Upgrading $i to $latestver..."
|
||||
yarn add -E $i@$latestver
|
||||
git add -u
|
||||
# The `-e` flag opens the editor and gives you a chance to check
|
||||
# the upgrade for correctness.
|
||||
git commit -m "Upgrade $i to $latestver" -e
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
./node_modules/matrix-js-sdk/release.sh -u vector-im -z "$orig_args"
|
||||
|
||||
release="${1#v}"
|
||||
tag="v${release}"
|
||||
prerelease=0
|
||||
# We check if this build is a prerelease by looking to
|
||||
# see if the version has a hyphen in it. Crude,
|
||||
# but semver doesn't support postreleases so anything
|
||||
# with a hyphen is a prerelease.
|
||||
echo $release | grep -q '-' && prerelease=1
|
||||
|
||||
if [ $prerelease -eq 0 ]
|
||||
then
|
||||
# For a release, reset SDK deps back to the `develop` branch.
|
||||
for i in matrix-js-sdk matrix-react-sdk
|
||||
do
|
||||
echo "Resetting $i to develop branch..."
|
||||
yarn add github:matrix-org/$i#develop
|
||||
git add -u
|
||||
git commit -m "Reset $i back to develop branch"
|
||||
done
|
||||
git push origin develop
|
||||
fi
|
|
@ -1 +0,0 @@
|
|||
signing_id: releases@riot.im
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// import font-size variables manually, ideally this scss would get loaded by the theme which has all variables in context
|
||||
@import "../../../node_modules/matrix-react-sdk/res/css/_font-sizes.scss";
|
||||
|
||||
.mx_ErrorView {
|
||||
background: #c5e0f7;
|
||||
background: -moz-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
|
||||
background: -webkit-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
|
||||
background: linear-gradient(to bottom, #c5e0f7 0%, #ffffff 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c5e0f7', endColorstr='#ffffff',GradientType=0 );
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
color: #000;
|
||||
|
||||
.mx_ErrorView_container {
|
||||
max-width: 680px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.mx_Button {
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
font-size: $font-18px;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
min-width: 80px;
|
||||
background-color: #03B381;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
padding: 12px 22px;
|
||||
word-break: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mx_Center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mx_HomePage_header {
|
||||
color: #2E2F32;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
font-size: $font-16px;
|
||||
h1 {
|
||||
font-size: $font-32px;
|
||||
}
|
||||
h2 {
|
||||
font-size: $font-24px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.mx_HomePage_col {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.mx_HomePage_row {
|
||||
flex: 1 1 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.mx_HomePage_logo {
|
||||
margin: auto 20px auto 0;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
font-weight: 600;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.mx_Spacer {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.mx_FooterLink {
|
||||
color: #368BD6;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
* Quick-n-dirty algebraic datatypes.
|
||||
*
|
||||
* These let us handle the possibility of failure without having to constantly write code to check for it.
|
||||
* We can apply all of the transformations we need as if the data is present using `map`.
|
||||
* If there's a None, or a FetchError, or a Pending, those are left untouched.
|
||||
*
|
||||
* I've used perhaps an odd bit of terminology from scalaz in `fold`. This is basically a `switch` statement:
|
||||
* You pass it a set of functions to handle the various different states of the datatype, and if it finds the
|
||||
* function it'll call it on its value.
|
||||
*
|
||||
* It's handy to have this in functional style when dealing with React as we can dispatch different ways of rendering
|
||||
* really simply:
|
||||
* ```
|
||||
* bundleFetchStatus.fold({
|
||||
* some: (fetchStatus) => <ProgressBar fetchsStatus={fetchStatus} />,
|
||||
* }),
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
class Optional {
|
||||
static from(value) {
|
||||
return value && Some.of(value) || None;
|
||||
}
|
||||
map(f) {
|
||||
return this;
|
||||
}
|
||||
flatMap(f) {
|
||||
return this;
|
||||
}
|
||||
fold({ none }) {
|
||||
return none && none();
|
||||
}
|
||||
}
|
||||
class Some extends Optional {
|
||||
constructor(value) {
|
||||
super();
|
||||
this.value = value;
|
||||
}
|
||||
map(f) {
|
||||
return Some.of(f(this.value));
|
||||
}
|
||||
flatMap(f) {
|
||||
return f(this.value);
|
||||
}
|
||||
fold({ some }) {
|
||||
return some && some(this.value);
|
||||
}
|
||||
static of(value) {
|
||||
return new Some(value);
|
||||
}
|
||||
}
|
||||
const None = new Optional();
|
||||
|
||||
class FetchStatus {
|
||||
constructor(opt = {}) {
|
||||
this.opt = { at: Date.now(), ...opt };
|
||||
}
|
||||
map(f) {
|
||||
return this;
|
||||
}
|
||||
flatMap(f) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
class Success extends FetchStatus {
|
||||
static of(value) {
|
||||
return new Success(value);
|
||||
}
|
||||
constructor(value, opt) {
|
||||
super(opt);
|
||||
this.value = value;
|
||||
}
|
||||
map(f) {
|
||||
return new Success(f(this.value), this.opt);
|
||||
}
|
||||
flatMap(f) {
|
||||
return f(this.value, this.opt);
|
||||
}
|
||||
fold({ success }) {
|
||||
return success instanceof Function ? success(this.value, this.opt) : undefined;
|
||||
}
|
||||
}
|
||||
class Pending extends FetchStatus {
|
||||
static of(opt) {
|
||||
return new Pending(opt);
|
||||
}
|
||||
constructor(opt) {
|
||||
super(opt);
|
||||
}
|
||||
fold({ pending }) {
|
||||
return pending instanceof Function ? pending(this.opt) : undefined;
|
||||
}
|
||||
}
|
||||
class FetchError extends FetchStatus {
|
||||
static of(reason, opt) {
|
||||
return new FetchError(reason, opt);
|
||||
}
|
||||
constructor(reason, opt) {
|
||||
super(opt);
|
||||
this.reason = reason;
|
||||
}
|
||||
fold({ error }) {
|
||||
return error instanceof Function ? error(this.reason, this.opt) : undefined;
|
||||
}
|
||||
}
|
|
@ -1,336 +0,0 @@
|
|||
class StartupError extends Error {}
|
||||
|
||||
/*
|
||||
* We need to know the bundle path before we can fetch the sourcemap files. In a production environment, we can guess
|
||||
* it using this.
|
||||
*/
|
||||
async function getBundleName(baseUrl) {
|
||||
const res = await fetch(new URL("index.html", baseUrl).toString());
|
||||
if (!res.ok) {
|
||||
throw new StartupError(`Couldn't fetch index.html to prefill bundle; ${res.status} ${res.statusText}`);
|
||||
}
|
||||
const index = await res.text();
|
||||
return index.split("\n").map((line) =>
|
||||
line.match(/<script src="bundles\/([^/]+)\/bundle.js"/),
|
||||
)
|
||||
.filter((result) => result)
|
||||
.map((result) => result[1])[0];
|
||||
}
|
||||
|
||||
function validateBundle(value) {
|
||||
return value.match(/^[0-9a-f]{20}$/) ? Some.of(value) : None;
|
||||
}
|
||||
|
||||
/* A custom fetcher that abandons immediately upon getting a response.
|
||||
* The purpose of this is just to validate that the user entered a real bundle, and provide feedback.
|
||||
*/
|
||||
const bundleCache = new Map();
|
||||
function bundleSubject(baseUrl, bundle) {
|
||||
if (!bundle.match(/^[0-9a-f]{20}$/)) throw new Error("Bad input");
|
||||
if (bundleCache.has(bundle)) {
|
||||
return bundleCache.get(bundle);
|
||||
}
|
||||
const fetcher = new rxjs.BehaviorSubject(Pending.of());
|
||||
bundleCache.set(bundle, fetcher);
|
||||
|
||||
fetch(new URL(`bundles/${bundle}/bundle.js.map`, baseUrl).toString()).then((res) => {
|
||||
res.body.cancel(); /* Bail on the download immediately - it could be big! */
|
||||
const status = res.ok;
|
||||
if (status) {
|
||||
fetcher.next(Success.of());
|
||||
} else {
|
||||
fetcher.next(FetchError.of(`Failed to fetch: ${res.status} ${res.statusText}`));
|
||||
}
|
||||
});
|
||||
|
||||
return fetcher;
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a ReadableStream of bytes into an Observable of a string
|
||||
* The observable will emit a stream of Pending objects and will concatenate
|
||||
* the number of bytes received with whatever pendingContext has been supplied.
|
||||
* Finally, it will emit a Success containing the result.
|
||||
* You'd use this on a Response.body.
|
||||
*/
|
||||
function observeReadableStream(readableStream, pendingContext = {}) {
|
||||
let bytesReceived = 0;
|
||||
let buffer = "";
|
||||
const pendingSubject = new rxjs.BehaviorSubject(Pending.of({ ...pendingContext, bytesReceived }));
|
||||
const throttledPending = pendingSubject.pipe(rxjs.operators.throttleTime(100));
|
||||
const resultObservable = new rxjs.Subject();
|
||||
const reader = readableStream.getReader();
|
||||
const utf8Decoder = new TextDecoder("utf-8");
|
||||
function readNextChunk() {
|
||||
reader.read().then(({ done, value }) => {
|
||||
if (done) {
|
||||
pendingSubject.complete();
|
||||
resultObservable.next(Success.of(buffer));
|
||||
return;
|
||||
}
|
||||
bytesReceived += value.length;
|
||||
pendingSubject.next(Pending.of({...pendingContext, bytesReceived }));
|
||||
/* string concatenation is apparently the most performant way to do this */
|
||||
buffer += utf8Decoder.decode(value);
|
||||
readNextChunk();
|
||||
});
|
||||
}
|
||||
readNextChunk();
|
||||
return rxjs.concat(throttledPending, resultObservable);
|
||||
}
|
||||
|
||||
/*
|
||||
* A wrapper which converts the browser's `fetch()` mechanism into an Observable. The Observable then provides us with
|
||||
* a stream of datatype values: first, a sequence of Pending objects that keep us up to date with the download progress,
|
||||
* finally followed by either a Success or Failure object. React then just has to render each of these appropriately.
|
||||
*/
|
||||
const fetchCache = new Map();
|
||||
function fetchAsSubject(endpoint) {
|
||||
if (fetchCache.has(endpoint)) {
|
||||
// TODO: expiry/retry logic here?
|
||||
return fetchCache.get(endpoint);
|
||||
}
|
||||
const fetcher = new rxjs.BehaviorSubject(Pending.of());
|
||||
fetchCache.set(endpoint, fetcher);
|
||||
|
||||
fetch(endpoint).then((res) => {
|
||||
if (!res.ok) {
|
||||
fetcher.next(FetchError.of(`Failed to fetch endpoint ${endpoint}: ${res.status} ${res.statusText}`));
|
||||
return;
|
||||
}
|
||||
|
||||
const contentLength = res.headers.get("content-length");
|
||||
const context = contentLength ? { length: parseInt(contentLength) } : {};
|
||||
|
||||
const streamer = observeReadableStream(res.body, context, endpoint);
|
||||
streamer.subscribe((value) => {
|
||||
fetcher.next(value);
|
||||
});
|
||||
});
|
||||
return fetcher;
|
||||
}
|
||||
|
||||
/* ===================== */
|
||||
/* ==== React stuff ==== */
|
||||
/* ===================== */
|
||||
/* Rather than importing an entire build infrastructure, for now we just use React without JSX */
|
||||
const e = React.createElement;
|
||||
|
||||
/*
|
||||
* Provides user feedback given a FetchStatus object.
|
||||
*/
|
||||
function ProgressBar({ fetchStatus }) {
|
||||
return e('span', { className: "progress "},
|
||||
fetchStatus.fold({
|
||||
pending: ({ bytesReceived, length }) => {
|
||||
if (!bytesReceived) {
|
||||
return e('span', { className: "spinner" }, "\u29b5");
|
||||
}
|
||||
const kB = Math.floor(10 * bytesReceived / 1024) / 10;
|
||||
if (!length) {
|
||||
return e('span', null, `Fetching (${kB}kB)`);
|
||||
}
|
||||
const percent = Math.floor(100 * bytesReceived / length);
|
||||
return e('span', null, `Fetching (${kB}kB) ${percent}%`);
|
||||
},
|
||||
success: () => e('span', null, "\u2713"),
|
||||
error: (reason) => {
|
||||
return e('span', { className: 'error'}, `\u2717 ${reason}`);
|
||||
},
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
/*
|
||||
* The main component.
|
||||
*/
|
||||
function BundlePicker() {
|
||||
const [baseUrl, setBaseUrl] = React.useState(new URL("..", window.location).toString());
|
||||
const [bundle, setBundle] = React.useState("");
|
||||
const [file, setFile] = React.useState("");
|
||||
const [line, setLine] = React.useState("1");
|
||||
const [column, setColumn] = React.useState("");
|
||||
const [result, setResult] = React.useState(None);
|
||||
const [bundleFetchStatus, setBundleFetchStatus] = React.useState(None);
|
||||
const [fileFetchStatus, setFileFetchStatus] = React.useState(None);
|
||||
|
||||
/* On baseUrl change, try to fill in the bundle name for the user */
|
||||
React.useEffect(() => {
|
||||
console.log("DEBUG", baseUrl);
|
||||
getBundleName(baseUrl).then((name) => {
|
||||
console.log("DEBUG", name);
|
||||
if (bundle === "" && validateBundle(name) !== None) {
|
||||
setBundle(name);
|
||||
}
|
||||
}, console.log.bind(console));
|
||||
}, [baseUrl]);
|
||||
|
||||
/* ------------------------- */
|
||||
/* Follow user state changes */
|
||||
/* ------------------------- */
|
||||
const onBaseUrlChange = React.useCallback((event) => {
|
||||
const value = event.target.value;
|
||||
setBaseUrl(value);
|
||||
}, []);
|
||||
|
||||
const onBundleChange = React.useCallback((event) => {
|
||||
const value = event.target.value;
|
||||
setBundle(value);
|
||||
}, []);
|
||||
|
||||
const onFileChange = React.useCallback((event) => {
|
||||
const value = event.target.value;
|
||||
setFile(value);
|
||||
}, []);
|
||||
|
||||
const onLineChange = React.useCallback((event) => {
|
||||
const value = event.target.value;
|
||||
setLine(value);
|
||||
}, []);
|
||||
|
||||
const onColumnChange = React.useCallback((event) => {
|
||||
const value = event.target.value;
|
||||
setColumn(value);
|
||||
}, []);
|
||||
|
||||
|
||||
/* ------------------------------------------------ */
|
||||
/* Plumb data-fetching observables through to React */
|
||||
/* ------------------------------------------------ */
|
||||
|
||||
/* Whenever a valid bundle name is input, go see if it's a real bundle on the server */
|
||||
React.useEffect(() =>
|
||||
validateBundle(bundle).fold({
|
||||
some: (value) => {
|
||||
const subscription = bundleSubject(baseUrl, value)
|
||||
.pipe(rxjs.operators.map(Some.of))
|
||||
.subscribe(setBundleFetchStatus);
|
||||
return () => subscription.unsubscribe();
|
||||
},
|
||||
none: () => setBundleFetchStatus(None),
|
||||
}),
|
||||
[baseUrl, bundle]);
|
||||
|
||||
/* Whenever a valid javascript file is input, see if it corresponds to a sourcemap file and initiate a fetch
|
||||
* if so. */
|
||||
React.useEffect(() => {
|
||||
if (!file.match(/.\.js$/) || validateBundle(bundle) === None) {
|
||||
setFileFetchStatus(None);
|
||||
return;
|
||||
}
|
||||
const observable = fetchAsSubject(new URL(`bundles/${bundle}/${file}.map`, baseUrl).toString())
|
||||
.pipe(
|
||||
rxjs.operators.map((fetchStatus) => fetchStatus.flatMap(value => {
|
||||
try {
|
||||
return Success.of(JSON.parse(value));
|
||||
} catch (e) {
|
||||
return FetchError.of(e);
|
||||
}
|
||||
})),
|
||||
rxjs.operators.map(Some.of),
|
||||
);
|
||||
const subscription = observable.subscribe(setFileFetchStatus);
|
||||
return () => subscription.unsubscribe();
|
||||
}, [baseUrl, bundle, file]);
|
||||
|
||||
/*
|
||||
* Whenever we have a valid fetched sourcemap, and a valid line, attempt to find the original position from the
|
||||
* sourcemap.
|
||||
*/
|
||||
React.useEffect(() => {
|
||||
// `fold` dispatches on the datatype, like a switch statement
|
||||
fileFetchStatus.fold({
|
||||
some: (fetchStatus) =>
|
||||
// `fold` just returns null for all of the cases that aren't `Success` objects here
|
||||
fetchStatus.fold({
|
||||
success: (value) => {
|
||||
if (!line) return setResult(None);
|
||||
const pLine = parseInt(line);
|
||||
const pCol = parseInt(column);
|
||||
sourceMap.SourceMapConsumer.with(value, undefined, (consumer) =>
|
||||
consumer.originalPositionFor({ line: pLine, column: pCol }),
|
||||
).then((result) => setResult(Some.of(JSON.stringify(result))));
|
||||
},
|
||||
}),
|
||||
none: () => setResult(None),
|
||||
});
|
||||
}, [fileFetchStatus, line, column]);
|
||||
|
||||
|
||||
/* ------ */
|
||||
/* Render */
|
||||
/* ------ */
|
||||
return e('div', {},
|
||||
e('div', { className: 'inputs' },
|
||||
e('div', { className: 'baseUrl' },
|
||||
e('label', { htmlFor: 'baseUrl'}, 'Base URL'),
|
||||
e('input', {
|
||||
name: 'baseUrl',
|
||||
required: true,
|
||||
pattern: ".+",
|
||||
onChange: onBaseUrlChange,
|
||||
value: baseUrl,
|
||||
}),
|
||||
),
|
||||
e('div', { className: 'bundle' },
|
||||
e('label', { htmlFor: 'bundle'}, 'Bundle'),
|
||||
e('input', {
|
||||
name: 'bundle',
|
||||
required: true,
|
||||
pattern: "[0-9a-f]{20}",
|
||||
onChange: onBundleChange,
|
||||
value: bundle,
|
||||
}),
|
||||
bundleFetchStatus.fold({
|
||||
some: (fetchStatus) => e(ProgressBar, { fetchStatus }),
|
||||
none: () => null,
|
||||
}),
|
||||
),
|
||||
e('div', { className: 'file' },
|
||||
e('label', { htmlFor: 'file' }, 'File'),
|
||||
e('input', {
|
||||
name: 'file',
|
||||
required: true,
|
||||
pattern: ".+\\.js",
|
||||
onChange: onFileChange,
|
||||
value: file,
|
||||
}),
|
||||
fileFetchStatus.fold({
|
||||
some: (fetchStatus) => e(ProgressBar, { fetchStatus }),
|
||||
none: () => null,
|
||||
}),
|
||||
),
|
||||
e('div', { className: 'line' },
|
||||
e('label', { htmlFor: 'line' }, 'Line'),
|
||||
e('input', {
|
||||
name: 'line',
|
||||
required: true,
|
||||
pattern: "[0-9]+",
|
||||
onChange: onLineChange,
|
||||
value: line,
|
||||
}),
|
||||
),
|
||||
e('div', { className: 'column' },
|
||||
e('label', { htmlFor: 'column' }, 'Column'),
|
||||
e('input', {
|
||||
name: 'column',
|
||||
required: true,
|
||||
pattern: "[0-9]+",
|
||||
onChange: onColumnChange,
|
||||
value: column,
|
||||
}),
|
||||
),
|
||||
),
|
||||
e('div', null,
|
||||
result.fold({
|
||||
none: () => "Select a bundle, file and line",
|
||||
some: (value) => e('pre', null, value),
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/* Global stuff */
|
||||
window.Decoder = {
|
||||
BundlePicker,
|
||||
};
|
|
@ -1,79 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Rageshake decoder ring</title>
|
||||
<script crossorigin src="https://unpkg.com/source-map@0.7.3/dist/source-map.js"></script>
|
||||
<script>
|
||||
sourceMap.SourceMapConsumer.initialize({
|
||||
"lib/mappings.wasm": "https://unpkg.com/source-map@0.7.3/lib/mappings.wasm"
|
||||
});
|
||||
</script>
|
||||
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
|
||||
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
|
||||
<!--<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
|
||||
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>-->
|
||||
<script crossorigin src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"></script>
|
||||
<script src="datatypes.js"></script>
|
||||
<script src="decoder.js"></script>
|
||||
|
||||
<style>
|
||||
@keyframes spin {
|
||||
from {transform:rotate(0deg);}
|
||||
to {transform:rotate(359deg);}
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: sans-serif
|
||||
}
|
||||
|
||||
.spinner {
|
||||
animation: spin 4s infinite linear;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.progress {
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
.bundle input {
|
||||
width: 24ex;
|
||||
}
|
||||
|
||||
.valid::after {
|
||||
content: "✓"
|
||||
}
|
||||
|
||||
label {
|
||||
width: 3em;
|
||||
margin-right: 1em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input:valid {
|
||||
border: 1px solid green;
|
||||
}
|
||||
|
||||
.inputs > div {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header><h2>Decoder ring</h2></header>
|
||||
<content id="main">Waiting for javascript to run...</content>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
try {
|
||||
ReactDOM.render(React.createElement(Decoder.BundlePicker), document.getElementById("main"))
|
||||
} catch (e) {
|
||||
const n = document.createElement("div");
|
||||
n.innerText = `Error starting: ${e.message}`;
|
||||
document.getElementById("main").appendChild(n);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,85 +0,0 @@
|
|||
{
|
||||
"name": "Element",
|
||||
"short_name": "Element",
|
||||
"display": "standalone",
|
||||
"theme_color": "#76CFA6",
|
||||
"start_url": "index.html",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/vector-icons/44.png",
|
||||
"sizes": "44x44",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/1240x600.png",
|
||||
"sizes": "1240x600",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/300.png",
|
||||
"sizes": "300x300",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/150.png",
|
||||
"sizes": "150x150",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/88.png",
|
||||
"sizes": "88x88",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/24.png",
|
||||
"sizes": "24x24",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/50.png",
|
||||
"sizes": "50x50",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/620x300.png",
|
||||
"sizes": "620x300",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/1024.png",
|
||||
"sizes": "1024x1024",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/180.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/120.png",
|
||||
"sizes": "120x120",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/vector-icons/76.png",
|
||||
"sizes": "76x76",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"related_applications": [
|
||||
{
|
||||
"platform": "play",
|
||||
"url": "https://play.google.com/store/apps/details?id=im.vector.app",
|
||||
"id": "im.vector.app"
|
||||
},
|
||||
{
|
||||
"platform": "itunes",
|
||||
"url": "https://apps.apple.com/app/vector/id1083446067"
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 596 KiB |
|
@ -1,97 +0,0 @@
|
|||
<svg width="144px" height="48px" viewBox="0 0 120 40" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<desc>Download on the App Store.</desc>
|
||||
<defs />
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="App-Store-badge" fill-rule="nonzero">
|
||||
<g id="Group">
|
||||
<g id="Shape">
|
||||
<path
|
||||
d="M110.13477,0 L9.53468,0 C9.16798,0 8.80568,0 8.43995,0.002 C8.1338,0.004 7.83009,0.00981 7.521,0.0147 C6.84951368,0.0226018036 6.17960647,0.0816762599 5.5171,0.19141 C4.85552408,0.303532628 4.21467252,0.51491574 3.61622,0.81841 C3.01849941,1.12447171 2.47234502,1.52216753 1.99757,1.99707 C1.5203025,2.47063699 1.12246318,3.01801638 0.81935,3.61816 C0.515400242,4.21710912 0.304640498,4.8589383 0.19435,5.52148 C0.0830109412,6.18318491 0.0230983806,6.85252054 0.01515,7.52348 C0.00587,7.83008 0.00489,8.1377 0,8.44434 L0,31.5586 C0.00489,31.8691 0.00587,32.1699 0.01515,32.4805 C0.023100818,33.1514262 0.0830133796,33.8207284 0.19435,34.4824 C0.304335953,35.145329 0.515108158,35.7875266 0.81935,36.3867 C1.12232555,36.9849029 1.52022081,37.5300662 1.99757,38.001 C2.47054482,38.478014 3.01705224,38.8759804 3.61622,39.1797 C4.21466797,39.4840065 4.85545044,39.6966478 5.5171,39.8105 C6.1797191,39.9193547 6.84955741,39.9784532 7.521,39.9873 C7.83009,39.9941 8.1338,39.998 8.43995,39.998 C8.80567,40 9.168,40 9.53468,40 L110.13477,40 C110.49417,40 110.85937,40 111.21877,39.998 C111.52347,39.998 111.83597,39.9941 112.14067,39.9873 C112.810843,39.9789237 113.47942,39.9198215 114.14067,39.8105 C114.804454,39.6958464 115.447534,39.4832614 116.04887,39.1797 C116.647497,38.8758046 117.1935,38.4778491 117.66607,38.001 C118.142188,37.5282218 118.540932,36.9834573 118.84767,36.3867 C119.149629,35.7870908 119.358395,35.1449445 119.46677,34.4824 C119.578285,33.8206376 119.640323,33.1514843 119.65237,32.4805 C119.65627,32.1699 119.65627,31.8691 119.65627,31.5586 C119.66407,31.1953 119.66407,30.834 119.66407,30.4648 L119.66407,9.53613 C119.66407,9.16992 119.66407,8.80664 119.65627,8.44434 C119.65627,8.1377 119.65627,7.83008 119.65237,7.52344 C119.640326,6.85242244 119.578287,6.18323567 119.46677,5.52144 C119.358093,4.8592816 119.149339,4.21750328 118.84767,3.61812 C118.230394,2.41519608 117.251573,1.4360254 116.04887,0.81832 C115.447532,0.51556738 114.804383,0.30424041 114.14067,0.19132 C113.479535,0.0811027831 112.810888,0.0220077649 112.14067,0.01456 C111.83597,0.00968 111.52347,0.00382 111.21877,0.00187 C110.85937,-0.00013 110.49417,-0.00013 110.13477,-0.00013 L110.13477,0 Z"
|
||||
fill="#A6A6A6" />
|
||||
<path
|
||||
d="M8.44483,39.125 C8.14015,39.125 7.84283,39.1211 7.54054,39.1143 C6.91432177,39.1061407 6.28956717,39.051625 5.6714,38.9512 C5.0949903,38.8519282 4.53660424,38.6672645 4.01466,38.4033 C3.4975017,38.1415227 3.02581177,37.7982729 2.61766,37.3867 C2.20360033,36.9799753 1.85887673,36.508244 1.59715,35.9902 C1.33253926,35.4687891 1.14941288,34.9098996 1.05415,34.333 C0.951274358,33.7131149 0.895614374,33.0863132 0.88765,32.458 C0.88131,32.2471 0.87301,31.5449 0.87301,31.5449 L0.87301,8.44434 C0.87301,8.44434 0.88185,7.75293 0.8877,7.5498 C0.895325827,6.92248205 0.950662148,6.2966531 1.05323,5.67773 C1.14866872,5.09925008 1.33193687,4.53874887 1.59669,4.01563 C1.85745482,3.49794385 2.20026458,3.02586029 2.61183,2.61768 C3.02293283,2.20562142 3.49613161,1.86060412 4.01417,1.59521 C4.53491467,1.3320936 5.09224545,1.14873255 5.66749,1.05127 C6.28768733,0.949836139 6.91461084,0.894996084 7.543,0.88721 L8.44532,0.875 L111.21387,0.875 L112.12697,0.8877 C112.749643,0.895099198 113.370872,0.949450006 113.98537,1.05029 C114.566438,1.14897507 115.129577,1.33361553 115.65627,1.59814 C116.694088,2.13298605 117.538542,2.97916295 118.07127,4.01807 C118.331797,4.53757756 118.512239,5.09350676 118.60647,5.66699 C118.710259,6.29099138 118.768347,6.92173834 118.78027,7.5542 C118.78317,7.8374 118.78317,8.1416 118.78317,8.44434 C118.79107,8.81934 118.79107,9.17627 118.79107,9.53613 L118.79107,30.4648 C118.79107,30.8281 118.79107,31.1826 118.78317,31.54 C118.78317,31.8652 118.78317,32.1631 118.77927,32.4697 C118.767605,33.0908757 118.710486,33.7103642 118.60837,34.3232 C118.51506,34.9042612 118.33293,35.4675131 118.06837,35.9932 C117.804793,36.5056211 117.462049,36.9732662 117.05277,37.3789 C116.644251,37.7926846 116.171729,38.1379427 115.65337,38.4014 C115.128136,38.6673937 114.565826,38.8527403 113.98537,38.9512 C113.36725,39.052161 112.742435,39.1066802 112.11617,39.1143 C111.82327,39.1211 111.51657,39.125 111.21877,39.125 L110.13477,39.127 L8.44483,39.125 Z"
|
||||
fill="#000000" />
|
||||
</g>
|
||||
<g id="_Group_" transform="translate(9.000000, 8.000000)" fill="#FFFFFF">
|
||||
<g id="_Group_2">
|
||||
<g id="_Group_3">
|
||||
<path
|
||||
d="M15.76888,12.30068 C15.790737,10.6042091 16.6801229,9.03718611 18.12544,8.14862 C17.2095126,6.84051277 15.730392,6.04087835 14.13428,5.99094 C12.45504,5.81468 10.82709,6.99577 9.97138,6.99577 C9.09911,6.99577 7.78161,6.00844 6.36288,6.03763 C4.49620126,6.09793842 2.79813717,7.13352548 1.88996,8.7655 C-0.04404,12.11392 1.39855,17.03497 3.25116,19.74158 C4.17806,21.06693 5.26134,22.54738 6.67879,22.49488 C8.06585,22.43735 8.58389,21.6104 10.25819,21.6104 C11.91695,21.6104 12.40298,22.49488 13.84919,22.4615 C15.33757,22.43734 16.27532,21.13026 17.1697,19.79236 C17.8356761,18.8479997 18.3481437,17.8042759 18.68812,16.69985 C16.9203766,15.9521813 15.7709432,14.2200343 15.76888,12.30068 Z"
|
||||
id="_Path_" />
|
||||
<path
|
||||
d="M13.03725,4.21089 C13.8487766,3.23668191 14.248585,1.98450245 14.15177,0.72027 C12.9119378,0.850490487 11.7666802,1.44304968 10.94419,2.37988 C10.1320187,3.30418903 9.72057463,4.51343268 9.80048,5.74127 C11.0569368,5.75420677 12.2499161,5.19015322 13.03725,4.21089 Z"
|
||||
id="_Path_2" />
|
||||
</g>
|
||||
</g>
|
||||
<g id="Group" transform="translate(25.000000, 9.000000)">
|
||||
<path
|
||||
d="M8.30227,10.13965 L3.56887,10.13965 L2.43215,13.4961 L0.42727,13.4961 L4.91067,1.0781 L6.99367,1.0781 L11.47707,13.4961 L9.438,13.4961 L8.30227,10.13965 Z M4.0591,8.59082 L7.8111,8.59082 L5.96149,3.14355 L5.90973,3.14355 L4.0591,8.59082 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M21.15969,8.96973 C21.15969,11.78321 19.65383,13.59082 17.38137,13.59082 C16.2067553,13.6522646 15.1003324,13.0370307 14.53274,12.00682 L14.48974,12.00682 L14.48974,16.4912 L12.63134,16.4912 L12.63134,4.44238 L14.4302,4.44238 L14.4302,5.94824 L14.46438,5.94824 C15.0571883,4.92448792 16.1648043,4.30951884 17.34719,4.34765 C19.645,4.34766 21.15969,6.16406 21.15969,8.96973 Z M19.24953,8.96973 C19.24953,7.13673 18.30226,5.93164 16.85695,5.93164 C15.43703,5.93164 14.48195,7.16211 14.48195,8.96973 C14.48195,10.79395 15.43703,12.01563 16.85695,12.01563 C18.30227,12.01563 19.24953,10.81934 19.24953,8.96973 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M31.12453,8.96973 C31.12453,11.78321 29.61867,13.59082 27.34621,13.59082 C26.1715953,13.6522646 25.0651724,13.0370307 24.49758,12.00682 L24.45458,12.00682 L24.45458,16.4912 L22.59618,16.4912 L22.59618,4.44238 L24.395,4.44238 L24.395,5.94824 L24.42918,5.94824 C25.0219926,4.92448854 26.1296128,4.30952307 27.312,4.34766 C29.60988,4.34766 31.12453,6.16406 31.12453,8.96973 Z M29.21437,8.96973 C29.21437,7.13673 28.2671,5.93164 26.82179,5.93164 C25.40187,5.93164 24.44679,7.16211 24.44679,8.96973 C24.44679,10.79395 25.40187,12.01563 26.82179,12.01563 C28.26711,12.01563 29.21438,10.81934 29.21438,8.96973 L29.21437,8.96973 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M37.71047,10.03613 C37.84817,11.26758 39.04447,12.07613 40.67922,12.07613 C42.24563,12.07613 43.37258,11.26754 43.37258,10.15718 C43.37258,9.19331 42.69289,8.61618 41.08352,8.22066 L39.47415,7.83296 C37.19388,7.28218 36.13528,6.21577 36.13528,4.4853 C36.13528,2.34272 38.00247,0.87104 40.65383,0.87104 C43.27783,0.87104 45.07668,2.34272 45.13723,4.4853 L43.26123,4.4853 C43.14893,3.24604 42.12451,2.498 40.62744,2.498 C39.13037,2.498 38.10596,3.25484 38.10596,4.3564 C38.10596,5.23433 38.76026,5.75093 40.36084,6.1464 L41.729,6.48234 C44.27685,7.08488 45.33545,8.10834 45.33545,9.92472 C45.33545,12.24796 43.48486,13.70304 40.5415,13.70304 C37.78759,13.70304 35.92822,12.28214 35.8081,10.03604 L37.71047,10.03613 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M49.34621,2.2998 L49.34621,4.44238 L51.06789,4.44238 L51.06789,5.91406 L49.34621,5.91406 L49.34621,10.90527 C49.34621,11.68066 49.69094,12.04199 50.44777,12.04199 C50.6521614,12.0384259 50.8562221,12.0240726 51.0591,11.99899 L51.0591,13.46188 C50.7188283,13.5254596 50.3729708,13.5542545 50.02687,13.54782 C48.19387,13.54782 47.47902,12.85934 47.47902,11.10348 L47.47902,5.91406 L46.16262,5.91406 L46.16262,4.44238 L47.479,4.44238 L47.479,2.2998 L49.34621,2.2998 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M52.065,8.96973 C52.065,6.1211 53.74273,4.33106 56.35895,4.33106 C58.98395,4.33106 60.65387,6.12106 60.65387,8.96973 C60.65387,11.82618 58.99274,13.6084 56.35895,13.6084 C53.72609,13.6084 52.065,11.82617 52.065,8.96973 Z M58.76031,8.96973 C58.76031,7.01563 57.8648,5.86231 56.35894,5.86231 C54.85308,5.86231 53.95855,7.02442 53.95855,8.96973 C53.95855,10.93164 54.85308,12.07618 56.35894,12.07618 C57.8648,12.07618 58.76027,10.93164 58.76027,8.96973 L58.76031,8.96973 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M62.18606,4.44238 L63.95852,4.44238 L63.95852,5.98338 L64.00152,5.98338 C64.248696,4.99136841 65.1576526,4.30863156 66.17925,4.34764 C66.393414,4.34689223 66.6069872,4.37015075 66.81597,4.41698 L66.81597,6.15526 C66.545601,6.07264332 66.2635596,6.03471129 65.98097,6.04296 C65.4346182,6.02079544 64.9058709,6.23853473 64.5335615,6.63900597 C64.161252,7.03947722 63.9825766,7.58267074 64.04445,8.12596 L64.04445,13.49608 L62.18605,13.49608 L62.18606,4.44238 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M75.3843,10.83691 C75.1343,12.48046 73.53371,13.60839 71.48586,13.60839 C68.85207,13.60839 67.21731,11.84374 67.21731,9.01269 C67.21731,6.17285 68.86086,4.33105 71.40774,4.33105 C73.91262,4.33105 75.48782,6.05175 75.48782,8.79687 L75.48782,9.43359 L69.09329,9.43359 L69.09329,9.54589 C69.0335874,10.2199216 69.2663316,10.8871194 69.7323199,11.3777699 C70.1983083,11.8684204 70.8526275,12.1352333 71.52884,12.11034 C72.4306823,12.1948396 73.2809431,11.6769777 73.61966,10.8369 L75.3843,10.83691 Z M69.1020624,8.13477 L73.62844,8.13476 C73.6621655,7.52909749 73.4416965,6.93682308 73.0201501,6.50063155 C72.5986036,6.06444001 72.0142008,5.82388041 71.40774,5.83691 C70.7964818,5.83326223 70.2090907,6.07393463 69.7761255,6.50543324 C69.3431603,6.93693186 69.1004963,7.52350292 69.1020624,8.13477 Z"
|
||||
id="Shape" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="_Group_4" transform="translate(35.000000, 8.000000)" fill="#FFFFFF">
|
||||
<g id="Group">
|
||||
<path
|
||||
d="M2.82619,0.731 C3.61513656,0.674384181 4.38789226,0.974547428 4.93176129,1.54887182 C5.47563032,2.12319621 5.73328587,2.91114479 5.63381,3.69584 C5.63381,5.60209 4.60354,6.69784 2.82619,6.69784 L0.67092,6.69784 L0.67092,0.731 L2.82619,0.731 Z M1.59767,5.854 L2.72267,5.854 C3.28649194,5.88770201 3.83548652,5.66555901 4.21721851,5.24925179 C4.5989505,4.83294457 4.77277961,4.26679442 4.69044,3.708 C4.76678901,3.15152453 4.59045658,2.59004622 4.20967108,2.17713398 C3.82888557,1.76422175 3.28349567,1.5430863 2.72267,1.57421 L1.59767,1.57421 L1.59767,5.854 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M6.68068,4.44434 C6.60346713,3.63722505 6.99048366,2.85611193 7.67941593,2.42859737 C8.36834819,2.0010828 9.24008181,2.0010828 9.92901407,2.42859737 C10.6179463,2.85611193 11.0049629,3.63722505 10.92775,4.44434 C11.0064319,5.25232226 10.6197687,6.03495038 9.93022554,6.4633853 C9.24068243,6.89182022 8.36774757,6.89182022 7.67820446,6.4633853 C6.98866134,6.03495038 6.60199806,5.25232226 6.68068,4.44434 Z M10.01368,4.44434 C10.01368,3.46827 9.5752,2.89747 8.80568,2.89747 C8.03322,2.89747 7.59868,3.46827 7.59868,4.44435 C7.59868,5.42824 8.03325,5.99464 8.80568,5.99464 C9.57522,5.99463 10.01369,5.42432 10.01369,4.44434 L10.01368,4.44434 Z"
|
||||
id="Shape" />
|
||||
<polygon id="Shape"
|
||||
points="16.57326 6.69775 15.65139 6.69775 14.72073 3.38134 14.65042 3.38134 13.72366 6.69775 12.81057 6.69775 11.56936 2.19482 12.47073 2.19482 13.27737 5.63082 13.34378 5.63082 14.26956 2.19482 15.1221 2.19482 16.04788 5.63082 16.11819 5.63082 16.92092 2.19482 17.80959 2.19482" />
|
||||
<path
|
||||
d="M18.85354,2.19482 L19.709,2.19482 L19.709,2.91015 L19.77541,2.91015 C20.0063449,2.38347794 20.5459729,2.06130747 21.11916,2.1079 C21.5629768,2.07453177 21.9978859,2.2447899 22.3010908,2.57060207 C22.6042957,2.89641424 22.7428931,3.34242376 22.67775,3.7827 L22.67775,6.6977 L21.78908,6.6977 L21.78908,4.00586 C21.78908,3.28223 21.47463,2.92236 20.8174,2.92236 C20.5163658,2.90833912 20.2242202,3.02648257 20.0175546,3.24581678 C19.810889,3.465151 19.710315,3.76380101 19.7422,4.06347 L19.7422,6.69775 L18.85353,6.69775 L18.85354,2.19482 Z"
|
||||
id="Shape" />
|
||||
<polygon id="Shape"
|
||||
points="24.09377 0.437 24.98244 0.437 24.98244 6.69774 24.09377 6.69774" />
|
||||
<path
|
||||
d="M26.21779,4.44434 C26.1406364,3.63717225 26.527714,2.85603936 27.2166974,2.4285182 C27.9056808,2.00099704 28.7774592,2.00099704 29.4664426,2.4285182 C30.155426,2.85603936 30.5425036,3.63717225 30.46535,4.44434 C30.543932,5.25235119 30.1571979,6.03495719 29.4676205,6.46337324 C28.7780432,6.89178929 27.9050968,6.89178929 27.2155195,6.46337324 C26.5259421,6.03495719 26.139208,5.25235119 26.21779,4.44434 Z M29.55079,4.44434 C29.55079,3.46827 29.11231,2.89747 28.34279,2.89747 C27.57033,2.89747 27.13579,3.46827 27.13579,4.44435 C27.13579,5.42824 27.57036,5.99464 28.34279,5.99464 C29.11232,5.99463 29.5508,5.42432 29.5508,4.44434 L29.55079,4.44434 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M31.4009,5.42432 C31.4009,4.61377 32.00442,4.14649 33.0757,4.08008 L34.29543,4.00977 L34.29543,3.6211 C34.29543,3.14551 33.98098,2.87696 33.37356,2.87696 C32.87747,2.87696 32.53372,3.05909 32.43508,3.37745 L31.57473,3.37745 C31.66555,2.60401 32.39309,2.10792 33.41457,2.10792 C34.54348,2.10792 35.1802,2.66992 35.1802,3.6211 L35.1802,6.69776 L34.32473,6.69776 L34.32473,6.06495 L34.25442,6.06495 C33.9638686,6.52707633 33.4471736,6.79716323 32.90188,6.77195 C32.5196161,6.81171181 32.1383711,6.68791066 31.8523958,6.43115244 C31.5664205,6.17439423 31.4024061,5.80864331 31.4009,5.42432 Z M34.29543,5.03955 L34.29543,4.66309 L33.19582,4.7334 C32.5757,4.7749 32.29445,4.98584 32.29445,5.38281 C32.29445,5.78808 32.64601,6.02392 33.12945,6.02392 C33.4156361,6.05288986 33.7013264,5.96447505 33.9211204,5.77891559 C34.1409144,5.59335613 34.2759916,5.32654106 34.29543,5.03955 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M36.34816,4.44434 C36.34816,3.02149 37.07961,2.12012 38.2173,2.12012 C38.7917768,2.09365013 39.3298275,2.40147287 39.59816,2.91012 L39.66457,2.91012 L39.66457,0.437 L40.55324,0.437 L40.55324,6.69774 L39.70168,6.69774 L39.70168,5.98631 L39.63137,5.98631 C39.3427542,6.49073698 38.7980745,6.79335648 38.21731,6.77195 C37.0718,6.772 36.34816,5.87061 36.34816,4.44434 Z M37.26616,4.44434 C37.26616,5.39942 37.71636,5.97413 38.46929,5.97413 C39.21829,5.97413 39.6812,5.39113 39.6812,4.44825 C39.6812,3.50977 39.21343,2.91846 38.46929,2.91846 C37.72121,2.91846 37.26613,3.49707 37.26613,4.44434 L37.26616,4.44434 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M44.23,4.44434 C44.1527871,3.63722505 44.5398037,2.85611193 45.2287359,2.42859737 C45.9176682,2.0010828 46.7894018,2.0010828 47.4783341,2.42859737 C48.1672663,2.85611193 48.5542829,3.63722505 48.47707,4.44434 C48.5557519,5.25232226 48.1690887,6.03495038 47.4795455,6.4633853 C46.7900024,6.89182022 45.9170676,6.89182022 45.2275245,6.4633853 C44.5379813,6.03495038 44.1513181,5.25232226 44.23,4.44434 Z M47.563,4.44434 C47.563,3.46827 47.12452,2.89747 46.355,2.89747 C45.58254,2.89747 45.148,3.46827 45.148,4.44435 C45.148,5.42824 45.58257,5.99464 46.355,5.99464 C47.12453,5.99463 47.563,5.42432 47.563,4.44434 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M49.66945,2.19482 L50.52492,2.19482 L50.52492,2.91015 L50.59133,2.91015 C50.8222649,2.38347794 51.3618929,2.06130747 51.93508,2.1079 C52.3788968,2.07453177 52.8138059,2.2447899 53.1170108,2.57060207 C53.4202157,2.89641424 53.5588131,3.34242376 53.49367,3.7827 L53.49367,6.6977 L52.605,6.6977 L52.605,4.00586 C52.605,3.28223 52.29055,2.92236 51.63332,2.92236 C51.3322858,2.90833912 51.0401402,3.02648257 50.8334746,3.24581678 C50.626809,3.465151 50.526235,3.76380101 50.55812,4.06347 L50.55812,6.69775 L49.66945,6.69775 L49.66945,2.19482 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M58.51516,1.07373 L58.51516,2.21533 L59.49075,2.21533 L59.49075,2.96387 L58.51516,2.96387 L58.51516,5.2793 C58.51516,5.75098 58.7095,5.95752 59.15188,5.95752 C59.2651356,5.95715754 59.3782775,5.95030966 59.49075,5.93701 L59.49075,6.67724 C59.3311595,6.70579072 59.1694656,6.72098004 59.00735,6.72265 C58.01907,6.72265 57.62551,6.37499 57.62551,5.50683 L57.62551,2.96383 L56.91067,2.96383 L56.91067,2.21529 L57.62551,2.21529 L57.62551,1.07373 L58.51516,1.07373 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M60.70461,0.437 L61.58547,0.437 L61.58547,2.91845 L61.65578,2.91845 C61.8978078,2.38716856 62.4468801,2.06458754 63.02878,2.11181 C63.4700766,2.08779728 63.8990983,2.26180371 64.1989893,2.58643385 C64.4988802,2.91106399 64.6384049,3.35250564 64.57956,3.79052 L64.57956,6.69775 L63.69,6.69775 L63.69,4.00975 C63.69,3.29051 63.355,2.92625 62.72711,2.92625 C62.417939,2.90089367 62.1133391,3.01329096 61.8947423,3.2333935 C61.6761456,3.45349605 61.5658419,3.75886031 61.59332,4.06785 L61.59332,6.69773 L60.70465,6.69773 L60.70461,0.437 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M69.76125,5.48193 C69.512057,6.33130948 68.6900989,6.88010304 67.81008,6.78466 C67.2096439,6.8005102 66.6325914,6.5516307 66.2320282,6.10405516 C65.8314651,5.65647963 65.6478864,5.05545594 65.73,4.46045 C65.6500674,3.86379048 65.8329582,3.26180373 66.2312908,2.81044696 C66.6296234,2.35909018 67.204202,2.10277675 67.80617,2.10791 C69.0591,2.10791 69.81496,2.96391 69.81496,4.37791 L69.81496,4.688 L66.63527,4.688 L66.63527,4.7378 C66.607132,5.07194014 66.7212507,5.40244775 66.9495608,5.6480407 C67.1778709,5.89363365 67.4991879,6.03152392 67.83449,6.0278 C68.2692619,6.07999468 68.6924825,5.86433304 68.90578,5.4819 L69.76125,5.48193 Z M66.63525,4.03076 L68.90966,4.03076 C68.9323129,3.72516044 68.8248585,3.42420507 68.6137769,3.20205909 C68.4026954,2.97991311 68.1076175,2.85723623 67.80126,2.86426 C67.490752,2.86035891 67.191828,2.98202124 66.9722963,3.20164888 C66.7527647,3.42127653 66.6312331,3.72025374 66.63527,4.03076 L66.63525,4.03076 Z"
|
||||
id="Shape" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 20 KiB |
|
@ -1,135 +0,0 @@
|
|||
<svg width="164px" height="48px" viewBox="0 0 157 46" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<desc>Get it on F-Droid.</desc>
|
||||
<defs>
|
||||
<radialGradient cx="0.55528181%" cy="0.456156968%" fx="0.55528181%"
|
||||
fy="0.456156968%"
|
||||
r="99.5501799%"
|
||||
gradientTransform="translate(0.005553,0.004562),scale(0.985441,1.000000),rotate(90.000001),translate(-0.005553,-0.004562)"
|
||||
id="radialGradient-1">
|
||||
<stop stop-color="#FFFFFF" stop-opacity="0.098039" offset="0%" />
|
||||
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="F-Droid-badge">
|
||||
<rect id="Rectangle-path" fill="#000000" fill-rule="nonzero" x="0" y="0"
|
||||
width="157"
|
||||
height="46" rx="5.6097561" />
|
||||
<g id="Group" transform="translate(49.623214, 5.890244)" fill="#FFFFFF"
|
||||
fill-rule="nonzero">
|
||||
<path
|
||||
d="M5.68003571,6.29863415 L5.68003571,4.42449878 L4.13843589,4.42449878 L4.13843589,3.64866951 L6.61432589,3.64866951 L6.61432589,6.64455976 C6.24995506,6.90316951 5.84820327,7.09946423 5.40907054,7.2334439 C4.96995649,7.36430642 4.50125542,7.42973768 4.00296732,7.42973768 C2.91295744,7.42973768 2.0596344,7.1119263 1.44299821,6.47630354 C0.829483333,5.83757671 0.522725893,4.94958037 0.522725893,3.81231451 C0.522725893,2.67194459 0.829483333,1.78394825 1.44299821,1.14832549 C2.0596344,0.509598659 2.91295744,0.190235244 4.00296732,0.190235244 C4.45765054,0.190235244 4.88898,0.24631878 5.29695571,0.358485854 C5.70805274,0.470652927 6.08644143,0.635785447 6.43212179,0.853883415 L6.43212179,1.85873098 C6.08332012,1.56274154 5.71271601,1.33995943 5.32030946,1.19038463 C4.92790292,1.04082854 4.51525458,0.966050488 4.08236446,0.966050488 C3.22903208,0.966050488 2.58748149,1.20440902 2.15771268,1.6811261 C1.73104649,2.15784317 1.51771339,2.86824398 1.51771339,3.81232854 C1.51771339,4.75329033 1.73104649,5.46212976 2.15771268,5.93884683 C2.58748149,6.4155639 3.22903208,6.65392244 4.08236446,6.65392244 C4.41559696,6.65392244 4.71301851,6.6258802 4.97462911,6.56979573 C5.2362397,6.51059598 5.47136589,6.4202387 5.68000768,6.2987239 L5.68003571,6.29863415 Z"
|
||||
id="Shape" />
|
||||
<polygon id="Shape"
|
||||
points="8.34342857 0.316390244 12.7531661 0.316390244 12.7531661 1.1109 9.28683036 1.1109 9.28683036 3.17666463 12.6082214 3.17666463 12.6082214 3.97117439 9.28683036 3.97117439 9.28683036 6.49963171 12.8372732 6.49963171 12.8372732 7.29414146 8.34342857 7.29414146 8.34342857 0.316446341" />
|
||||
<polygon id="Shape"
|
||||
points="13.4319107 0.316390244 19.3320268 0.316390244 19.3320268 1.1109 16.8561368 1.1109 16.8561368 7.29425366 15.9078287 7.29425366 15.9078287 1.1109 13.4319387 1.1109 13.4319387 0.316390244" />
|
||||
<polygon id="Shape"
|
||||
points="23.2920714 0.316390244 24.2356975 0.316390244 24.2356975 7.29408537 23.2920714 7.29408537" />
|
||||
<polygon id="Shape"
|
||||
points="25.1480357 0.316390244 31.0481518 0.316390244 31.0481518 1.1109 28.5722618 1.1109 28.5722618 7.29425366 27.6239537 7.29425366 27.6239537 1.1109 25.1480637 1.1109 25.1480637 0.316390244" />
|
||||
<path
|
||||
d="M37.8398036,0.956463415 C37.1546481,0.956463415 36.6096432,1.21195976 36.2047887,1.72295244 C35.803037,2.23394512 35.6021611,2.93032154 35.6021611,3.81208171 C35.6021611,4.69071911 35.803037,5.38553415 36.2047887,5.89652683 C36.6096432,6.40751951 37.1546481,6.66301585 37.8398036,6.66301585 C38.524959,6.66301585 39.066852,6.40751951 39.4654825,5.89652683 C39.8672343,5.38553415 40.0681102,4.69071911 40.0681102,3.81208171 C40.0681102,2.93032154 39.8672343,2.23394512 39.4654825,1.72295244 C39.0673754,1.21209065 38.5253515,0.956659756 37.8394111,0.956659756 L37.8398036,0.956463415 Z M37.8398036,0.18997439 C38.817708,0.18997439 39.5993998,0.518687398 40.1848789,1.17611341 C40.7703768,1.83043537 41.0631257,2.70908211 41.0631257,3.81205366 C41.0631257,4.91192114 40.7703768,5.79056789 40.1848789,6.4479939 C39.5993811,7.10231585 38.8176893,7.42947683 37.8398036,7.42947683 C36.8587965,7.42947683 36.0739835,7.10231585 35.4853643,6.4479939 C34.8998664,5.79369065 34.6071175,4.9150439 34.6071175,3.81205366 C34.6071175,2.70906341 34.8998664,1.83041667 35.4853643,1.17611341 C36.0739648,0.518687398 36.8587779,0.18997439 37.8398036,0.18997439 Z"
|
||||
id="Shape" />
|
||||
<polygon id="Shape"
|
||||
points="42.5385893 0.316390244 43.8092239 0.316390244 46.9018436 6.15390244 46.9018436 0.316390244 47.817462 0.316390244 47.817462 7.29408537 46.5468273 7.29408537 43.4542077 1.45657317 43.4542077 7.29408537 42.5385893 7.29408537" />
|
||||
<path
|
||||
d="M14.4888571,14.6357134 L14.4888571,19.7020244 L13.8851641,19.7020244 C13.7044646,18.9049341 13.5319795,18.3009504 13.3677089,17.8900732 C13.2034365,17.4791959 12.981674,17.1176285 12.7024214,16.8053707 C11.9303365,15.9260976 10.3984651,15.486461 8.10680714,15.486461 C7.46615369,15.486461 7.03493637,15.5686346 6.81315518,15.7329817 C6.5995978,15.8891143 6.49281911,16.201372 6.49281911,16.6697549 L6.49281911,22.5369988 C7.74949196,22.5369988 8.64887768,22.269937 9.19097625,21.7358134 C9.73307482,21.2016898 10.1191173,20.2114744 10.3491036,18.7651671 L10.97744,18.7651671 L10.97744,27.3071427 L10.3491036,27.3071427 C10.1684059,25.8444362 9.80290431,24.8336516 9.25259875,24.274789 C8.70229506,23.7077923 7.78236851,23.4119618 6.49281911,23.3872976 L6.49281911,29.2668829 C6.49281911,29.9653724 6.66530417,30.4296545 7.01027429,30.6597293 C7.3552444,30.8815951 8.10678845,31.0171829 9.26490643,31.0664927 L9.26490643,31.695122 L0.184699286,31.695122 L0.184699286,31.0664927 C1.12105476,30.9678844 1.72475714,30.8076417 1.99580643,30.5857646 C2.26685571,30.3638988 2.40238036,29.9242622 2.40238036,29.2668549 L2.40238036,17.051611 C2.40238036,16.4024313 2.25042679,15.9545858 1.94651964,15.7080744 C1.6426125,15.4615443 1.05533905,15.3136337 0.184699286,15.2643427 L0.184699286,14.6357134 L14.4888571,14.6357134 Z"
|
||||
id="Shape" />
|
||||
<polygon id="Shape"
|
||||
points="21.6099286 24.4473171 21.6099286 27.380939 15.4743125 27.380939 15.4743125 24.4473171" />
|
||||
<path
|
||||
d="M25.1956964,29.4035366 L25.1956964,16.9540854 C25.1956964,16.378861 25.0478548,15.9720976 24.7521714,15.7337951 C24.4564881,15.4954927 23.9061751,15.3393638 23.1012323,15.2654085 L23.1012323,14.6367793 L30.7891859,14.6367793 C33.7050871,14.6367793 35.9926145,15.3804553 37.651768,16.8678073 C39.3191267,18.3469504 40.1528061,20.3848813 40.1528061,22.9816 C40.1528061,25.5948114 39.3191267,27.7025837 37.651768,29.3049171 C35.9844093,30.8990976 33.7913623,31.6961878 31.072627,31.6961878 L23.1012323,31.6961878 L23.1012323,31.0675585 C23.8322355,31.0429074 24.3620171,30.8991013 24.690577,30.6361402 C25.027342,30.3731923 25.1957245,29.9623244 25.1957245,29.4035366 L25.1956964,29.4035366 Z M29.2737714,16.374878 L29.2737714,29.3541707 C29.2737714,29.9211675 29.3764382,30.3073898 29.5817718,30.5128378 C29.7871054,30.7100581 30.1731478,30.8086683 30.7398991,30.8086683 C32.3497659,30.8086683 33.585954,30.2293394 34.4484634,29.0706817 C34.8591492,28.503685 35.179476,27.7107085 35.4094436,26.6917524 C35.647635,25.6727963 35.7667307,24.5634671 35.7667307,23.3637646 C35.7667307,21.194285 35.4217606,19.4275858 34.7318204,18.0636671 C33.8776095,16.3462215 32.5552583,15.4874988 30.7647668,15.4874988 C29.7709194,15.4874988 29.2739957,15.7833293 29.2739957,16.3749902 L29.2737714,16.374878 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M46.4748036,20.0576829 L46.4748036,22.1284683 C47.0661889,21.2820683 47.6247164,20.6739801 48.1503861,20.3042037 C48.6842608,19.9344272 49.2633198,19.749539 49.887563,19.749539 C50.4789484,19.749539 50.9676576,19.9385411 51.3536907,20.3165451 C51.7397238,20.6863215 51.9327404,21.1547175 51.9327404,21.7217329 C51.9327404,22.2147744 51.7848987,22.6215378 51.4892154,22.9420232 C51.193532,23.2542809 50.8116015,23.4104098 50.3434237,23.4104098 C50.0148826,23.4104098 49.7397307,23.3446709 49.5179682,23.2131932 C49.2962057,23.0817136 49.0662287,22.8475156 48.8280373,22.5105993 C48.556988,22.1161586 48.3228992,21.9189383 48.1257707,21.9189383 C47.7068798,21.9189383 47.3454807,22.1572407 47.0415736,22.6338456 C46.7376664,23.1022415 46.5857129,23.6651338 46.5857129,24.3225224 L46.5857129,29.0927785 C46.5857129,29.8734322 46.6965941,30.3911285 46.9183566,30.6458676 C47.1483429,30.8923976 47.6493692,31.0403082 48.4214354,31.0895993 L48.4214354,31.6935737 L41.706879,31.6935737 L41.7068818,31.0895993 C42.2654093,30.990991 42.6309109,30.8430804 42.8033866,30.6458676 C42.9840843,30.4486472 43.0744331,30.0911936 43.0744331,29.5735066 L43.0744331,22.1532017 C43.0744331,21.6437237 42.9799808,21.28627 42.7910761,21.0808407 C42.6103766,20.8754115 42.2489776,20.7357192 41.706879,20.6617639 L41.706879,20.0577895 L46.4749129,20.0577895 L46.4748036,20.0576829 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M58.2021429,19.7519512 C59.8284386,19.7519512 61.1795731,20.3394984 62.2555464,21.5145927 C63.3397436,22.6814593 63.8818421,24.1482236 63.8818421,25.9148854 C63.8818421,27.673413 63.3397436,29.1361569 62.2555464,30.3031171 C61.1795731,31.4699837 59.8284386,32.0534171 58.2021429,32.0534171 C56.5512131,32.0534171 55.1877429,31.4699837 54.1117321,30.3031171 C53.0357588,29.1362504 52.4977721,27.6489171 52.4977721,25.8411171 C52.4977721,24.1236715 53.0480852,22.6814967 54.1487113,21.5145927 C55.2493373,20.3394984 56.6004718,19.7519512 58.2021148,19.7519512 L58.2021429,19.7519512 Z M58.2267862,20.5408232 C57.6929115,20.5408232 57.282235,20.7174931 56.9947568,21.0708329 C56.7155024,21.4159638 56.5142714,21.9952927 56.3910637,22.8088195 C56.2678599,23.6223463 56.2062579,24.7851553 56.2062579,26.2972463 C56.2062579,28.1461659 56.349997,29.4363163 56.6374752,30.1676976 C56.9331586,30.8990415 57.4547257,31.2647134 58.2021765,31.2647134 C58.9331797,31.2647134 59.4424204,30.8826049 59.7298986,30.1183878 C60.025582,29.3541707 60.1734236,28.0024065 60.1734236,26.0630951 C60.1734236,23.9923472 60.0296845,22.5542862 59.7422063,21.7489122 C59.4629519,20.943613 58.9578138,20.5409634 58.2267919,20.5409634 L58.2267862,20.5408232 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M69.7332321,20.0576829 L69.7332321,29.6472805 C69.7332321,30.1238854 69.8194747,30.4690163 69.9919597,30.6826732 C70.1644448,30.8881024 70.4724545,31.0236902 70.9159888,31.0894366 L70.9159888,31.693411 L64.891383,31.693411 L64.8913942,31.0894366 C65.4663506,30.9497406 65.8318522,30.7936117 65.987899,30.62105 C66.1439589,30.4402663 66.2219888,30.0910215 66.2219888,29.5733159 L66.2219888,22.153011 C66.2219888,21.6353053 66.1398526,21.2860606 65.9755801,21.1052768 C65.8113077,20.9244931 65.4499086,20.7765825 64.891383,20.6615451 L64.891383,20.0575707 L69.7334312,20.0575707 L69.7332321,20.0576829 Z M66.5792143,14.8313537 C66.9652474,14.4451407 67.4293132,14.2520341 67.9714118,14.2520341 C68.5135104,14.2520341 68.9693617,14.4451407 69.3389659,14.8313537 C69.7167939,15.2175667 69.9057079,15.6818488 69.9057079,16.2242 C69.9057079,16.7747602 69.7167939,17.2349378 69.3389659,17.6047329 C68.9693617,17.9745093 68.5052959,18.1593976 67.9467684,18.1593976 C67.3882409,18.1593976 66.9241751,17.9745093 66.5545709,17.6047329 C66.1849667,17.2349565 66.0001646,16.7665606 66.0001646,16.1995451 C66.0001646,15.6654215 66.1931812,15.2093577 66.5792143,14.8313537 Z"
|
||||
id="Shape" />
|
||||
<path
|
||||
d="M80.0335536,32.0289024 L80.0335536,30.3895354 C79.4421682,31.0140508 78.9041815,31.4495736 78.4195936,31.6961037 C77.9349869,31.9344061 77.3559279,32.0535573 76.6824166,32.0535573 C75.360028,32.0535573 74.2676632,31.4947695 73.405322,30.3771939 C72.542906,29.2514093 72.111698,27.8298037 72.111698,26.1123768 C72.111698,24.2881028 72.5716613,22.7719728 73.4915879,21.5639866 C74.4115144,20.3560191 75.5655579,19.7520354 76.9537182,19.7520354 C77.5286746,19.7520354 78.0379154,19.8670821 78.4814404,20.0971756 C78.9249654,20.3272691 79.4177771,20.7340325 79.9598757,21.3174659 L79.9598757,16.6953073 C79.9598757,16.1200829 79.8489945,15.7502972 79.627232,15.58595 C79.4136746,15.421601 78.883893,15.3065542 78.0378873,15.2408098 L78.0378873,14.6368354 L83.4712087,14.6368354 L83.4712087,29.1447866 C83.4712087,29.6789102 83.5738755,30.0486959 83.7792091,30.2541439 C83.9927665,30.4595732 84.3870234,30.5787244 84.9619798,30.6115976 L84.9619798,31.1909171 L83.3972786,31.3881337 C82.1734636,31.5196133 81.0523154,31.7332702 80.0338339,32.0291044 L80.0335536,32.0289024 Z M79.9596318,28.8734146 L79.9596318,22.734939 C79.7789323,22.2583341 79.507883,21.8803301 79.1464839,21.6009268 C78.7933087,21.3133146 78.4072663,21.1695085 77.9883566,21.1695085 C77.2573534,21.1695085 76.7152548,21.5557309 76.3620609,22.3281756 C76.0170908,23.0923927 75.8446057,24.2880187 75.8446057,25.9150537 C75.8446057,27.5174431 76.0047738,28.7048415 76.3251098,29.4772488 C76.6454459,30.2496935 77.1423696,30.6359159 77.8158809,30.6359159 C78.3744084,30.6359159 78.90419,30.3483037 79.4052256,29.7730793 C79.553071,29.6087302 79.6803811,29.4361648 79.7871561,29.2553829 C79.9021474,29.0746011 79.959643,28.9472315 79.959643,28.8732744 L79.9596318,28.8734146 Z"
|
||||
id="Shape" />
|
||||
</g>
|
||||
<path d="M40.46675,6.67476829 L37.3323571,10.7342683" id="Shape"
|
||||
stroke="#769616"
|
||||
stroke-width="1.84532927" fill="#8AB000" fill-rule="nonzero"
|
||||
stroke-linecap="round" />
|
||||
<path
|
||||
d="M40.4527321,5.75 C40.7872823,5.75886341 41.014708,5.88950341 41.1763059,6.08111585 C39.6808809,7.85918415 39.428952,8.14166341 37.3875595,10.6732622 C36.6353612,11.6468354 35.8517911,11.1436683 36.6039893,10.1700951 L39.7395036,6.11031463 C39.9084496,5.88474354 40.1711695,5.75748902 40.4527882,5.7498878 L40.4527321,5.75 Z"
|
||||
id="Shape" fill-opacity="0.29804" fill="#FFFFFF"
|
||||
fill-rule="nonzero" />
|
||||
<path
|
||||
d="M41.1816607,6.09023171 C41.2730684,6.19940037 41.5956921,6.68413659 41.1982579,7.23888537 L38.0627436,11.2986659 C37.3105454,12.272239 37.2143829,10.8467159 37.2143829,10.8467159 C37.2143829,10.8467159 39.9695927,7.51788659 41.1817168,6.09020366 L41.1816607,6.09023171 Z"
|
||||
id="Shape" fill-opacity="0.2" fill="#263238" fill-rule="nonzero" />
|
||||
<path
|
||||
d="M40.6545893,5.92334146 C40.9778691,5.92334146 41.3627714,6.02785963 41.2626839,6.51281463 C41.1862782,6.88305854 37.8241036,10.9964122 37.8241036,10.9964122 C37.0719054,11.9699854 35.9844561,11.4955963 36.7366543,10.5221634 L39.8606739,6.48257805 C40.0526737,6.26852098 40.3096379,5.93371951 40.6546454,5.92322927 L40.6545893,5.92334146 Z"
|
||||
id="Shape" fill="#8AB000" fill-rule="nonzero" />
|
||||
<path d="M8.87470536,6.67476829 L12.0105,10.7342683" id="Shape"
|
||||
stroke="#769616"
|
||||
stroke-width="1.84532927" fill="#8AB000" fill-rule="nonzero"
|
||||
stroke-linecap="round" />
|
||||
<path
|
||||
d="M8.89124643,5.75 C8.55669625,5.75886341 8.32927054,5.88950341 8.16767268,6.08111585 C9.66309768,7.85918415 9.91502661,8.14166341 11.9564191,10.6732622 C12.7086173,11.6468354 13.4921875,11.1436683 12.7399893,10.1700951 L9.604475,6.11087561 C9.43552898,5.88530451 9.17280911,5.75805 8.89119036,5.75044878 L8.89124643,5.75 Z"
|
||||
id="Shape" fill-opacity="0.29804" fill="#FFFFFF"
|
||||
fill-rule="nonzero" />
|
||||
<path
|
||||
d="M8.16147679,6.09023171 C8.07006914,6.19940037 7.74744536,6.68413659 8.14487964,7.23888537 L11.2803939,11.2986659 C12.0325921,12.272239 12.1287546,10.8467159 12.1287546,10.8467159 C12.1287546,10.8467159 9.37354482,7.51788659 8.16142071,6.09020366 L8.16147679,6.09023171 Z"
|
||||
id="Shape" fill-opacity="0.2" fill="#263238" fill-rule="nonzero" />
|
||||
<path
|
||||
d="M8.68966964,5.92334146 C8.36638982,5.92334146 7.9814875,6.02785963 8.081575,6.51281463 C8.15798073,6.88305854 11.5201554,10.9964122 11.5201554,10.9964122 C12.2723536,11.9699854 13.3598029,11.4955963 12.6076046,10.5221634 L9.483585,6.48257805 C9.29154036,6.26856585 9.03445286,5.93366341 8.68961357,5.92328537 L8.68966964,5.92334146 Z"
|
||||
id="Shape" fill="#8AB000" fill-rule="nonzero" />
|
||||
<rect id="Rectangle-path" fill="#AEEA00" fill-rule="nonzero" x="10.6535714"
|
||||
y="9.25609756" width="28.0357143" height="9.53658537"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill-opacity="0.2" fill="#263238"
|
||||
fill-rule="nonzero"
|
||||
x="10.6535714" y="11.4113659" width="28.0357143" height="7.38131707"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill-opacity="0.29804" fill="#FFFFFF"
|
||||
fill-rule="nonzero"
|
||||
x="10.6535714" y="9.25806098" width="28.0357143" height="7.38131707"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill="#AEEA00" fill-rule="nonzero" x="10.6535714"
|
||||
y="10.098122" width="28.0357143" height="7.85421951"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill="#1976D2" fill-rule="nonzero" x="10.6535714"
|
||||
y="19.6341463" width="28.0357143" height="19.0731707"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill-opacity="0.2" fill="#263238"
|
||||
fill-rule="nonzero"
|
||||
x="10.6535714" y="29.1118293" width="28.0357143" height="9.5954878"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill-opacity="0.2" fill="#FFFFFF"
|
||||
fill-rule="nonzero"
|
||||
x="10.6535714" y="19.5752439" width="28.0357143" height="9.5954878"
|
||||
rx="2.21439512" />
|
||||
<rect id="Rectangle-path" fill="#1976D2" fill-rule="nonzero" x="10.6535714"
|
||||
y="20.4756098" width="28.0357143" height="17.3902439"
|
||||
rx="2.21439512" />
|
||||
<path
|
||||
d="M24.6714286,24.5735366 C22.5461252,24.5735366 20.7467089,26.0384683 20.2201982,28.0061463 L22.5906179,28.0061463 C22.9995748,27.2788415 23.767473,26.7879598 24.6714005,26.7879598 C26.0087882,26.7879598 27.0692111,27.8488768 27.0692111,29.1868598 C27.0692111,30.5248427 26.0087882,31.5857598 24.6714005,31.5857598 C23.7068318,31.5857598 22.8924223,31.0301695 22.5099311,30.2205134 L20.1827425,30.2205134 C20.6565741,32.2619878 22.49339,33.8000988 24.6715407,33.8000988 C27.2051002,33.8000988 29.2825746,31.7215439 29.2825746,29.1869159 C29.2825746,26.6521756 27.204988,24.5737329 24.6715407,24.5737329 L24.6714286,24.5735366 Z"
|
||||
id="Shape" fill="#0D47A1" fill-rule="nonzero" />
|
||||
<ellipse id="Oval" stroke="#0D47A1" stroke-width="1.40243902"
|
||||
stroke-linecap="round"
|
||||
cx="24.6714286" cy="29.187561" rx="7.04593571"
|
||||
ry="7.04921951" />
|
||||
<ellipse id="Oval" fill-opacity="0.2" fill="#263238" fill-rule="nonzero"
|
||||
cx="17.5699821" cy="14.1480854" rx="2.49002"
|
||||
ry="2.86013415" />
|
||||
<ellipse id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="17.5699821"
|
||||
cy="14.5172073" rx="2.49002" ry="2.49118049" />
|
||||
<ellipse id="Oval" fill-opacity="0.2" fill="#263238" fill-rule="nonzero"
|
||||
cx="31.9579107" cy="14.1480854" rx="2.49002"
|
||||
ry="2.86013415" />
|
||||
<ellipse id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="31.9579107"
|
||||
cy="14.5172073" rx="2.49002" ry="2.49118049" />
|
||||
<path
|
||||
d="M8.89152679,5.74242683 C8.53321466,5.73295225 8.20186636,5.93202601 8.04184972,6.25291205 C7.88183308,6.57379808 7.92213189,6.95837436 8.14518804,7.23908171 L10.8014598,10.6784232 C10.7075486,10.9245568 10.6536163,11.19065 10.6536163,11.4705768 L10.6536163,16.5785402 C10.6536163,17.8053098 11.6406977,18.7928512 12.8668957,18.7928512 L36.4760511,18.7928512 C37.7022491,18.7928512 38.6893306,17.8052817 38.6893306,16.5785402 L38.6893306,11.4705768 C38.6893306,11.1904873 38.6360487,10.9241305 38.5420337,10.6778622 L41.1977728,7.23908171 C41.4136365,6.96742572 41.4588967,6.59756916 41.3149131,6.28183678 C41.1709296,5.96610439 40.8620538,5.75789519 40.5154957,5.74295976 C40.2117646,5.72988939 39.9211038,5.86740249 39.7384859,6.11056707 L37.2114307,9.3827378 C36.9843414,9.30055488 36.7376271,9.25483537 36.4796986,9.25483537 L12.8705432,9.25483537 C12.6122305,9.25483537 12.3657882,9.30072317 12.1356991,9.38138305 L9.60687766,6.10921232 C9.43781797,5.88409848 9.17527379,5.74853032 8.89392945,5.74107207 L8.89152679,5.74242683 Z M12.8669911,19.6341463 C11.640793,19.6341463 10.6537116,20.6216878 10.6537116,21.8484573 L10.6537116,36.4930061 C10.6537116,37.7197756 11.640793,38.7073171 12.8669911,38.7073171 L36.4761464,38.7073171 C37.7023445,38.7073171 38.6894259,37.7197756 38.6894259,36.4930061 L38.6894259,21.8484573 C38.6922295,20.6232866 37.7053723,19.635689 36.4802116,19.635689 L12.8710562,19.635689 L12.8669911,19.6341463 Z"
|
||||
id="Shape" fill="url(#radialGradient-1)" fill-rule="nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 12 KiB |
|
@ -1,6 +0,0 @@
|
|||
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M414 204C414 180.804 432.804 162 456 162C610.64 162 736 287.36 736 442C736 465.196 717.196 484 694 484C670.804 484 652 465.196 652 442C652 333.752 564.248 246 456 246C432.804 246 414 227.196 414 204Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M610 820C610 843.196 591.196 862 568 862C413.36 862 288 736.64 288 582C288 558.804 306.804 540 330 540C353.196 540 372 558.804 372 582C372 690.248 459.752 778 568 778C591.196 778 610 796.804 610 820Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M204 610C180.804 610 162 591.196 162 568C162 413.36 287.36 288 442 288C465.196 288 484 306.804 484 330C484 353.196 465.196 372 442 372C333.752 372 246 459.752 246 568C246 591.196 227.196 610 204 610Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M820 414C843.196 414 862 432.804 862 456C862 610.64 736.64 736 582 736C558.804 736 540 717.196 540 694C540 670.804 558.804 652 582 652C690.248 652 778 564.248 778 456C778 432.804 796.804 414 820 414Z" fill="#0DBD8B"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 434 B |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 803 B |
Before Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 940 B |
200
res/welcome.html
|
@ -1,200 +0,0 @@
|
|||
<style type="text/css">
|
||||
|
||||
/* we deliberately inline style here to avoid flash-of-CSS problems, and to avoid
|
||||
* voodoo where we have to set display: none by default
|
||||
*/
|
||||
|
||||
h1::after {
|
||||
content: "!";
|
||||
}
|
||||
|
||||
.mx_Parent {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 25px 35px;
|
||||
color: #2e2f32;
|
||||
}
|
||||
|
||||
.mx_Logo {
|
||||
height: 54px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.mx_ButtonGroup {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mx_ButtonRow {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-justify-content: space-around;
|
||||
-ms-flex-pack: distribute;
|
||||
justify-content: space-around;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > * {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > *:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > *:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mx_ButtonParent {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
padding: 10px 20px;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
width: 150px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px center;
|
||||
text-decoration: none;
|
||||
color: #2e2f32 !important;
|
||||
}
|
||||
|
||||
.mx_ButtonLabel {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.mx_Header_title {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
|
||||
.mx_Header_subtitle {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
margin: 8px 0 0;
|
||||
}
|
||||
|
||||
.mx_ButtonSignIn {
|
||||
background-color: #368BD6;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.mx_ButtonCreateAccount {
|
||||
background-color: #0DBD8B;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.mx_SecondaryButton {
|
||||
background-color: #FFFFFF;
|
||||
color: #2E2F32;
|
||||
}
|
||||
|
||||
.mx_Button_iconSignIn {
|
||||
background-image: url('welcome/images/icon-sign-in.svg');
|
||||
}
|
||||
.mx_Button_iconCreateAccount {
|
||||
background-image: url('welcome/images/icon-create-account.svg');
|
||||
}
|
||||
.mx_Button_iconHelp {
|
||||
background-image: url('welcome/images/icon-help.svg');
|
||||
}
|
||||
.mx_Button_iconRoomDirectory {
|
||||
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;
|
||||
}
|
||||
|
||||
.mx_ButtonRow.mx_WelcomePage_guestFunctions {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.mx_ButtonRow.mx_WelcomePage_guestFunctions > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.mx_ButtonRow {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mx_ButtonRow > * {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="mx_Parent">
|
||||
<a href="https://riot.im" target="_blank" rel="noopener">
|
||||
<img src="welcome/images/logo.svg" alt="" class="mx_Logo"/>
|
||||
</a>
|
||||
<h1 class="mx_Header_title">_t("Welcome to Element")</h1>
|
||||
<h4 class="mx_Header_subtitle">_t("Decentralised, encrypted chat & collaboration powered by [matrix]")</h4>
|
||||
<div class="mx_ButtonGroup">
|
||||
<div class="mx_ButtonRow">
|
||||
<a href="#/login" class="mx_ButtonParent mx_ButtonSignIn mx_Button_iconSignIn">
|
||||
<div class="mx_ButtonLabel">_t("Sign In")</div>
|
||||
</a>
|
||||
<a href="#/register" class="mx_ButtonParent mx_ButtonCreateAccount mx_Button_iconCreateAccount">
|
||||
<div class="mx_ButtonLabel">_t("Create Account")</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- 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: Strip out these comments and rely on the guest flag -->
|
||||
<!-- BEGIN Ansible: Remove these lines when guest access is disabled -->
|
||||
<div class="mx_ButtonRow mx_WelcomePage_guestFunctions">
|
||||
<div>
|
||||
<a href="#/directory" class="mx_ButtonParent mx_SecondaryButton mx_Button_iconRoomDirectory">
|
||||
<div class="mx_ButtonLabel">_t("Explore rooms")</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Ansible: Remove these lines when guest access is disabled -->
|
||||
</div>
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 9C17 13.4183 13.4183 17 9 17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1C13.4183 1 17 4.58172 17 9ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25V6C8.25 5.58579 8.58579 5.25 9 5.25C9.41421 5.25 9.75 5.58579 9.75 6V8.25H12C12.4142 8.25 12.75 8.58579 12.75 9C12.75 9.41421 12.4142 9.75 12 9.75H9.75V12C9.75 12.4142 9.41421 12.75 9 12.75C8.58579 12.75 8.25 12.4142 8.25 12V9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 587 B |
|
@ -1,16 +0,0 @@
|
|||
|
||||
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="Experiments" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Home" transform="translate(-672.000000, -577.000000)" stroke="#000000" stroke-width="1.6">
|
||||
<g id="Group-11" transform="translate(621.000000, 176.000000)">
|
||||
<g id="Group-10" transform="translate(39.000000, 391.000000)">
|
||||
<g id="help-circle" transform="translate(13.000000, 11.000000)">
|
||||
<circle id="Oval" cx="10" cy="10" r="10"></circle>
|
||||
<path d="M7.09,7 C7.57543688,5.62004444 8.98538362,4.79140632 10.4271763,5.0387121 C11.868969,5.28601788 12.9221794,6.53715293 12.92,8 C12.92,10 9.92,11 9.92,11" id="Path"></path>
|
||||
<path d="M10,15 L10.0050017,15.0050017" id="Path"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,4 +0,0 @@
|
|||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 9C17 13.4183 13.4183 17 9 17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1C13.4183 1 17 4.58172 17 9ZM13.375 5.3266C13.5583 4.92826 13.0716 4.44152 12.6733 4.62491L7.66968 6.9285C7.33893 7.08077 7.08014 7.33956 6.92787 7.67031L4.62428 12.6739C4.44089 13.0722 4.92763 13.559 5.32597 13.3756L10.3295 11.072C10.6603 10.9197 10.9191 10.6609 11.0714 10.3302L13.375 5.3266Z" fill="black"/>
|
||||
<path d="M9.8835 9.88413C9.39534 10.3723 8.60389 10.3723 8.11573 9.88413C7.62757 9.39597 7.62757 8.60452 8.11573 8.11636C8.60389 7.62821 9.39534 7.62821 9.8835 8.11636C10.3717 8.60452 10.3717 9.39597 9.8835 9.88413Z" fill="black"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 53 KiB |
|
@ -1,6 +0,0 @@
|
|||
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M414 204C414 180.804 432.804 162 456 162C610.64 162 736 287.36 736 442C736 465.196 717.196 484 694 484C670.804 484 652 465.196 652 442C652 333.752 564.248 246 456 246C432.804 246 414 227.196 414 204Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M610 820C610 843.196 591.196 862 568 862C413.36 862 288 736.64 288 582C288 558.804 306.804 540 330 540C353.196 540 372 558.804 372 582C372 690.248 459.752 778 568 778C591.196 778 610 796.804 610 820Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M204 610C180.804 610 162 591.196 162 568C162 413.36 287.36 288 442 288C465.196 288 484 306.804 484 330C484 353.196 465.196 372 442 372C333.752 372 246 459.752 246 568C246 591.196 227.196 610 204 610Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M820 414C843.196 414 862 432.804 862 456C862 610.64 736.64 736 582 736C558.804 736 540 717.196 540 694C540 670.804 558.804 652 582 652C690.248 652 778 564.248 778 456C778 432.804 796.804 414 820 414Z" fill="#0DBD8B"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,153 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14576) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="793.322px" height="340.809px" viewBox="0 0 793.322 340.809" enable-background="new 0 0 793.322 340.809"
|
||||
xml:space="preserve">
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M34.004,340.809H2c-1.104,0-2-0.896-2-2V2c0-1.104,0.896-2,2-2h32.004c1.104,0,2,0.896,2,2
|
||||
v7.71c0,1.104-0.896,2-2,2h-21.13v317.386h21.13c1.104,0,2,0.896,2,2.001v7.712C36.004,339.913,35.108,340.809,34.004,340.809
|
||||
L34.004,340.809z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M10.875,9.711v321.386h23.13v7.711H1.999V2.001h32.006v7.71H10.875z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M252.402,233.711h-32.993c-1.104,0-2-0.896-2-2v-68.073c0-3.949-0.154-7.722-0.457-11.213
|
||||
c-0.289-3.282-1.074-6.153-2.332-8.53c-1.204-2.276-3.017-4.119-5.384-5.476c-2.393-1.362-5.775-2.056-10.042-2.056
|
||||
c-4.238,0-7.674,0.798-10.213,2.371c-2.565,1.596-4.604,3.701-6.053,6.258c-1.498,2.643-2.51,5.694-3.013,9.067
|
||||
c-0.526,3.513-0.793,7.125-0.793,10.741v66.91c0,1.104-0.896,2-2,2h-32.991c-1.104,0-2-0.896-2-2v-67.373
|
||||
c0-3.435-0.078-6.964-0.228-10.485c-0.148-3.251-0.767-6.278-1.841-8.995c-1.018-2.571-2.667-4.584-5.047-6.153
|
||||
c-2.372-1.552-6.029-2.341-10.865-2.341c-1.372,0-3.265,0.328-5.629,0.976c-2.28,0.624-4.536,1.826-6.705,3.577
|
||||
c-2.152,1.732-4.036,4.306-5.605,7.655c-1.569,3.356-2.367,7.877-2.367,13.438v69.701c0,1.104-0.895,2-2,2H68.857
|
||||
c-1.104,0-2-0.896-2-2V111.594c0-1.104,0.896-1.999,2-1.999h31.13c1.104,0,2,0.896,2,1.999v11.007
|
||||
c3.834-4.499,8.248-8.152,13.173-10.896c6.396-3.559,13.799-5.362,22.002-5.362c7.846,0,15.127,1.548,21.642,4.604
|
||||
c5.794,2.722,10.424,7.26,13.791,13.52c3.449-4.362,7.833-8.306,13.071-11.752c6.422-4.228,14.102-6.371,22.824-6.371
|
||||
c6.499,0,12.625,0.807,18.209,2.399c5.686,1.628,10.635,4.271,14.712,7.857c4.088,3.605,7.318,8.357,9.601,14.123
|
||||
c2.25,5.719,3.391,12.649,3.391,20.604v80.384C254.402,232.815,253.507,233.711,252.402,233.711L252.402,233.711z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M99.988,111.595v16.264h0.463c4.338-6.191,9.563-10.998,15.684-14.406
|
||||
c6.117-3.402,13.129-5.11,21.027-5.11c7.588,0,14.521,1.475,20.793,4.415c6.274,2.945,11.038,8.131,14.291,15.567
|
||||
c3.56-5.265,8.4-9.913,14.521-13.94c6.117-4.025,13.358-6.042,21.724-6.042c6.351,0,12.234,0.776,17.66,2.325
|
||||
c5.418,1.549,10.065,4.027,13.938,7.434c3.869,3.41,6.889,7.863,9.062,13.357c2.167,5.504,3.253,12.122,3.253,19.869v80.385H219.41
|
||||
v-68.074c0-4.025-0.154-7.82-0.465-11.385c-0.313-3.56-1.161-6.656-2.555-9.293c-1.395-2.631-3.45-4.724-6.157-6.274
|
||||
c-2.711-1.543-6.391-2.322-11.037-2.322s-8.403,0.896-11.269,2.671c-2.868,1.784-5.112,4.109-6.737,6.971
|
||||
c-1.626,2.869-2.711,6.12-3.252,9.762c-0.545,3.638-0.814,7.318-0.814,11.035v66.91h-32.991v-67.375c0-3.562-0.081-7.087-0.23-10.57
|
||||
c-0.158-3.487-0.814-6.7-1.978-9.645c-1.162-2.94-3.099-5.304-5.809-7.088c-2.711-1.775-6.699-2.671-11.965-2.671
|
||||
c-1.551,0-3.603,0.349-6.156,1.048c-2.556,0.697-5.036,2.016-7.435,3.949c-2.404,1.938-4.454,4.726-6.158,8.363
|
||||
c-1.705,3.642-2.556,8.402-2.556,14.287v69.701h-32.99V111.595H99.988z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M304.909,236.733c-5.883,0-11.46-0.729-16.574-2.163c-5.192-1.464-9.806-3.774-13.713-6.871
|
||||
c-3.944-3.117-7.068-7.111-9.282-11.871c-2.205-4.733-3.324-10.412-3.324-16.876c0-7.13,1.293-13.117,3.846-17.797
|
||||
c2.542-4.674,5.877-8.464,9.912-11.263c3.97-2.752,8.556-4.842,13.63-6.209c4.901-1.322,9.937-2.394,14.961-3.184
|
||||
c4.986-0.775,9.949-1.404,14.754-1.872c4.679-0.452,8.88-1.139,12.489-2.039c3.412-0.854,6.118-2.09,8.042-3.672
|
||||
c1.666-1.37,2.416-3.384,2.292-6.151c-0.002-3.289-0.502-5.816-1.492-7.595c-0.998-1.798-2.283-3.15-3.927-4.138
|
||||
c-1.703-1.02-3.725-1.713-6.012-2.062c-2.47-0.37-5.146-0.557-7.947-0.557c-6.034,0-10.789,1.271-14.135,3.783
|
||||
c-3.233,2.424-5.155,6.64-5.714,12.527c-0.098,1.026-0.961,1.812-1.992,1.812h-32.992c-0.552,0-1.079-0.229-1.457-0.629
|
||||
c-0.376-0.402-0.572-0.941-0.54-1.491c0.485-8.073,2.55-14.894,6.142-20.272c3.548-5.331,8.147-9.682,13.661-12.931
|
||||
c5.424-3.191,11.612-5.498,18.392-6.857c6.684-1.335,13.5-2.013,20.26-2.013c6.096,0,12.365,0.437,18.626,1.296
|
||||
c6.377,0.88,12.285,2.622,17.562,5.177c5.376,2.604,9.845,6.29,13.282,10.951c3.498,4.744,5.271,11.048,5.271,18.731v62.494
|
||||
c0,5.307,0.306,10.462,0.915,15.319c0.576,4.64,1.572,8.116,2.963,10.338c0.385,0.616,0.407,1.395,0.055,2.031
|
||||
c-0.353,0.635-1.022,1.03-1.75,1.03h-33.457c-0.861,0-1.624-0.55-1.898-1.367c-0.646-1.941-1.176-3.939-1.572-5.936
|
||||
c-0.141-0.696-0.267-1.402-0.38-2.12c-4.825,4.184-10.349,7.24-16.474,9.105C320.033,235.609,312.489,236.733,304.909,236.733
|
||||
L304.909,236.733z M341.941,176.661c-0.809,0.409-1.676,0.768-2.596,1.074c-2.161,0.72-4.511,1.326-6.988,1.807
|
||||
c-2.442,0.475-5.033,0.872-7.699,1.186c-2.631,0.311-5.251,0.697-7.784,1.146c-2.329,0.433-4.705,1.035-7.051,1.792
|
||||
c-2.194,0.711-4.114,1.667-5.699,2.842c-1.531,1.128-2.785,2.587-3.731,4.335c-0.917,1.709-1.385,3.97-1.385,6.719
|
||||
c0,2.598,0.465,4.778,1.385,6.481c0.928,1.722,2.142,3.035,3.716,4.018c1.644,1.026,3.601,1.757,5.816,2.17
|
||||
c2.344,0.439,4.799,0.663,7.297,0.663c6.105,0,10.836-0.996,14.063-2.961c3.244-1.973,5.666-4.349,7.199-7.062
|
||||
c1.568-2.78,2.542-5.62,2.892-8.436c0.376-3.019,0.565-5.436,0.565-7.187V176.661L341.941,176.661z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M273.544,129.255c3.405-5.113,7.744-9.215,13.012-12.316
|
||||
c5.264-3.097,11.186-5.303,17.771-6.621c6.582-1.315,13.205-1.976,19.865-1.976c6.042,0,12.158,0.428,18.354,1.277
|
||||
c6.195,0.855,11.85,2.522,16.962,4.997c5.111,2.477,9.292,5.926,12.546,10.338c3.253,4.414,4.879,10.262,4.879,17.543v62.494
|
||||
c0,5.428,0.31,10.611,0.931,15.567c0.615,4.959,1.701,8.676,3.251,11.153H347.66c-0.621-1.86-1.126-3.755-1.511-5.693
|
||||
c-0.39-1.933-0.661-3.908-0.813-5.923c-5.267,5.422-11.465,9.217-18.585,11.386c-7.127,2.163-14.407,3.251-21.842,3.251
|
||||
c-5.733,0-11.077-0.698-16.033-2.09c-4.958-1.395-9.293-3.562-13.01-6.51c-3.718-2.938-6.622-6.656-8.713-11.147
|
||||
s-3.138-9.84-3.138-16.033c0-6.813,1.199-12.43,3.604-16.84c2.399-4.417,5.495-7.939,9.295-10.575
|
||||
c3.793-2.632,8.129-4.607,13.01-5.923c4.878-1.315,9.795-2.358,14.752-3.137c4.957-0.772,9.835-1.393,14.638-1.857
|
||||
c4.801-0.466,9.062-1.164,12.779-2.093c3.718-0.929,6.658-2.282,8.829-4.065c2.165-1.781,3.172-4.375,3.02-7.785
|
||||
c0-3.56-0.58-6.389-1.742-8.479c-1.161-2.09-2.711-3.719-4.646-4.88c-1.937-1.161-4.183-1.936-6.737-2.325
|
||||
c-2.557-0.382-5.309-0.58-8.248-0.58c-6.506,0-11.617,1.395-15.335,4.183c-3.716,2.788-5.889,7.437-6.506,13.94h-32.991
|
||||
C268.199,140.794,270.132,134.363,273.544,129.255z M338.713,175.838c-2.09,0.696-4.337,1.275-6.736,1.741
|
||||
c-2.402,0.465-4.918,0.853-7.551,1.161c-2.635,0.313-5.268,0.698-7.899,1.163c-2.48,0.461-4.919,1.086-7.317,1.857
|
||||
c-2.404,0.779-4.495,1.822-6.274,3.138c-1.784,1.317-3.216,2.985-4.3,4.994c-1.085,2.014-1.626,4.571-1.626,7.668
|
||||
c0,2.94,0.541,5.422,1.626,7.431c1.084,2.017,2.558,3.604,4.416,4.765s4.025,1.976,6.507,2.438c2.475,0.466,5.031,0.698,7.665,0.698
|
||||
c6.505,0,11.537-1.082,15.103-3.253c3.561-2.166,6.192-4.762,7.899-7.785c1.702-3.019,2.749-6.072,3.137-9.174
|
||||
c0.384-3.097,0.58-5.576,0.58-7.434v-12.316C342.547,174.173,340.805,175.14,338.713,175.838z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M444.542,234.874c-5.187,0-10.173-0.361-14.823-1.069c-4.802-0.732-9.104-2.183-12.779-4.313
|
||||
c-3.789-2.185-6.821-5.341-9.006-9.375c-2.163-3.986-3.26-9.232-3.26-15.59v-68.859h-17.981c-1.104,0-2-0.896-2-1.999v-22.073
|
||||
c0-1.104,0.896-1.999,2-1.999h17.981V75.582c0-1.104,0.896-2,2-2h32.992c1.104,0,2,0.896,2,2v34.014h22.162c1.104,0,2,0.896,2,1.999
|
||||
v22.073c0,1.104-0.896,1.999-2,1.999h-22.162v57.479c0,6.229,1.198,8.731,2.202,9.733c1.004,1.007,3.506,2.205,9.738,2.205
|
||||
c1.804,0,3.542-0.076,5.161-0.225c1.604-0.144,3.174-0.367,4.669-0.665c0.13-0.026,0.261-0.039,0.391-0.039
|
||||
c0.458,0,0.907,0.159,1.27,0.454c0.463,0.379,0.73,0.946,0.73,1.546v25.555c0,0.979-0.707,1.813-1.672,1.974
|
||||
c-2.834,0.472-6.041,0.794-9.527,0.957C451.015,234.798,447.718,234.874,444.542,234.874L444.542,234.874z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M463.825,111.595v22.072h-24.161v59.479c0,5.573,0.928,9.292,2.788,11.149
|
||||
c1.856,1.859,5.576,2.788,11.152,2.788c1.859,0,3.638-0.076,5.343-0.232c1.703-0.152,3.33-0.388,4.878-0.696v25.557
|
||||
c-2.788,0.465-5.887,0.773-9.293,0.931c-3.407,0.149-6.737,0.23-9.99,0.23c-5.111,0-9.953-0.35-14.521-1.048
|
||||
c-4.571-0.695-8.597-2.047-12.081-4.063c-3.486-2.011-6.236-4.88-8.248-8.597c-2.016-3.714-3.021-8.595-3.021-14.639v-70.859h-19.98
|
||||
v-22.072h19.98V75.583h32.992v36.012H463.825z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M512.613,233.711h-32.991c-1.104,0-2-0.896-2-2V111.594c0-1.104,0.896-1.999,2-1.999h31.366
|
||||
c1.104,0,2,0.896,2,1.999v15.069c0.967-1.516,2.034-2.978,3.199-4.382c2.754-3.312,5.949-6.182,9.496-8.522
|
||||
c3.545-2.332,7.385-4.169,11.415-5.462c4.056-1.298,8.327-1.954,12.691-1.954c2.341,0,4.953,0.418,7.766,1.243
|
||||
c0.852,0.25,1.437,1.032,1.437,1.92v30.67c0,0.6-0.269,1.167-0.732,1.547c-0.361,0.296-0.808,0.452-1.265,0.452
|
||||
c-0.133,0-0.265-0.013-0.398-0.039c-1.484-0.3-3.299-0.565-5.392-0.787c-2.098-0.224-4.136-0.339-6.062-0.339
|
||||
c-5.706,0-10.572,0.95-14.467,2.823c-3.862,1.86-7.012,4.428-9.361,7.629c-2.389,3.263-4.115,7.12-5.127,11.47
|
||||
c-1.043,4.479-1.574,9.409-1.574,14.647v54.132C514.613,232.815,513.717,233.711,512.613,233.711L512.613,233.711z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M510.988,111.595V133.9h0.465c1.546-3.72,3.636-7.163,6.272-10.341
|
||||
c2.634-3.172,5.652-5.885,9.06-8.131c3.405-2.242,7.047-3.985,10.923-5.228c3.868-1.237,7.898-1.859,12.081-1.859
|
||||
c2.168,0,4.566,0.39,7.202,1.163v30.67c-1.551-0.312-3.41-0.584-5.576-0.814c-2.17-0.233-4.26-0.35-6.274-0.35
|
||||
c-6.041,0-11.152,1.01-15.332,3.021c-4.182,2.014-7.55,4.761-10.107,8.247c-2.555,3.487-4.379,7.55-5.462,12.198
|
||||
c-1.083,4.645-1.625,9.682-1.625,15.102v54.133h-32.991V111.595H510.988z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M603.923,233.711H570.93c-1.104,0-2-0.896-2-2V111.594c0-1.104,0.896-1.999,2-1.999h32.994
|
||||
c1.104,0,2,0.896,2,1.999v120.117C605.923,232.815,605.027,233.711,603.923,233.711L603.923,233.711z M603.923,95.006H570.93
|
||||
c-1.104,0-2-0.896-2-1.999V65.825c0-1.104,0.896-2,2-2h32.994c1.104,0,2,0.896,2,2v27.182
|
||||
C605.923,94.11,605.027,95.006,603.923,95.006L603.923,95.006z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M570.93,93.007V65.824h32.994v27.183H570.93z M603.924,111.595v120.117H570.93V111.595
|
||||
H603.924z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M742.163,233.711h-37.64c-0.671,0-1.297-0.335-1.667-0.896l-23.426-35.352l-23.426,35.352
|
||||
c-0.369,0.561-0.995,0.896-1.667,0.896h-36.938c-0.741,0-1.424-0.411-1.77-1.067c-0.345-0.654-0.3-1.449,0.118-2.061l42.435-62.055
|
||||
l-38.71-55.793c-0.424-0.613-0.474-1.408-0.128-2.069c0.343-0.658,1.028-1.071,1.771-1.071h37.636c0.665,0,1.287,0.33,1.658,0.882
|
||||
l19.477,28.893l19.255-28.884c0.372-0.556,0.996-0.891,1.665-0.891h36.475c0.746,0,1.43,0.415,1.776,1.078
|
||||
c0.343,0.66,0.289,1.46-0.139,2.071l-38.69,55.082l43.578,62.744c0.424,0.61,0.474,1.408,0.128,2.066
|
||||
C743.591,233.298,742.908,233.711,742.163,233.711L742.163,233.711z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M621.115,111.595h37.637l21.144,31.365l20.911-31.365h36.476l-39.496,56.226l44.377,63.892
|
||||
h-37.64l-25.093-37.87l-25.094,37.87h-36.938l43.213-63.193L621.115,111.595z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M791.322,340.809h-32.008c-1.105,0-2-0.896-2-2v-7.712c0-1.105,0.896-2.001,2-2.001h21.13
|
||||
V11.71h-21.13c-1.105,0-2-0.896-2-2V2c0-1.104,0.896-2,2-2h32.008c1.104,0,2,0.896,2,2v336.809
|
||||
C793.322,339.913,792.426,340.809,791.322,340.809L791.322,340.809z"/>
|
||||
<path opacity="0.5" fill="#FFFFFF" d="M782.443,331.097V9.711h-23.13v-7.71h32.008v336.807h-32.008v-7.711H782.443z"/>
|
||||
<path d="M10.875,9.711v321.386h23.13v7.711H1.999V2.001h32.006v7.71H10.875z"/>
|
||||
<path d="M99.988,111.595v16.264h0.463c4.338-6.191,9.563-10.998,15.684-14.406c6.117-3.402,13.129-5.11,21.027-5.11
|
||||
c7.588,0,14.521,1.475,20.793,4.415c6.274,2.945,11.038,8.131,14.291,15.567c3.56-5.265,8.4-9.913,14.521-13.94
|
||||
c6.117-4.025,13.358-6.042,21.724-6.042c6.351,0,12.234,0.776,17.66,2.325c5.418,1.549,10.065,4.027,13.938,7.434
|
||||
c3.869,3.41,6.889,7.863,9.062,13.357c2.167,5.504,3.253,12.122,3.253,19.869v80.385H219.41v-68.074
|
||||
c0-4.025-0.154-7.82-0.465-11.385c-0.313-3.56-1.161-6.656-2.555-9.293c-1.395-2.631-3.45-4.724-6.157-6.274
|
||||
c-2.711-1.543-6.391-2.322-11.037-2.322s-8.403,0.896-11.269,2.671c-2.868,1.784-5.112,4.109-6.737,6.971
|
||||
c-1.626,2.869-2.711,6.12-3.252,9.762c-0.545,3.638-0.814,7.318-0.814,11.035v66.91h-32.991v-67.375c0-3.562-0.081-7.087-0.23-10.57
|
||||
c-0.158-3.487-0.814-6.7-1.978-9.645c-1.162-2.94-3.099-5.304-5.809-7.088c-2.711-1.775-6.699-2.671-11.965-2.671
|
||||
c-1.551,0-3.603,0.349-6.156,1.048c-2.556,0.697-5.036,2.016-7.435,3.949c-2.404,1.938-4.454,4.726-6.158,8.363
|
||||
c-1.705,3.642-2.556,8.402-2.556,14.287v69.701h-32.99V111.595H99.988z"/>
|
||||
<path d="M273.544,129.255c3.405-5.113,7.744-9.215,13.012-12.316c5.264-3.097,11.186-5.303,17.771-6.621
|
||||
c6.582-1.315,13.205-1.976,19.865-1.976c6.042,0,12.158,0.428,18.354,1.277c6.195,0.855,11.85,2.522,16.962,4.997
|
||||
c5.111,2.477,9.292,5.926,12.546,10.338c3.253,4.414,4.879,10.262,4.879,17.543v62.494c0,5.428,0.31,10.611,0.931,15.567
|
||||
c0.615,4.959,1.701,8.676,3.251,11.153H347.66c-0.621-1.86-1.126-3.755-1.511-5.693c-0.39-1.933-0.661-3.908-0.813-5.923
|
||||
c-5.267,5.422-11.465,9.217-18.585,11.386c-7.127,2.163-14.407,3.251-21.842,3.251c-5.733,0-11.077-0.698-16.033-2.09
|
||||
c-4.958-1.395-9.293-3.562-13.01-6.51c-3.718-2.938-6.622-6.656-8.713-11.147s-3.138-9.84-3.138-16.033
|
||||
c0-6.813,1.199-12.43,3.604-16.84c2.399-4.417,5.495-7.939,9.295-10.575c3.793-2.632,8.129-4.607,13.01-5.923
|
||||
c4.878-1.315,9.795-2.358,14.752-3.137c4.957-0.772,9.835-1.393,14.638-1.857c4.801-0.466,9.062-1.164,12.779-2.093
|
||||
c3.718-0.929,6.658-2.282,8.829-4.065c2.165-1.781,3.172-4.375,3.02-7.785c0-3.56-0.58-6.389-1.742-8.479
|
||||
c-1.161-2.09-2.711-3.719-4.646-4.88c-1.937-1.161-4.183-1.936-6.737-2.325c-2.557-0.382-5.309-0.58-8.248-0.58
|
||||
c-6.506,0-11.617,1.395-15.335,4.183c-3.716,2.788-5.889,7.437-6.506,13.94h-32.991
|
||||
C268.199,140.794,270.132,134.363,273.544,129.255z M338.713,175.838c-2.09,0.696-4.337,1.275-6.736,1.741
|
||||
c-2.402,0.465-4.918,0.853-7.551,1.161c-2.635,0.313-5.268,0.698-7.899,1.163c-2.48,0.461-4.919,1.086-7.317,1.857
|
||||
c-2.404,0.779-4.495,1.822-6.274,3.138c-1.784,1.317-3.216,2.985-4.3,4.994c-1.085,2.014-1.626,4.571-1.626,7.668
|
||||
c0,2.94,0.541,5.422,1.626,7.431c1.084,2.017,2.558,3.604,4.416,4.765s4.025,1.976,6.507,2.438c2.475,0.466,5.031,0.698,7.665,0.698
|
||||
c6.505,0,11.537-1.082,15.103-3.253c3.561-2.166,6.192-4.762,7.899-7.785c1.702-3.019,2.749-6.072,3.137-9.174
|
||||
c0.384-3.097,0.58-5.576,0.58-7.434v-12.316C342.547,174.173,340.805,175.14,338.713,175.838z"/>
|
||||
<path d="M463.825,111.595v22.072h-24.161v59.479c0,5.573,0.928,9.292,2.788,11.149c1.856,1.859,5.576,2.788,11.152,2.788
|
||||
c1.859,0,3.638-0.076,5.343-0.232c1.703-0.152,3.33-0.388,4.878-0.696v25.557c-2.788,0.465-5.887,0.773-9.293,0.931
|
||||
c-3.407,0.149-6.737,0.23-9.99,0.23c-5.111,0-9.953-0.35-14.521-1.048c-4.571-0.695-8.597-2.047-12.081-4.063
|
||||
c-3.486-2.011-6.236-4.88-8.248-8.597c-2.016-3.714-3.021-8.595-3.021-14.639v-70.859h-19.98v-22.072h19.98V75.583h32.992v36.012
|
||||
H463.825z"/>
|
||||
<path d="M510.988,111.595V133.9h0.465c1.546-3.72,3.636-7.163,6.272-10.341c2.634-3.172,5.652-5.885,9.06-8.131
|
||||
c3.405-2.242,7.047-3.985,10.923-5.228c3.868-1.237,7.898-1.859,12.081-1.859c2.168,0,4.566,0.39,7.202,1.163v30.67
|
||||
c-1.551-0.312-3.41-0.584-5.576-0.814c-2.17-0.233-4.26-0.35-6.274-0.35c-6.041,0-11.152,1.01-15.332,3.021
|
||||
c-4.182,2.014-7.55,4.761-10.107,8.247c-2.555,3.487-4.379,7.55-5.462,12.198c-1.083,4.645-1.625,9.682-1.625,15.102v54.133h-32.991
|
||||
V111.595H510.988z"/>
|
||||
<path d="M570.93,93.007V65.824h32.994v27.183H570.93z M603.924,111.595v120.117H570.93V111.595H603.924z"/>
|
||||
<path d="M621.115,111.595h37.637l21.144,31.365l20.911-31.365h36.476l-39.496,56.226l44.377,63.892h-37.64l-25.093-37.87
|
||||
l-25.094,37.87h-36.938l43.213-63.193L621.115,111.595z"/>
|
||||
<path d="M782.443,331.097V9.711h-23.13v-7.71h32.008v336.807h-32.008v-7.711H782.443z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 16 KiB |
|
@ -1,24 +0,0 @@
|
|||
// This is a JS script so that the directory is created in-process on Windows.
|
||||
// If the script isn't run in-process, there's a risk of it racing or never running
|
||||
// due to file associations in Windows.
|
||||
// Sorry.
|
||||
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const mkdirp = require("mkdirp");
|
||||
const fetch = require("node-fetch");
|
||||
|
||||
console.log("Making webapp directory");
|
||||
mkdirp.sync("webapp");
|
||||
|
||||
// curl -s https://jitsi.riot.im/libs/external_api.min.js > ./webapp/jitsi_external_api.min.js
|
||||
console.log("Downloading Jitsi script");
|
||||
const fname = path.join("webapp", "jitsi_external_api.min.js");
|
||||
fetch("https://jitsi.riot.im/libs/external_api.min.js").then(res => {
|
||||
const stream = fs.createWriteStream(fname);
|
||||
return new Promise((resolve, reject) => {
|
||||
res.body.pipe(stream);
|
||||
res.body.on('error', err => reject(err));
|
||||
res.body.on('finish', () => resolve());
|
||||
});
|
||||
}).then(() => console.log('Done with Jitsi download'));
|
|
@ -1 +0,0 @@
|
|||
../../matrix-react-sdk/scripts/check-i18n.pl
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Runs package.sh setting the version to git hashes of the element-web,
|
||||
# react-sdk & js-sdk checkouts, for the case where these dependencies
|
||||
# are git checkouts.
|
||||
|
||||
set -ex
|
||||
|
||||
rm dist/riot-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
|
||||
|
||||
# Since the deps are fetched from git, we can rev-parse
|
||||
REACT_SHA=$(cd node_modules/matrix-react-sdk; git rev-parse --short=12 HEAD)
|
||||
JSSDK_SHA=$(cd node_modules/matrix-js-sdk; git rev-parse --short=12 HEAD)
|
||||
|
||||
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
|
||||
|
||||
CI_PACKAGE=true DIST_VERSION=$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA scripts/package.sh -d
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# script to clean up the deployments made by redeploy.py for vectorwebdev and vectorwebexp
|
||||
set -e
|
||||
|
||||
# currently live deployment (full path)
|
||||
live=`dirname $(readlink -f "$HOME/live")`
|
||||
|
||||
# currently live bundle (just the name of the bundle)
|
||||
live_bundle=`grep 'script src="bundles' live/index.html | sed -e 's#.*bundles/##' -e 's#/.*##'`
|
||||
|
||||
# clean up 'extracted': find things which are older than 7 days, exclude the
|
||||
# current live one, and remove
|
||||
find $HOME/extracted -mindepth 1 -maxdepth 1 -type d -ctime +7 \
|
||||
\! -path "$live" -exec rm -r {} \;
|
||||
|
||||
# clean up 'bundles': ditto
|
||||
find $HOME/bundles -mindepth 1 -maxdepth 1 -type d -ctime +7 \
|
||||
\! -name "$live_bundle" -exec rm -r {} \;
|
|
@ -1,10 +0,0 @@
|
|||
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");
|
||||
}
|
|
@ -1,289 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const loaderUtils = require("loader-utils");
|
||||
|
||||
// copies the resources into the webapp directory.
|
||||
//
|
||||
|
||||
// Languages are listed manually so we can choose when to include
|
||||
// a translation in the app (because having a translation with only
|
||||
// 3 strings translated is just frustrating)
|
||||
// This could readily be automated, but it's nice to explicitly
|
||||
// control when new languages are available.
|
||||
const INCLUDE_LANGS = [
|
||||
{'value': 'bg', 'label': 'Български'},
|
||||
{'value': 'ca', 'label': 'Català'},
|
||||
{'value': 'cs', 'label': 'čeština'},
|
||||
{'value': 'da', 'label': 'Dansk'},
|
||||
{'value': 'de_DE', 'label': 'Deutsch'},
|
||||
{'value': 'el', 'label': 'Ελληνικά'},
|
||||
{'value': 'en_EN', 'label': 'English'},
|
||||
{'value': 'en_US', 'label': 'English (US)'},
|
||||
{'value': 'eo', 'label': 'Esperanto'},
|
||||
{'value': 'es', 'label': 'Español'},
|
||||
{'value': 'eu', 'label': 'Euskara'},
|
||||
{'value': 'fi', 'label': 'Suomi'},
|
||||
{'value': 'fr', 'label': 'Français'},
|
||||
{'value': 'gl', 'label': 'Galego'},
|
||||
{'value': 'hi', 'label': 'हिन्दी'},
|
||||
{'value': 'hu', 'label': 'Magyar'},
|
||||
{'value': 'is', 'label': 'íslenska'},
|
||||
{'value': 'it', 'label': 'Italiano'},
|
||||
{'value': 'ja', 'label': '日本語'},
|
||||
{'value': 'jbo', 'label': 'banjubu\'o'},
|
||||
{'value': 'ko', 'label': '한국어'},
|
||||
{'value': 'lt', 'label': 'Lietuvių'},
|
||||
{'value': 'lv', 'label': 'Latviešu'},
|
||||
{'value': 'nb_NO', 'label': 'Norwegian Bokmål'},
|
||||
{'value': 'nl', 'label': 'Nederlands'},
|
||||
{'value': 'nn', 'label': 'Norsk Nynorsk'},
|
||||
{'value': 'pl', 'label': 'Polski'},
|
||||
{'value': 'pt', 'label': 'Português'},
|
||||
{'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çe'},
|
||||
{'value': 'uk', 'label': 'українська мова'},
|
||||
{'value': 'vls', 'label': 'West-Vlaams'},
|
||||
{'value': 'zh_Hans', 'label': '简体中文'}, // simplified chinese
|
||||
{'value': 'zh_Hant', 'label': '繁體中文'}, // traditional chinese
|
||||
];
|
||||
|
||||
// cpx includes globbed parts of the filename in the destination, but excludes
|
||||
// common parents. Hence, "res/{a,b}/**": the output will be "dest/a/..." and
|
||||
// "dest/b/...".
|
||||
const COPY_LIST = [
|
||||
["res/manifest.json", "webapp"],
|
||||
["res/sw.js", "webapp"],
|
||||
["res/welcome.html", "webapp"],
|
||||
["res/welcome/**", "webapp/welcome"],
|
||||
["res/themes/**", "webapp/themes"],
|
||||
["res/vector-icons/**", "webapp/vector-icons"],
|
||||
["res/decoder-ring/**", "webapp/decoder-ring"],
|
||||
["node_modules/matrix-react-sdk/res/media/**", "webapp/media"],
|
||||
["node_modules/olm/olm_legacy.js", "webapp", { directwatch: 1 }],
|
||||
["./config.json", "webapp", { directwatch: 1 }],
|
||||
["contribute.json", "webapp"],
|
||||
];
|
||||
|
||||
const parseArgs = require('minimist');
|
||||
const Cpx = require('cpx');
|
||||
const chokidar = require('chokidar');
|
||||
const fs = require('fs');
|
||||
const rimraf = require('rimraf');
|
||||
|
||||
const argv = parseArgs(
|
||||
process.argv.slice(2), {}
|
||||
);
|
||||
|
||||
const watch = argv.w;
|
||||
const verbose = argv.v;
|
||||
|
||||
function errCheck(err) {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if webapp exists
|
||||
if (!fs.existsSync('webapp')) {
|
||||
fs.mkdirSync('webapp');
|
||||
}
|
||||
// Check if i18n exists
|
||||
if (!fs.existsSync('webapp/i18n/')) {
|
||||
fs.mkdirSync('webapp/i18n/');
|
||||
}
|
||||
|
||||
function next(i, err) {
|
||||
errCheck(err);
|
||||
|
||||
if (i >= COPY_LIST.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const ent = COPY_LIST[i];
|
||||
const source = ent[0];
|
||||
const dest = ent[1];
|
||||
const opts = ent[2] || {};
|
||||
let cpx = undefined;
|
||||
|
||||
if (!opts.lang) {
|
||||
cpx = new Cpx.Cpx(source, dest);
|
||||
}
|
||||
|
||||
if (verbose && cpx) {
|
||||
cpx.on("copy", (event) => {
|
||||
console.log(`Copied: ${event.srcPath} --> ${event.dstPath}`);
|
||||
});
|
||||
cpx.on("remove", (event) => {
|
||||
console.log(`Removed: ${event.path}`);
|
||||
});
|
||||
}
|
||||
|
||||
const cb = (err) => { next(i + 1, err) };
|
||||
|
||||
if (watch) {
|
||||
if (opts.directwatch) {
|
||||
// cpx -w creates a watcher for the parent of any files specified,
|
||||
// which in the case of config.json is '.', which inevitably takes
|
||||
// ages to crawl. So we create our own watcher on the files
|
||||
// instead.
|
||||
const copy = () => { cpx.copy(errCheck) };
|
||||
chokidar.watch(source)
|
||||
.on('add', copy)
|
||||
.on('change', copy)
|
||||
.on('ready', cb)
|
||||
.on('error', errCheck);
|
||||
} else {
|
||||
cpx.on('watch-ready', cb);
|
||||
cpx.on("watch-error", cb);
|
||||
cpx.watch();
|
||||
}
|
||||
} else {
|
||||
cpx.copy(cb);
|
||||
}
|
||||
}
|
||||
|
||||
function genLangFile(lang, dest) {
|
||||
const reactSdkFile = 'node_modules/matrix-react-sdk/src/i18n/strings/' + lang + '.json';
|
||||
const riotWebFile = 'src/i18n/strings/' + lang + '.json';
|
||||
|
||||
let translations = {};
|
||||
[reactSdkFile, riotWebFile].forEach(function(f) {
|
||||
if (fs.existsSync(f)) {
|
||||
try {
|
||||
Object.assign(
|
||||
translations,
|
||||
JSON.parse(fs.readFileSync(f).toString())
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Failed: " + f, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
translations = weblateToCounterpart(translations);
|
||||
|
||||
const json = JSON.stringify(translations, null, 4);
|
||||
const jsonBuffer = Buffer.from(json);
|
||||
const digest = loaderUtils.getHashDigest(jsonBuffer, null, null, 7);
|
||||
const filename = `${lang}.${digest}.json`;
|
||||
|
||||
fs.writeFileSync(dest + filename, json);
|
||||
if (verbose) {
|
||||
console.log("Generated language file: " + filename);
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
function genLangList(langFileMap) {
|
||||
const languages = {};
|
||||
INCLUDE_LANGS.forEach(function(lang) {
|
||||
const normalizedLanguage = lang.value.toLowerCase().replace("_", "-");
|
||||
const languageParts = normalizedLanguage.split('-');
|
||||
if (languageParts.length == 2 && languageParts[0] == languageParts[1]) {
|
||||
languages[languageParts[0]] = {'fileName': langFileMap[lang.value], 'label': lang.label};
|
||||
} else {
|
||||
languages[normalizedLanguage] = {'fileName': langFileMap[lang.value], 'label': lang.label};
|
||||
}
|
||||
});
|
||||
fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4), function(err) {
|
||||
if (err) {
|
||||
console.error("Copy Error occured: " + err);
|
||||
throw new Error("Failed to generate languages.json");
|
||||
}
|
||||
});
|
||||
if (verbose) {
|
||||
console.log("Generated languages.json");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert translation key from weblate format
|
||||
* (which only supports a single level) to counterpart
|
||||
* which requires object values for 'count' translations.
|
||||
*
|
||||
* eg.
|
||||
* "there are %(count)s badgers|one": "a badger",
|
||||
* "there are %(count)s badgers|other": "%(count)s badgers"
|
||||
* becomes
|
||||
* "there are %(count)s badgers": {
|
||||
* "one": "a badger",
|
||||
* "other": "%(count)s badgers"
|
||||
* }
|
||||
*/
|
||||
function weblateToCounterpart(inTrs) {
|
||||
const outTrs = {};
|
||||
|
||||
for (const key of Object.keys(inTrs)) {
|
||||
const keyParts = key.split('|', 2);
|
||||
if (keyParts.length === 2) {
|
||||
let obj = outTrs[keyParts[0]];
|
||||
if (obj === undefined) {
|
||||
obj = {};
|
||||
outTrs[keyParts[0]] = obj;
|
||||
}
|
||||
obj[keyParts[1]] = inTrs[key];
|
||||
} else {
|
||||
outTrs[key] = inTrs[key];
|
||||
}
|
||||
}
|
||||
|
||||
return outTrs;
|
||||
}
|
||||
|
||||
/**
|
||||
watch the input files for a given language,
|
||||
regenerate the file, adding its content-hashed filename to langFileMap
|
||||
and regenerating languages.json with the new filename
|
||||
*/
|
||||
function watchLanguage(lang, dest, langFileMap) {
|
||||
const reactSdkFile = 'node_modules/matrix-react-sdk/src/i18n/strings/' + lang + '.json';
|
||||
const riotWebFile = 'src/i18n/strings/' + lang + '.json';
|
||||
|
||||
// XXX: Use a debounce because for some reason if we read the language
|
||||
// file immediately after the FS event is received, the file contents
|
||||
// appears empty. Possibly https://github.com/nodejs/node/issues/6112
|
||||
let makeLangDebouncer;
|
||||
const makeLang = () => {
|
||||
if (makeLangDebouncer) {
|
||||
clearTimeout(makeLangDebouncer);
|
||||
}
|
||||
makeLangDebouncer = setTimeout(() => {
|
||||
const filename = genLangFile(lang, dest);
|
||||
langFileMap[lang]=filename;
|
||||
genLangList(langFileMap);
|
||||
}, 500);
|
||||
};
|
||||
|
||||
[reactSdkFile, riotWebFile].forEach(function(f) {
|
||||
chokidar.watch(f)
|
||||
.on('add', makeLang)
|
||||
.on('change', makeLang)
|
||||
.on('error', errCheck);
|
||||
});
|
||||
}
|
||||
|
||||
// language resources
|
||||
const I18N_DEST = "webapp/i18n/";
|
||||
const I18N_FILENAME_MAP = INCLUDE_LANGS.reduce((m, l) => {
|
||||
const filename = genLangFile(l.value, I18N_DEST);
|
||||
m[l.value] = filename;
|
||||
return m;
|
||||
}, {});
|
||||
genLangList(I18N_FILENAME_MAP);
|
||||
|
||||
if (watch) {
|
||||
INCLUDE_LANGS.forEach(l => watchLanguage(l.value, I18N_DEST, I18N_FILENAME_MAP));
|
||||
}
|
||||
|
||||
// non-language resources
|
||||
next(0);
|
|
@ -1,191 +0,0 @@
|
|||
#!/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)
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Automatically link to develop if we're building develop, but only if the caller
|
||||
# hasn't asked us to build something else
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ $USE_CUSTOM_SDKS == false ] && [ $BRANCH == 'develop' ]
|
||||
then
|
||||
echo "using develop dependencies for react-sdk and js-sdk"
|
||||
USE_CUSTOM_SDKS=true
|
||||
JS_SDK_BRANCH='develop'
|
||||
REACT_SDK_BRANCH='develop'
|
||||
fi
|
||||
|
||||
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 --depth 1 --branch $JS_SDK_BRANCH $JS_SDK_REPO js-sdk
|
||||
cd js-sdk
|
||||
yarn link
|
||||
yarn --network-timeout=100000 install
|
||||
cd ../
|
||||
|
||||
echo "Linking react-sdk"
|
||||
git clone --depth 1 --branch $REACT_SDK_BRANCH $REACT_SDK_REPO react-sdk
|
||||
cd react-sdk
|
||||
yarn link
|
||||
yarn link matrix-js-sdk
|
||||
yarn --network-timeout=100000 install
|
||||
cd ../
|
||||
|
||||
echo "Setting up element-web with react-sdk and js-sdk packages"
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-react-sdk
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
TAG=$(git describe --tags)
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
DIST_VERSION=$TAG
|
||||
|
||||
# If the branch comes out as HEAD then we're probably checked out to a tag, so if the thing is *not*
|
||||
# coming out as HEAD then we're on a branch. When we're on a branch, we want to resolve ourselves to
|
||||
# a few SHAs rather than a version.
|
||||
# Docker Hub doesn't always check out the tag and sometimes checks out the branch, so we should look
|
||||
# for an appropriately tagged branch as well (heads/v1.2.3).
|
||||
if [[ $BRANCH != HEAD && ! $BRANCH =~ heads/v.+ ]]
|
||||
then
|
||||
REACT_SHA=$(cd node_modules/matrix-react-sdk; git rev-parse --short=12 HEAD)
|
||||
JSSDK_SHA=$(cd node_modules/matrix-js-sdk; git rev-parse --short=12 HEAD)
|
||||
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
|
||||
DIST_VERSION=$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA
|
||||
fi
|
||||
|
||||
echo $DIST_VERSION > /src/webapp/version
|