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.
This puts the app into its own origin so it doesn't have access
to the filesystem via file:// URIs.
Next step: migrate over localstorage & indexeddb data from the old
origin...
* 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).
when using makeSingleInstance
which leads to a weird error
Unhandled exception { Error: Cannot find module '../screen'
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
add handlers for editable fields, with Cut Copy Paste Undo Redo etc
add Copy Image feature to all images, working on not only the download
buttons now
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
also improve favicon updating to not change if we're same as previous
not sure how intensive the nativeImage stuff is but cheap efficiency
For FLASH FLASH I moved the setBadgeCount stuff RPC -> IPC
should be more reliable now, its in electron-main
Win only:
if mainWindow is set and is not in focus make it FLASH
clear flash if notification gets cleared elsewhere
debounce focus handler so we don't set a million of them
if the app is backgrounded a while
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
instead of the actual electron package. With no way to ignore directories.
I'd like to think of this as temporary, until I get to rip apart riot-web
and riot-electron
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>