Commit Graph

76 Commits (17e332bb4860087abc7ba5d94e12636a6aa480ca)

Author SHA1 Message Date
Travis Ralston 17e332bb48 Import from src/ for the react-sdk and js-sdk
We compile directly for accuracy of sourcemaps.
2019-12-23 20:02:11 -07:00
David Baker 89d622b8b2 Remove the code that calls the origin migrator
This will have done its job now, everyone's had long enough to
install a newer version of Riot and migrate to the new origin.

Laves the code on the backend that handles it for the time being,
as per comment.
2019-12-09 11:57:43 +00:00
Damir Jelić 222fea969d Merge branch 'poljar/seshat-pr' into develop 2019-11-26 18:47:58 +01:00
Michael Telatynski eac6c46d28 Merge branches 'develop' and 't3chguy/remove_bluebird' of https://github.com/vector-im/riot-web into t3chguy/remove_bluebird 2019-11-22 14:00:02 +00:00
Damir Jelić 137bedb3f9 ElectronPlatform: Update the path for the BaseEventIndexManager class. 2019-11-19 13:34:00 +01:00
Damir Jelić 73b302f432 ElectronPlatform: Fix some type annotations. 2019-11-19 13:34:00 +01:00
Damir Jelić 4a25252626 ElectronPlatform: Rename the SeshatIndexerManager. 2019-11-19 13:34:00 +01:00
Damir Jelić dd2c210cfb electron-main: Rework the event index initialization and deletion. 2019-11-14 16:14:48 +01:00
Damir Jelić 7147af8f80 ElectronPlatform: Don't scope the event index per user. 2019-11-14 14:14:59 +01:00
Damir Jelić c3c5756c7a ElectronPlatform: Implement the EventIndexManager for Seshat. 2019-11-13 15:55:07 +01:00
David Baker 7af68bddea Remove the 'auto hide menu bar' option on Mac
The menu bar is at the top of the screen on Mac so this setting
does absolutely nothing.
2019-11-05 20:31:08 +00:00
Michael Telatynski 10e1d9093e transform-async-to-promises: get rid of bluebird 2019-11-04 12:46:28 +00:00
Michael Telatynski 9820e59559 Merge hide-to-tray-icon with show-tray-icon 2019-10-30 14:32:28 +00:00
Michael Telatynski 1498872214 Add ability to hide tray icon on non-Mac (which has no tray icon) 2019-10-29 11:37:42 +00:00
Damir Jelić 71023ae9df ElectronPlatform: Fix lint errors. 2019-10-11 17:17:24 +02:00
Damir Jelić 1dbdd0a366 ElectronPlatform: Add support for a event index using Seshat. 2019-10-11 16:05:14 +02:00
David Baker 57672ad384 Request persistent storage on Electron
It's still not 100% clear whether storage is always persistent on
Electron, but we seem to be getting reports of it being deleted in
the wild on Electron, so let's try calling the API to request
persistent storage. It won't pop up a dialog on Electron. In the
worst case it will give us some logging so we know what the API calls
return.

We could do this on non-desktop too but it's a bit of a mess because
Firefox prompts the user but Chrome makes a decision itself based on
how much the user visits the site.
2019-10-04 12:17:01 +01:00
Michael Telatynski 509839e79e Allow setting electron autoHideMenuBar and persist it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-05 11:58:16 +01:00
Michael Telatynski 974797648f Move config-getting to VectorBasePlatform
in Electron get config via IPC from main process
which has access to the "local" config.json override file
and can make people happy :D

Remove bunch of duplicated code,
and move comments around to put them in the right place

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-26 21:08:04 +01:00
Travis Ralston c5461b4509 Don't try and render null avatars in desktop notifications
as much fun as http://localhost:8080/null is to see
2019-05-30 20:04:16 -06:00
Michael Telatynski 5a3b9ae454 more matching
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 01:38:21 +00:00
Michael Telatynski 717495c4e0 specify return types to match superclass
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 01:21:18 +00:00
Michael Telatynski 714570443d Allow configuration of whether closing window closes or minimizes to tray
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 01:08:01 +00:00
David Baker 0022834af4
Merge pull request #8241 from vector-im/dbkr/fix_platform_name
Fix device names on desktop
2019-01-23 17:15:56 +00:00
David Baker 9aad7042a2 Fix device names on desktop
Apparently I really had a bad day with includes / indexOf
2019-01-23 16:53:50 +00:00
David Baker a5ed5be3cf Fix literal &lt/&gt in notifications
Apparently I couldn't decide whether I was writing indexOf(...) > -1
or .includes()

Fixes https://github.com/vector-im/riot-web/issues/8230
2019-01-23 14:47:31 +00:00
David Baker 751a1dc543 Add tool to migrate logins between origins
App checks at startup for an existing session, if there isn't one,
it will start the tool to check for a login in the file:// origin.
If there is one, it will copy the login over to the vector://vector
origin.

In principle this could also be used to migrate logins between
other origins on the web if this were ever required.

This includes a minified copy of the browserified js-sdk with
a getAllEndToEndSessions() function added to the crypto store
(https://github.com/matrix-org/matrix-js-sdk/pull/812). This is
not great, but for a short-lived tool this seems better than
introducing more entry points into webpack only used for the
electron app.
2018-12-21 19:14:25 +00:00
David Baker 0c428efea0 lint 2018-12-18 18:03:47 +00:00
David Baker 19f1489c92 Run the Desktop app in a sandbox
* Turn off node integration in the electron renderer process
 * Enable the chromium sandbox to put the renderer into its own process
 * Expose just the ipc module with a preload script
 * Introduce a little IPC call wrapper so we can call into the
   renderer process and await on the result.
 * Use this in a bunch of places we previously used direct calls
   to electron modules.
 * Convert other uses of node, eg. use of process to derive the
   platform (just look at the user agent)
 * Strip out the desktopCapturer integration which doesn't appear
   to have ever worked (probably best to just wait until
   getDisplayMedia() is available in chrome at this point:
   https://github.com/vector-im/riot-web/issues/4880).
2018-12-18 17:42:55 +00:00
David Baker 1dfaf70562
Revert "Revert "Run lint on travis builds and use modern node versions"" 2018-11-22 18:25:55 +00:00
David Baker f701e2601a
Revert "Run lint on travis builds and use modern node versions" 2018-11-22 18:17:09 +00:00
Aaron Raimist 6abd1de8b8
eslint --fix on src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-19 20:59:06 -05:00
David Baker 2854c0969b Don't set tags on notifications
They are to suppress notifications that don't want to be shown in
addition to each other. This makes no sense for our notifications:
they're each for independent messages. Also settings tags on
notifications makes electron crash on windows when you close the
notif, as per https://github.com/vector-im/riot-web/issues/7512
2018-10-18 19:07:59 +01:00
David Baker bb907d49c9 Typo 2018-10-18 18:35:01 +01:00
David Baker 231ca253f2 Stop electron crashing
Workaround temporarily by not closing notifs on win32 as per
comment.

Fixes https://github.com/vector-im/riot-web/issues/7512
2018-10-18 18:31:06 +01:00
Matthew Hodgson d6931252c1 move rageshake to sdk 2018-04-13 01:35:55 +01:00
Robert Swain f79b8e0c71 ElectronPlatform: Import desktopCapturer explicitly 2017-09-25 17:19:04 +02:00
Robert Swain e8424d71db ElectronPlatform.js: Add Jitsi screensharing support 2017-09-04 09:33:08 +02:00
Richard van der Hoff b29b4a959b q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-13 00:50:01 +01:00
Richard van der Hoff 10decf95f6 replace imports of `q` with bluebird
update `package.json`

```
find src test -name '*.js' |
    xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
    xargs perl -i -pe 'if (/import [qQ] /) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-13 00:48:31 +01:00
Richard van der Hoff cc56ef3abd Attempt to flush the rageshake logs on close
... so that we get to see what happened in the last 30s.
2017-06-22 18:25:19 +01:00
Michael Telatynski a520f0bfed move all logic, make bar more generic
pass through actual errors
and tidy
needs testing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-11 19:19:17 +01:00
Michael Telatynski 93f148fca3 fix type electron vs remote
don't break when running a non Squirrel Windows build that has an update url

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-03 16:34:15 +01:00
Michael Telatynski 3ebd90565c add clearer concept of timeout vs error
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 104c804)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-03 15:59:27 +01:00
Michael Telatynski b95ad701af match ENUM style to others in project
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit a871815)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-03 15:59:18 +01:00
Michael Telatynski efc68c078e basic manual update stuff + update check bar
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-03 15:59:12 +01:00
Matthew Hodgson bac5ae89ce Merge pull request #4119 from vector-im/kegan/translation-chimp
Translate src/vector
2017-06-01 00:34:45 +01:00
Michael Telatynski 33ee42f821 use loudNotification for flashFrame, resetting on count=0 or focus
win32 check is optional just there so we're not attaching pointless handlers

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 00:00:00 +01:00
Kegan Dougal 7dc55a9a47 Import correctly 2017-05-31 17:53:32 +01:00
Kegan Dougal 52ddcd8a60 Translate src/vector/platform 2017-05-31 14:51:08 +01:00