Commit Graph

45 Commits (7921a6cbf86b035d2b0c1daecb4c24beaf5a5abc)

Author SHA1 Message Date
Michael Weimann 7921a6cbf8
Apply prettier formatting 2022-12-09 13:28:29 +01:00
Michael Weimann cbf5c43ae7
Update to eslint-plugin-matrix-org 0.8 (#23825)
* Update to eslint-plugin-matrix-org 0.8

* Exclude some eslint rules for specs

* Fix eslint tests path
2022-11-23 16:24:36 +00:00
Michael Telatynski 172f2f3993
Fix tests and convert to RTL (#23474) 2022-10-13 09:22:34 +01:00
Michael Telatynski 66798c75b5
Trim /version file response (#23473) 2022-10-13 05:52:38 +01:00
Michael Telatynski 2ef6abbfb8
Move from `browser-request` to `fetch` (#23427) 2022-10-12 18:59:10 +01:00
Kerry 0e8e472138
Device manager - tweak string formatting of default device name (#23457)
* tweak string formatting of default device name

* cheaters path to beating quality gate

* more electronplatform test coverage

* remove test that throw errors

* cover some more window.electrons

* more coverage

* empty line
2022-10-12 15:35:52 +02:00
Michael Telatynski 017dfb6606
Write additional tests (#22802)
* Write additional tests

* Make Sonar happier
2022-07-11 13:22:37 +01:00
Michael Telatynski 2c0965c240
Abstract electron settings properly to avoid boilerplate-hell (#22491)
* Remove unused method `BasePlatform::screenCaptureErrorString`

* Extract SeshatIndexManager into its own file

* Improve platform typescripting

* Consolidate IPC call promisification into IPCManager

* Abstract electron settings properly to avoid boilerplate-hell

* i18n

* Iterate PR
2022-06-10 22:38:46 +01:00
Michael Telatynski ca98529bd2
Improve code as per Sonar suggestions (#22224) 2022-05-16 16:47:12 +01:00
James Salter 2ffb3a1180
Pass the version in the updated param to attempt to cache bust (#21912) 2022-04-25 14:15:21 +01:00
James Salter ff89eef01a
Ensure updated=1 is set as the query string before any # (#21605)
* Ensure updated=1 is set as the query string before any #

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-04-20 15:12:24 +01:00
James Salter adad5e16c2
Fix page reloading on initial update (#21410)
Remove the hash event listener before reloading the page, as the reload was being swallowed by our router.

Along the way, refactor out routing logic form app.tsx to avoid causing a circular import.
2022-03-16 12:20:06 +00:00
James Salter 9223d93450
Check for update on load and refresh if available (#21272)
* Reload the page if we're stale on load
* Set updated=1
2022-03-03 14:36:12 +00:00
Germain 23b21c940c
Open thread on native notification click (#20176) 2021-12-15 08:34:54 +00:00
Aaron R df84c48d73
Fix imports to work with new lint rules (#19532)
* Add eslint-plugin-import

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* Autofix + move comments manually

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* Manual fix

Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-12-09 15:57:46 -07:00
James Salter b0abbfacd4
Fix Docker build versioning (#20077)
* Centralise version scripts and fix Docker version
* Refactor generation of a git-hash-based version into get-version-from-git
* Refactor normalization of versions (stripping leading v) into normalize-version.sh
* Call get-version-from-git from ci_package.sh, call normalize-version from package.sh
* Refactor docker-write-version.sh into docker-package.sh, which both writes the
  version file and invokes yarn build passing VERSION
* Normalize the version received from the server
2021-12-07 15:11:01 +11:00
James Salter 60788da1a3
Normalize the local app version (#20061)
We need to strip the leading v from the local app version in pollForUpdate to ensure it compares correctly the version from the /version request indicating what the latest available version is. Previously, we only stripped the leading in getAppVersion which is used in some other places but not to decide whether an update is available.
2021-12-06 23:12:29 +11:00
James Salter 194aeac19e
Get version from build VERSION variable (#19857)
* Fetch version from VERSION set during build
* When polling for new versions, compare to VERSION set during build
* Strip leading v from version, matching package.sh
2021-11-23 18:42:24 +11:00
Dariusz Niemczyk db01bfc0fd Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
2021-10-19 10:14:31 +02:00
Dariusz Niemczyk 515a8d2097 Fix wrong type call for window.location.reload 2021-10-19 10:14:31 +02:00
Michael Telatynski e136afe2eb Conform to new typescript eslint rules 2021-07-19 22:47:32 +01:00
J. Ryan Stinnett 491b179971 Auto-fix lint errors 2021-06-30 13:28:31 +01:00
Michael Telatynski e15d1c1501
Update src/vector/platform/WebPlatform.ts 2021-02-11 16:27:30 +00:00
Ibragim/Parviz Bekliev 92a5787528 Migrating from Node's deprecated `url` API to browser's `URL`
Related to https://github.com/vector-im/element-web/pull/16292

Signed-off-by: Bekliev Parviz <nightkon95@gmail.com>
2021-02-11 18:59:59 +03:00
J. Ryan Stinnett 0bbcda09af Move into constructor 2021-01-15 12:35:42 +00:00
J. Ryan Stinnett e077d9ca5f Move service worker into platform 2021-01-15 12:25:21 +00:00
Alexandru M Stan 35d1c0d980 webplatform: Fix notification closing
After a notification arrives, when the user focuses on element, the
notification never goes away (unless directly interacted with), this was a bug.

displayNotification was never returning the notification handle, which means
that matrix-react-sdk later on had no way to .close it.

Closes #16026

Signed-off-by: Alexandru M Stan <alex@hypertriangle.com>
2020-12-24 02:01:40 -08:00
Michael Telatynski 1edbe36547 Revert "Tidy up Service Worker, only run Workbox in production"
This reverts commit c47532fe

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-01 14:04:32 +01:00
Michael Telatynski 87c42934ea Revert "Disable workbox when running in webpack dev server, not in dev mode"
This reverts commit 11e676ce

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-01 14:04:21 +01:00
Michael Telatynski daa755017e Revert "consolidate"
This reverts commit aa2f3918

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-01 14:04:11 +01:00
Michael Telatynski aa2f3918cc consolidate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-30 17:36:57 +01:00
Michael Telatynski 11e676cee0 Disable workbox when running in webpack dev server, not in dev mode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-30 17:35:12 +01:00
Michael Telatynski c47532fe2a Tidy up Service Worker, only run Workbox in production
Moves ServiceWorker load into Platform so its not done by Electron

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-24 13:01:34 +01:00
J. Ryan Stinnett 715a4f8dac Restore device name 2020-07-15 09:38:55 +01:00
J. Ryan Stinnett 0fa2941188 Use a safe but sane device name 2020-07-14 21:54:44 +01:00
J. Ryan Stinnett ffab08bd60 Update various brand instances in code 2020-07-13 17:32:17 +01:00
Bruno Windels 6da70bdfbd create unique device names 2020-06-30 17:29:31 +02:00
Bruno Windels 8e3d1407c0 dont leak domain for now 2020-06-30 17:06:10 +02:00
Michael Telatynski 66272fc226 Allow deferring of Update Toast until the next morning
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-29 19:59:48 +01:00
Michael Telatynski 1fd74f22c8 Give contextual feedback for manual update check instead of banner
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-29 18:24:45 +01:00
Michael Telatynski c17bcda1ba Merge branches 'develop' and 't3chguy/toasts3_2' of github.com:vector-im/riot-web into t3chguy/toasts3_2 2020-05-27 09:58:08 +01:00
Michael Telatynski 3ad3c3ca0a Fix super in arrow funcs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-26 10:04:49 +01:00
Michael Telatynski 48a618264a Replace New Version Bar with a Toast
discards the `new_version` dispatch

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-22 23:08:46 +01:00
Michael Telatynski 706972eff2 tidy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-20 20:01:51 +01:00
Michael Telatynski 6ec613c2c2 Convert various things to Typescript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-20 19:56:54 +01:00