Compare commits

..

82 Commits

Author SHA1 Message Date
RiotRobot
d56b73e220 v1.5.5 2019-11-27 10:48:52 +00:00
RiotRobot
8f9c336f62 Prepare changelog for v1.5.5 2019-11-27 10:48:52 +00:00
RiotRobot
1a6af40d0d v1.5.5 2019-11-27 10:45:54 +00:00
RiotRobot
10c5485373 Upgrade to JS SDK 2.4.5 and React SDK 1.7.4 2019-11-27 10:44:15 +00:00
J. Ryan Stinnett
c6520f0e65 Remove timeframe 2019-11-26 12:08:47 -07:00
J. Ryan Stinnett
57c3e8f4da Clarify that cross-signing is in development
Expand on the development state of cross-signing in the labs docs.

Fixes https://github.com/vector-im/riot-web/issues/11492
2019-11-26 12:08:38 -07:00
David Baker
070d5fc6e8 Sign all of the Windows executable files
We can actually just supply a custom signing module here to do our
signing rather than manually signing things in the afterSign hook.
This means all 4 executable files get signed (the main exe, the
stub exe, Update.exe and the installer).
2019-11-26 12:08:29 -07:00
RiotRobot
bf26ec9d1a v1.5.4 2019-11-25 13:40:05 +00:00
RiotRobot
b0d004d716 Prepare changelog for v1.5.4 2019-11-25 13:40:05 +00:00
RiotRobot
607c37adfd v1.5.4 2019-11-25 13:37:12 +00:00
RiotRobot
83591b4567 Released js-sdk & react-sdk 2019-11-25 13:36:37 +00:00
RiotRobot
7b59379d29 v1.5.4-rc.2 2019-11-22 17:30:05 +00:00
RiotRobot
9f3cd93bd6 Prepare changelog for v1.5.4-rc.2 2019-11-22 17:30:04 +00:00
RiotRobot
ff86c8acc7 v1.5.4-rc.2 2019-11-22 17:28:03 +00:00
RiotRobot
1cebd3dcd1 react-sdk rc.2 2019-11-22 17:27:27 +00:00
RiotRobot
fa5475f1c0 v1.5.4-rc.1 2019-11-20 18:32:56 +00:00
RiotRobot
2a564884e7 Prepare changelog for v1.5.4-rc.1 2019-11-20 18:32:56 +00:00
RiotRobot
46a6dbe9b8 v1.5.4-rc.1 2019-11-20 18:31:59 +00:00
RiotRobot
f07e3c3b25 react-sdk & js-sdk rc.1 2019-11-20 18:31:32 +00:00
David Baker
392de5a54f Merge pull request #11444 from vector-im/dbkr/doc_custom_themes
Add doc for custom themes
2019-11-20 17:43:42 +00:00
David Baker
9ed4a07b28 linewrap 2019-11-20 17:39:58 +00:00
David Baker
1b0b3e1a44 Bump to Electron 7.1.2
Tested with electron 7 and appears to be fine
2019-11-20 17:33:32 +00:00
Bruno Windels
21781adb9e explain the internal name of custom themes 2019-11-20 18:27:25 +01:00
David Baker
dc3cc37784 backticks to prevent infinitalic 2019-11-20 16:35:10 +00:00
David Baker
135d5f4cc7 Merge pull request #11442 from vector-im/dbkr/system_dark_mode
Use new theme API in react-sdk
2019-11-20 16:32:32 +00:00
David Baker
013e059ffc Add doc for custom themes
Mostly just c+ped from Bruno's PR: https://github.com/matrix-org/matrix-react-sdk/pull/3503
2019-11-20 15:40:44 +00:00
Bruno Windels
5e049efc87 Merge pull request #11441 from vector-im/bwindels/fix-roomstatus-e2e-icon
preload warning triangle
2019-11-20 14:36:41 +00:00
David Baker
7294bec1c8 Use new theme API in react-sdk
A thesis presented in two parts. This part has the absolute minimum
logic changes to the themeing code in vector/index.js because I know
how subtle and fragile this code is. However, it also looks like it's
completely duplicated from react-sdk, so in the next part I'm going
to remove that logic and make it use the logic in react-sdk, then we
can see what breaks.

Requires https://github.com/matrix-org/matrix-react-sdk/pull/3637
2019-11-20 13:43:08 +00:00
Bruno Windels
0c9f0e52bd preload warning triangle 2019-11-20 12:42:31 +01:00
David Baker
0e15bf124a Merge pull request #11440 from RiotTranslateBot/weblate-riot-web-riot-web
Update from Weblate
2019-11-20 09:59:38 +00:00
Alexis
a142a5a30c Translated using Weblate (Portuguese)
Currently translated at 87.0% (20 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/pt/
2019-11-20 05:45:16 +00:00
David Baker
a5daa142eb Merge pull request #11435 from vector-im/dbkr/audio_video_entitlements_mac
Add entitlements file for mic & camera permissions on macOS
2019-11-19 20:52:21 +00:00
David Baker
a34766bd05 Fix tabs 2019-11-19 20:38:06 +00:00
David Baker
312e1bab47 Add entitlements file for mic & camera permissions on macOS
Fixes https://github.com/vector-im/riot-web/issues/11151
2019-11-19 19:02:10 +00:00
David Baker
3cf4d15192 Merge pull request #11429 from vector-im/dbkr/aftersign_error_exception
Fix error/exception in electron signing script
2019-11-19 16:04:50 +00:00
David Baker
64c23ae18d Fix error/exception in electron signing script
'Exception' isn't a thing: Error is
2019-11-19 15:55:03 +00:00
Bruno Windels
47772f520d Merge pull request #11426 from vector-im/bwindels/merge-userinfo-flag
Merge the `feature_user_info_panel` flag into `feature_dm_verification`
2019-11-19 13:34:14 +00:00
Bruno Windels
6fc742f229 remove flag from develop config 2019-11-19 14:15:42 +01:00
Bruno Windels
c197f7996b merge the feature_user_info_panel flag into feature_dm_verification 2019-11-19 14:15:11 +01:00
Travis Ralston
efbb66ba4a Merge pull request #11409 from vector-im/travis/desktop-config
Let the user's homeserver config override the build config
2019-11-18 10:04:13 -07:00
J. Ryan Stinnett
fe6006f275 Merge pull request #11408 from vector-im/jryans/cross-signing-flag
Add cross-signing labs flag to develop and document
2019-11-18 16:57:22 +00:00
Travis Ralston
6bf03415ac Let the user's homeserver config override the build config
Specifically for the desktop app to prevent the warning about too many homeservers defined.
2019-11-18 09:11:05 -07:00
J. Ryan Stinnett
8043aebe1a Add cross-signing labs flag to develop and document
Part of https://github.com/vector-im/riot-web/issues/11407
2019-11-18 16:06:32 +00:00
David Baker
d23086a6e8 Merge pull request #11405 from RiotTranslateBot/weblate-riot-web-riot-web
Update from Weblate
2019-11-18 10:21:08 +00:00
Volodymyr Kostyrko
eabd91c29c Translated using Weblate (Ukrainian)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/uk/
2019-11-15 21:45:01 +00:00
Weblate
0eff02c69b Merge branch 'origin/develop' into Weblate. 2019-11-14 16:25:24 +00:00
Travis Ralston
515db517ca Merge pull request #11381 from vector-im/travis/base-theme
Trigger a theme change on startup, not just a tint change
2019-11-14 09:25:15 -07:00
Travis Ralston
6cf4fc1026 Trigger a theme change on startup, not just a tint change
Fixes https://github.com/vector-im/riot-web/issues/11370
2019-11-13 14:00:22 -07:00
take100yen
d7c4ef2fe7 Translated using Weblate (Japanese)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/ja/
2019-11-13 11:44:52 +00:00
Travis Ralston
2e642310b8 Merge pull request #11375 from vector-im/travis/fix-chrome-favicon
Perform favicon updates twice in Chrome
2019-11-12 15:20:43 -07:00
Travis Ralston
71fb2e04a9 fix catch block indentation 2019-11-12 15:14:11 -07:00
Travis Ralston
e84861f770 Apparently our eslint rules are different in different layers 2019-11-12 15:04:56 -07:00
Travis Ralston
ec9a38c2fe Perform favicon updates twice in Chrome
See diff for why this arcane magic is needed.

Fixes https://github.com/vector-im/riot-web/issues/11347
2019-11-12 15:02:52 -07:00
Travis Ralston
c6f62632d8 Fix config.json syntax 2019-11-12 10:12:25 -07:00
Travis Ralston
2561e3a64f Merge pull request #11275 from vector-im/travis/mjolnir
Add labs documentation for Mjolnir
2019-11-12 10:00:37 -07:00
Bruno Windels
5041e6f3d9 Merge branch 'develop' into travis/mjolnir 2019-11-11 15:47:29 +00:00
Bruno Windels
67b87e26e8 Merge pull request #11360 from vector-im/bwindels/userinfo-labs-doc
Add description of user info feature in labs doc
2019-11-11 15:45:16 +00:00
Bruno Windels
d3778ab1fd Add description of user info feature 2019-11-11 13:59:32 +00:00
David Baker
ed551c375d Merge pull request #11359 from RiotTranslateBot/weblate-riot-web-riot-web
Update from Weblate
2019-11-11 10:12:13 +00:00
Stanislav Lukeš
52a3f4e1a8 Translated using Weblate (Czech)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/cs/
2019-11-11 10:05:14 +00:00
Elwyn Malethan
b8af903703 Translated using Weblate (Welsh)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/cy/
2019-11-10 19:44:44 +00:00
Weblate
6eeeaff399 Merge branch 'origin/develop' into Weblate. 2019-11-08 22:05:21 +00:00
Travis Ralston
c14bbea0a1 Merge pull request #11356 from vector-im/travis/verif-dm-docs
Add DM verification feature to labs.md
2019-11-08 15:05:17 -07:00
Weblate
43171c05d3 Merge branch 'origin/develop' into Weblate. 2019-11-08 21:56:17 +00:00
Travis Ralston
8c899ab13f Merge pull request #11355 from vector-im/travis/labs-dm-verif
Add feature_dm_verification to labs
2019-11-08 14:56:10 -07:00
Travis Ralston
4eb0f014b8 Add DM verification feature to labs.md 2019-11-08 14:54:24 -07:00
Travis Ralston
8f13e8b2bb Add feature_dm_verification to labs 2019-11-08 14:51:07 -07:00
Weblate
4903089e41 Merge branch 'origin/develop' into Weblate. 2019-11-08 15:58:39 +00:00
J. Ryan Stinnett
2db876d12c Merge pull request #11341 from vector-im/jryans/feature-flag-process
Document feature flag process
2019-11-08 17:58:33 +02:00
J. Ryan Stinnett
d373e2891e Describe regular setting path 2019-11-08 15:57:46 +00:00
J. Ryan Stinnett
8b0257d24b Apply suggestions from code review
Co-Authored-By: Travis Ralston <travpc@gmail.com>
2019-11-08 15:57:09 +00:00
J. Ryan Stinnett
fa3d3aa4dd Absolute URLs 2019-11-08 15:55:01 +00:00
J. Ryan Stinnett
9ca438087e Add numbers 2019-11-08 15:55:01 +00:00
J. Ryan Stinnett
037d8c071c Document feature flag process
This records the feature flag process we intend to use with Riot and also how
that interacts with other teams and configuration.

Fixes https://github.com/vector-im/riot-web/issues/11116
2019-11-08 15:55:01 +00:00
Weblate
89bb2dba38 Merge branch 'origin/develop' into Weblate. 2019-11-08 11:23:24 +00:00
shuji narazaki
f61aae7e3f Translated using Weblate (Japanese)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/ja/
2019-11-08 11:23:24 +00:00
J. Ryan Stinnett
ceacf3bf54 Merge pull request #11343 from vector-im/jryans/clean-flags
Remove unused feature flags
2019-11-08 13:23:17 +02:00
J. Ryan Stinnett
5e4e382dec Remove unused feature flags 2019-11-07 15:01:39 +00:00
Travis Ralston
956c199fcf Add some docs to describe Mjolnir and Ban Lists 2019-11-06 12:25:34 -07:00
Weblate
36f9d37487 Merge branch 'origin/develop' into Weblate. 2019-11-06 14:33:27 +00:00
dreamerchris
146ccc37a2 Translated using Weblate (Greek)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/el/
2019-11-06 13:44:29 +00:00
Travis Ralston
1b4f4b6b65 Add labs documentation for Mjolnir 2019-10-31 13:21:15 -06:00
23 changed files with 500 additions and 112 deletions

View File

@@ -1,3 +1,68 @@
Changes in [1.5.5](https://github.com/vector-im/riot-web/releases/tag/v1.5.5) (2019-11-27)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.4...v1.5.5)
* Upgrade to JS SDK 2.5.4 to relax identity server discovery and E2EE debugging
* Upgrade to React SDK 1.7.4 to fix override behaviour of themes
* Clarify that cross-signing is in development
* Sign all of the Windows executable files
Changes in [1.5.4](https://github.com/vector-im/riot-web/releases/tag/v1.5.4) (2019-11-25)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.4-rc.2...v1.5.4)
* No changes since rc.2
Changes in [1.5.4-rc.2](https://github.com/vector-im/riot-web/releases/tag/v1.5.4-rc.2) (2019-11-22)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.4-rc.1...v1.5.4-rc.2)
* react-sdk rc.2 to fix an error in Safari and some cosmetic
bugs
Changes in [1.5.4-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.5.4-rc.1) (2019-11-20)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.3...v1.5.4-rc.1)
* Add doc for custom themes
[\#11444](https://github.com/vector-im/riot-web/pull/11444)
* Use new theme API in react-sdk
[\#11442](https://github.com/vector-im/riot-web/pull/11442)
* preload warning triangle
[\#11441](https://github.com/vector-im/riot-web/pull/11441)
* Update from Weblate
[\#11440](https://github.com/vector-im/riot-web/pull/11440)
* Add entitlements file for mic & camera permissions on macOS
[\#11435](https://github.com/vector-im/riot-web/pull/11435)
* Fix error/exception in electron signing script
[\#11429](https://github.com/vector-im/riot-web/pull/11429)
* Merge the `feature_user_info_panel` flag into `feature_dm_verification`
[\#11426](https://github.com/vector-im/riot-web/pull/11426)
* Let the user's homeserver config override the build config
[\#11409](https://github.com/vector-im/riot-web/pull/11409)
* Add cross-signing labs flag to develop and document
[\#11408](https://github.com/vector-im/riot-web/pull/11408)
* Update from Weblate
[\#11405](https://github.com/vector-im/riot-web/pull/11405)
* Trigger a theme change on startup, not just a tint change
[\#11381](https://github.com/vector-im/riot-web/pull/11381)
* Perform favicon updates twice in Chrome
[\#11375](https://github.com/vector-im/riot-web/pull/11375)
* Add labs documentation for Mjolnir
[\#11275](https://github.com/vector-im/riot-web/pull/11275)
* Add description of user info feature in labs doc
[\#11360](https://github.com/vector-im/riot-web/pull/11360)
* Update from Weblate
[\#11359](https://github.com/vector-im/riot-web/pull/11359)
* Add DM verification feature to labs.md
[\#11356](https://github.com/vector-im/riot-web/pull/11356)
* Add feature_dm_verification to labs
[\#11355](https://github.com/vector-im/riot-web/pull/11355)
* Document feature flag process
[\#11341](https://github.com/vector-im/riot-web/pull/11341)
* Remove unused feature flags
[\#11343](https://github.com/vector-im/riot-web/pull/11343)
Changes in [1.5.3](https://github.com/vector-im/riot-web/releases/tag/v1.5.3) (2019-11-06)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.2...v1.5.3)

View File

@@ -22,9 +22,10 @@ For a good example, see https://riot.im/develop/config.json.
`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 Riot 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. The available features are described in [labs.md](labs.md).
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

112
docs/feature-flags.md Normal file
View File

@@ -0,0 +1,112 @@
# Feature flags
When developing new features for Riot, 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):
```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 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
Set the feature to `enable` in the [develop config](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json):
```json
"features": {
"feature_cats": "enable"
},
```
## Enabling by default on staging and app
Set the feature to `enable` in the [app
config](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json).
## 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)
and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/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)
and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json)
configs

View File

@@ -49,3 +49,27 @@ 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 Riot. 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.
## Cross-signing (in development) (`feature_cross_signing`)
Cross-signing ([MSC1756](https://github.com/matrix-org/matrix-doc/pull/1756))
improves the device verification experience by allowing you to verify a user
instead of verifying each of their devices.
This feature is still in development and will be landing in several chunks.

View File

@@ -11,11 +11,11 @@ As of Jan 2017, skins are not fully supported; riot is the only available skin.
To define a theme for Riot:
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)
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
@@ -23,3 +23,58 @@ To define a theme for Riot:
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,
"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"
}
}, {
"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"
}
}
]
}
```

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Entitlements from electron-builder's defaults
(https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/entitlements.mac.plist)
nb. This does *not* include the app sandbox: at the time of adding this file,
we were using electron-builder 21.2.0 which does not have the sandbox entitlement.
Latest electron-builder does, but it appears to be causing issues:
(https://github.com/electron-userland/electron-builder/issues/4390)
-->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- https://github.com/electron-userland/electron-builder/issues/3940 -->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<!-- Our own additional entitlements (we need to access the camera and
mic for VoIP calls -->
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
</dict>
</plist>

View File

@@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "src/electron-main.js",
"version": "1.5.3",
"version": "1.5.5",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"dependencies": {

View File

@@ -77,6 +77,18 @@ try {
try {
// Load local config and use it to override values from the one baked with the build
const localConfig = require(path.join(app.getPath('userData'), 'config.json'));
// If the local config has a homeserver defined, don't use the homeserver from the build
// config. This is to avoid a problem where Riot thinks there are multiple homeservers
// defined, and panics as a result.
const homeserverProps = ['default_is_url', 'default_hs_url', 'default_server_name', 'default_server_config'];
if (Object.keys(localConfig).find(k => homeserverProps.includes(k))) {
// Rip out all the homeserver options from the vector config
vectorConfig = Object.keys(vectorConfig)
.filter(k => !homeserverProps.includes(k))
.reduce((obj, key) => {obj[key] = vectorConfig[key]; return obj;}, {});
}
vectorConfig = Object.assign(vectorConfig, localConfig);
} catch (e) {
// Could not load local config, this is expected in most cases.

View File

@@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "electron_app/src/electron-main.js",
"version": "1.5.3",
"version": "1.5.5",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -74,8 +74,8 @@
"gemini-scrollbar": "github:matrix-org/gemini-scrollbar#91e1e566",
"gfm.css": "^1.1.2",
"highlight.js": "^9.13.1",
"matrix-js-sdk": "2.4.3",
"matrix-react-sdk": "1.7.2",
"matrix-js-sdk": "2.4.5",
"matrix-react-sdk": "1.7.4",
"modernizr": "^3.6.0",
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz",
"prop-types": "^15.7.2",
@@ -155,7 +155,7 @@
},
"build": {
"appId": "im.riot.app",
"electronVersion": "6.1.4",
"electronVersion": "7.1.2",
"files": [
"node_modules/**",
"src/**"
@@ -186,7 +186,8 @@
"win": {
"target": {
"target": "squirrel"
}
},
"sign": "scripts/electron_winSign"
},
"directories": {
"buildResources": "electron_app/build",

View File

@@ -25,8 +25,6 @@
}
},
"features": {
"feature_lazyloading": "enable",
"feature_room_breadcrumbs": "labs"
},
"roomDirectory": {
"servers": [

View File

@@ -13,22 +13,14 @@
"hosting_signup_link": "https://modular.im/?utm_source=riot-web&utm_medium=web",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_rich_quoting": "labs",
"feature_pinning": "labs",
"feature_presence_management": "labs",
"feature_sticker_messages": "labs",
"feature_jitsi": "labs",
"feature_tag_panel": "enable",
"feature_keybackup": "labs",
"feature_custom_status": "labs",
"feature_custom_tags": "labs",
"feature_lazyloading": "enable",
"feature_tabbed_settings": "labs",
"feature_sas": "labs",
"feature_room_breadcrumbs": "labs",
"feature_state_counters": "labs",
"feature_many_integration_managers": "labs",
"feature_user_info_panel": "labs"
"feature_mjolnir": "labs",
"feature_dm_verification": "labs",
"feature_cross_signing": "labs"
},
"welcomeUserId": "@riot-bot:matrix.org",
"piwik": {

View File

@@ -1,7 +1,4 @@
const { notarize } = require('electron-notarize');
const { exec, execFile } = require('child_process');
const fs = require('fs');
const shellescape = require('shell-escape');
exports.default = async function(context) {
const { electronPlatformName, appOutDir } = context;
@@ -13,7 +10,7 @@ exports.default = async function(context) {
// from the keychain, so we need to get it from the environment.
const userId = process.env.NOTARIZE_APPLE_ID;
if (userId === undefined) {
throw new Exception("User ID not found. Set NOTARIZE_APPLE_ID.");
throw new Error("User ID not found. Set NOTARIZE_APPLE_ID.");
}
console.log("Notarising macOS app. This may be some time.");
@@ -23,54 +20,5 @@ exports.default = async function(context) {
appleId: userId,
appleIdPassword: '@keychain:NOTARIZE_CREDS',
});
} else if (electronPlatformName === 'win32') {
// This signs the actual Riot executable
const appName = context.packager.appInfo.productFilename;
// get the token passphrase from the keychain
const tokenPassphrase = await new Promise((resolve, reject) => {
execFile(
'security',
['find-generic-password', '-s', 'riot_signing_token', '-w'],
{},
(err, stdout) => {
if (err) {
reject(err);
} else {
resolve(stdout.trim());
}
},
);
});
return new Promise((resolve, reject) => {
let cmdLine = 'osslsigncode sign ';
if (process.env.OSSLSIGNCODE_SIGNARGS) {
cmdLine += process.env.OSSLSIGNCODE_SIGNARGS + ' ';
}
const tmpFile = 'tmp_' + Math.random().toString(36).substring(2, 15) + '.exe';
cmdLine += shellescape([
'-pass', tokenPassphrase,
'-in', `${appOutDir}/${appName}.exe`,
'-out', `${appOutDir}/${tmpFile}`,
]);
const signproc = exec(cmdLine, {}, (error, stdout) => {
console.log(stdout);
});
signproc.on('exit', (code) => {
if (code !== 0) {
reject("osslsigncode failed with code " + code);
return;
}
fs.rename(`${appOutDir}/${tmpFile}`, `${appOutDir}/${appName}.exe`, (err) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
});
}
};

View File

@@ -0,0 +1,66 @@
const { exec, execFile } = require('child_process');
const fs = require('fs');
const path = require('path');
const shellescape = require('shell-escape');
exports.default = async function(options) {
const inPath = options.path;
const appOutDir = path.dirname(inPath);
// get the token passphrase from the keychain
const tokenPassphrase = await new Promise((resolve, reject) => {
execFile(
'security',
['find-generic-password', '-s', 'riot_signing_token', '-w'],
{},
(err, stdout) => {
if (err) {
console.error("Couldn't find signing token in keychain", err);
// electron-builder seems to print '[object Object]' on the
// console whether you reject with an Error or a string...
reject(err);
} else {
resolve(stdout.trim());
}
},
);
});
return new Promise((resolve, reject) => {
let cmdLine = 'osslsigncode sign ';
if (process.env.OSSLSIGNCODE_SIGNARGS) {
cmdLine += process.env.OSSLSIGNCODE_SIGNARGS + ' ';
}
const tmpFile = path.join(
appOutDir,
'tmp_' + Math.random().toString(36).substring(2, 15) + '.exe',
);
const args = [
'-hash', options.hash,
'-pass', tokenPassphrase,
'-in', inPath,
'-out', tmpFile,
];
if (options.isNest) args.push('-nest');
cmdLine += shellescape(args);
const signproc = exec(cmdLine, {}, (error, stdout) => {
console.log(stdout);
});
signproc.on('exit', (code) => {
if (code !== 0) {
console.error("osslsigncode failed with code " + code);
reject("osslsigncode failed with code " + code);
return;
}
fs.rename(tmpFile, inPath, (err) => {
if (err) {
console.error("Error renaming file", err);
reject(err);
} else {
resolve();
}
});
});
});
};

View File

@@ -41,6 +41,13 @@
"Sign In": "Přihlásit se",
"Create Account": "Vytvořit účet",
"Need help?": "Chcete pomoct?",
"Explore rooms": "Objevit místnosti",
"Room Directory": "Adresář místností"
"Explore rooms": "Prohlížet místnosti",
"Room Directory": "Adresář místností",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Konfigurace Riotu obsahuje neplatný JSON. Opravte prosím tento problém a obnovte stránku.",
"The message from the parser is: %(message)s": "Zpráva z parseru je: %(message)s",
"Invalid JSON": "Neplatný JSON",
"Your Riot is misconfigured": "Riot je špatně nakonfigurován",
"Unexpected error preparing the app. See console for details.": "Neočekávaná chyba při přípravě aplikace. V konzoli je více informací.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Neplatná konfigurace: je možné specifikovat pouze jednu volbu z default_server_config, default_server_name, nebo default_hs_url.",
"Invalid configuration: no default server specified.": "Neplatná konfigurace: není zadán výchozí server."
}

View File

@@ -1 +1,25 @@
{}
{
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Mae eich gosodiadau Riot yn cynnwys JSON annilys. Cywirwch y broblem ac ail-lwythwch y dudalen.",
"The message from the parser is: %(message)s": "Y neges gan y dosrannudd yn: %(message)s",
"Invalid JSON": "JSON annilys",
"Your Riot is misconfigured": "Mae eich Riot wedi'i gamosod",
"Unexpected error preparing the app. See console for details.": "Gwall annisgwyl wrth baratoi'r app. Gweler y consol am fanylion.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Gosodiad annilys: dim ond un o default_server_config, default_server_name, neu default_hs_url y gall ei nodi.",
"Invalid configuration: no default server specified.": "Gosodiad annilys: ni nodwyd gweinydd diofyn.",
"Riot Desktop on %(platformName)s": "Riot Cyfrifiadur ar %(platformName)s",
"Unknown device": "Dyfais anhysbys",
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s trwy %(browserName)s ar %(osName)s",
"You need to be using HTTPS to place a screen-sharing call.": "Mae angen i chi fod yn defnyddio HTTPS i osod galwad rhannu sgrin.",
"powered by Matrix": "pwerwyd gan Matrix",
"Custom Server Options": "Opsiynau Gweinydd Addasadwy",
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Gallwch ddefnyddio'r opsiynau gweinydd addasadwy i mewngofnodi i mewn i weinyddion Matrix eraill trwy rhoi URL hafanweinydd gwahanol. Mae hyn yn caniatáu ichi ddefnyddio Riot gyda chyfrif Matrix sy'n bodoli eisoes ar hafanweinydd gwahanol.",
"Dismiss": "Wfftio",
"Welcome to Riot.im": "Croeso i Riot.im",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Sgwrsio a chydweithredu datganoledig a amgryptiedig â phwerwyd gan [matrix]",
"Sign In": "Mewngofnodi",
"Create Account": "Creu Cyfrif",
"Need help?": "Angen cymorth?",
"Chat with Riot Bot": "Sgwrsio gyda Riot Bot",
"Explore rooms": "Archwilio Ystafelloedd",
"Room Directory": "Cyfeiriadur Ystafelloedd"
}

View File

@@ -4,11 +4,11 @@
"Dismiss": "Απόρριψη",
"Riot Desktop on %(platformName)s": "Riot Desktop σε %(platformName)s",
"Unknown device": "Άγνωστη συσκευή",
"You need to be using HTTPS to place a screen-sharing call.": "Απαιτείται η χρήση HTTPS για το διαμοιρασμό της επιφάνειας εργασίας μέσω κλήσης.",
"You need to be using HTTPS to place a screen-sharing call.": "Απαιτείται η χρήση HTTPS για την πραγματοποίηση κλήσης διαμοιρασμού επιφάνειας εργασίας.",
"Riot is not supported on mobile web. Install the app?": "Το Riot δεν υποστηρίζεται από περιηγητές κινητών. Θέλετε να εγκαταστήσετε την εφαρμογή;",
"powered by Matrix": "με τη βοήθεια του Matrix",
"powered by Matrix": "λειτουργεί με το Matrix",
"Welcome to Riot.im": "Καλώς ήλθατε στο Riot.im",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Αποκεντρωμένη, κρυπτογραφημένη συνομιλία &amp; συνεργασία με τη βοήθεια του [matrix]",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Αποκεντρωμένη, κρυπτογραφημένη συνομιλία και συνεργασία χρησιμοποιώντας το [matrix]",
"Search the room directory": "Αναζήτηση στο ευρετήριο δωματίων",
"Chat with Riot Bot": "Συνομιλία με το Riot Bot",
"Get started with some tips from Riot Bot!": "Ξεκινήστε με μερικές συμβουλές από το Riot Bot!",
@@ -39,5 +39,14 @@
"Sign In": "Σύνδεση",
"Create Account": "Δημιουργία Λογαριασμού",
"Need help?": "Χρειάζεστε βοήθεια;",
"Room Directory": "Ευρετήριο δωματίων"
"Room Directory": "Ευρετήριο δωματίων",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Η ρύθμιση παραμέτρων σας του Riot περιλαμβάνει μη έγκυρο JSON. Παρακαλώ διορθώστε το πρόβλημα και επαναφορτώστε την σελίδα.",
"The message from the parser is: %(message)s": "Το μήνυμα από τον αναλυτή είναι: %(message)s",
"Invalid JSON": "Μη έγκυρο JSON",
"Your Riot is misconfigured": "Οι παράμετροι του Riot σας είναι λανθασμένα ρυθμισμένοι",
"Unexpected error preparing the app. See console for details.": "Απρόοπτο σφάλμα κατά την προετοιμασία της εφαρμογής. Δείτε το τερματικό για λεπτομέρειες.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Μη έγκυρη ρύθμιση παραμέτρων: δυνατότητα ορισμού μόνο ένα από τα default_server_config, default_server_name, ή default_hs_url.",
"Invalid configuration: no default server specified.": "Μη έγκυρη ρύθμιση παραμέτρων: δεν έχει οριστεί προκαθορισμένος διακομιστής.",
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Μπορείτε να χρησιμοποιήσετε τις επιλογές προσαρμοσμένου διακομιστή για να κάνετε σύνδεση σε άλλους διακομιστές Matrix με το να ορίσετε διαφορετικό URL διακομιστή φιλοξενίας. Αυτό σας επιτρέπει να χρησιμοποιήσετε το Riot με έναν υπάρχον λογαριασμό Matrix σε ένα διαφορετικό διακομιστή φιλοξενίας.",
"Explore rooms": "Εξερευνήστε δωμάτια"
}

View File

@@ -10,7 +10,7 @@
"powered by Matrix": "Matrix の支援により活動しています。",
"Riot Desktop on %(platformName)s": "%(platformName)s向けデスクトップ版Riot",
"You need to be using HTTPS to place a screen-sharing call.": "画面共有通話を行うにはHTTPS通信を使う必要があります。",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "[matrix]が支援する、分散型で暗号化された会話とコラボレーション",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "[matrix] による、分散型で暗号化された会話とコラボレーション",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "既にたくさんの部屋が、既存のネットワークSlack、IRC、Gitter等に接続して、または独立的にMatrixに存在します。ディレクトリを検索してください",
"Chat with Riot Bot": "Riot Botと会話",
"Get started with some tips from Riot Bot!": "Riot Botにヒントをもらって始めましょう",
@@ -37,7 +37,7 @@
"Dev chat for the Dendrite dev team": "Dendrite開発者チームのための開発者チャット",
"Co-ordination for Riot translators": "Riot 翻訳者による共同作業",
"Unexpected error preparing the app. See console for details.": "アプリケーションの準備中に予期しないエラーが発生しました。詳細はコンソールを参照してください。",
"Your Riot is misconfigured": "あなたの Riot は間違って設定されています",
"Your Riot is misconfigured": "あなたのRiotは設定が間違っています",
"Invalid configuration: no default server specified.": "不正な設定です:デフォルトのサーバーが設定されていません。",
"Sign In": "サインイン",
"Create Account": "アカウントを作成する",

View File

@@ -35,5 +35,18 @@
"Dev chat for the Dendrite dev team": "Conversa de desenvolvimento para a equipa do Dendrite",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Já existem muitas salas no Matrix, ligadas a redes já existentes (Slack, IRC, Gitter, etc) ou independentes. Dê uma vista de olhos no diretório!",
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Você pode usar as opções de servidor personalizado para entrar em outros servidores Matrix, especificando um diferente URL de servidor doméstico.<br/>Isto permite que você utilize Riot com uma conta Matrix existente em um servidor doméstico diferente.<br/><br/>Você também pode definir um servidor de identidade personalizado, porém não poderá convidar usuários por endereço de e-mail nem ser convidado por endereço de e-mail.",
"Co-ordination for Riot translators": "Coordenação para tradutores do Riot"
"Co-ordination for Riot translators": "Coordenação para tradutores do Riot",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "A sua configuração do RIOT contém JSON inválido. Por favor corriga o erro e recarregue a página.",
"The message from the parser is: %(message)s": "A mensagem do parser é:\n%(message)s",
"Invalid JSON": "JSON inválido.",
"Your Riot is misconfigured": "A sua configuração do RIOT está incorrecta.",
"Unexpected error preparing the app. See console for details.": "Erro inesperado, na preparação da aplicação. Veja consola, para mais detalhes.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuração inválida: só pode especificar uma das default_server_config, default_server_name,\nor default_hs_url.",
"Invalid configuration: no default server specified.": "Configuração inválida: não existe especificação de servidor padrão.",
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Pode usar as opções de custom server, para iniciar sessão noutros servidores Matrix.org, especificando o URL do homeserver diferente. Isto ira lhe atorizar a usar RIOT com a sua conta Matrix num servidor diferente",
"Sign In": "Iniciar sessão",
"Create Account": "Criar conta",
"Need help?": "Ajuda?",
"Explore rooms": "Explorar rooms",
"Room Directory": "Diretório de rooms"
}

View File

@@ -40,10 +40,14 @@
"You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "Ви також можете встановити власний сервер ідентифікації, але Ви не зможете запрошувати користувачів (або бути запрошеним самому) за адресою електронної пошти.",
"Need help?": "Допомогти?",
"Sign In": "Вхід",
"Create Account": "Створити аккаунт",
"Create Account": "Створити акаунт",
"Explore rooms": "Дослідити кімнати",
"Room Directory": "Каталог кімнат",
"Unexpected error preparing the app. See console for details.": "Неочікувана помилка при підготовці програми. Дивіться деталі у виводі консолі.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Невірна конфігурація: можна вказати лише default_server_config, default_server_name або default_hs_url.",
"Invalid configuration: no default server specified.": "Невірна конфігурація: не вказано сервер за замовчуванням."
"Invalid configuration: no default server specified.": "Невірна конфігурація: не вказано сервер за замовчуванням.",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Ваша конфігурація Riot містить некоректний JSON. Виправте проблему та оновіть сторінку.",
"The message from the parser is: %(message)s": "Повідомлення від парсера: %(message)s",
"Invalid JSON": "Хибний JSON",
"Your Riot is misconfigured": "Ваш Riot налаштовано неправильно"
}

View File

@@ -43,6 +43,7 @@
<script src="<%= htmlWebpackPlugin.files.chunks['bundle'].entry %>"></script>
<img src="<%= require('matrix-react-sdk/res/img/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/e2e/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/feather-customised/warning-triangle.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<audio id="messageAudio">
<source src="media/message.ogg" type="audio/ogg" />
<source src="media/message.mp3" type="audio/mpeg" />

View File

@@ -56,8 +56,8 @@ import WebPlatform from './platform/WebPlatform';
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
import Tinter from 'matrix-react-sdk/lib/Tinter';
import SdkConfig from "matrix-react-sdk/lib/SdkConfig";
import {getBaseTheme, setTheme, ThemeWatcher} from "matrix-react-sdk/lib/theme";
import Olm from 'olm';
@@ -255,15 +255,19 @@ async function loadApp() {
}
// as quickly as we possibly can, set a default theme...
// we do this by checking to see if the theme's "base" has loaded first so we can
// safely rely on the assets.
let a;
const theme = SettingsStore.getValue("theme");
const themeWatcher = new ThemeWatcher();
const theme = themeWatcher.getEffectiveTheme();
const baseTheme = getBaseTheme(theme);
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
const href = a.getAttribute("href");
if (!href) continue;
// shouldn't we be using the 'title' tag rather than the href?
const match = href.match(/^bundles\/.*\/theme-(.*)\.css$/);
if (match) {
if (match[1] === theme) {
if (match[1] === baseTheme) {
// remove the disabled flag off the stylesheet
// Firefox requires setting the attribute to false, so do
@@ -274,21 +278,21 @@ async function loadApp() {
// in case the Tinter.tint() in MatrixChat fires before the
// CSS has actually loaded (which in practice happens)...
// This if fixes Tinter.setTheme to not fire on Firefox
// This if fixes setTheme to not fire on Firefox
// in case it is the first time loading Riot.
// `InstallTrigger` is a Object which only exists on Firefox
// (it is used for their Plugins) and can be used as a
// feature check.
// Firefox loads css always before js. This is why we dont use
// onload or it's EventListener as thoose will never trigger.
// onload or it's EventListener as those will never trigger.
if (typeof InstallTrigger !== 'undefined') {
Tinter.setTheme(theme);
setTheme(theme);
} else {
// FIXME: we should probably block loading the app or even
// showing a spinner until the theme is loaded, to avoid
// flashes of unstyled content.
a.onload = () => {
Tinter.setTheme(theme);
setTheme(theme);
};
}
} else {

View File

@@ -85,9 +85,29 @@ export default class VectorBasePlatform extends BasePlatform {
bgColor = "#f00";
}
this.favicon.badge(notif, {
bgColor: bgColor,
});
const doUpdate = () => {
this.favicon.badge(notif, {
bgColor: bgColor,
});
};
doUpdate();
// HACK: Workaround for Chrome 78+ and dependency incompatibility.
// The library we use doesn't appear to work in Chrome 78, likely due to their
// changes surrounding tab behaviour. Tabs went through a bit of a redesign and
// restructuring in Chrome 78, so it's not terribly surprising that the library
// doesn't work correctly. The library we use hasn't been updated in years and
// does not look easy to fix/fork ourselves - we might as well write our own that
// doesn't include animation/webcam/etc support. However, that's a bit difficult
// so for now we'll just trigger the update twice.
//
// Note that trying to reproduce the problem in isolation doesn't seem to work:
// see https://gist.github.com/turt2live/5ab87919918adbfd7cfb8f1ad10f2409 for
// an example (you'll need your own web server to host that).
if (window.chrome) {
doUpdate();
}
} catch (e) {
console.warn(`Failed to set badge count: ${e.message}`);
}

View File

@@ -3337,7 +3337,7 @@ es6-promisify@^5.0.0:
dependencies:
es6-promise "^4.0.3"
escape-html@~1.0.3:
escape-html@^1.0.3, escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
@@ -4259,6 +4259,11 @@ glob-to-regexp@^0.3.0:
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
glob2base@^0.0.12:
version "0.0.12"
resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
@@ -5955,10 +5960,10 @@ math-random@^1.0.1:
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==
matrix-js-sdk@2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.4.3.tgz#23b78cc707a02eb0ce7eecb3aa50129e46dd5b6e"
integrity sha512-8qTqILd/NmTWF24tpaxmDIzkTk/bZhPD5N8h69PlvJ5Y6kMFctpRj+Tud5zZjl5/yhO07+g+JCyDzg+AagiM/A==
matrix-js-sdk@2.4.5:
version "2.4.5"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.4.5.tgz#0a02f0a3e18c59a393b34b8d6ebc54226cce6465"
integrity sha512-Mh0fPoiqyXRksFNYS4/2s20xAklmYVIgSms3qFvLhno32LN43NizUoAMBYYGtyjt8BQi+U77lbNL0s5f2V7gPQ==
dependencies:
another-json "^0.2.0"
babel-runtime "^6.26.0"
@@ -5979,10 +5984,10 @@ matrix-mock-request@^1.2.3:
bluebird "^3.5.0"
expect "^1.20.2"
matrix-react-sdk@1.7.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-1.7.2.tgz#4c16fa6c2d188311ecb5163773dfdf7ca92b7ecc"
integrity sha512-CWCr41sRBeUChlvec6eJxmY02g+Re6PN3lt9tR7TkqGKyUu++Y72WPfirM+0t11QVtVyZ5Wo1WIzpropLBFyYw==
matrix-react-sdk@1.7.4:
version "1.7.4"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-1.7.4.tgz#06c50b20519ec4de3976b9a6b80eca70d8ef9809"
integrity sha512-AHiCr0zSDh2cHQF/CiT9ez7F9B+uFQ+XIfTGFbeI22MfY61Vhye8UIVwP7cOMFJ7Ow+wE6470iiscg+boBbRyg==
dependencies:
babel-plugin-syntax-dynamic-import "^6.18.0"
babel-runtime "^6.26.0"
@@ -5998,6 +6003,7 @@ matrix-react-sdk@1.7.2:
diff-match-patch "^1.0.4"
emojibase-data "^4.0.2"
emojibase-regex "^3.0.0"
escape-html "^1.0.3"
file-saver "^1.3.3"
filesize "3.5.6"
flux "2.1.1"
@@ -6007,13 +6013,14 @@ matrix-react-sdk@1.7.2:
gemini-scrollbar "github:matrix-org/gemini-scrollbar#91e1e566"
gfm.css "^1.1.1"
glob "^5.0.14"
glob-to-regexp "^0.4.1"
highlight.js "^9.15.8"
is-ip "^2.0.0"
isomorphic-fetch "^2.2.1"
linkifyjs "^2.1.6"
lodash "^4.17.14"
lolex "4.2"
matrix-js-sdk "2.4.3"
matrix-js-sdk "2.4.5"
optimist "^0.6.1"
pako "^1.0.5"
png-chunks-extract "^1.0.0"