Commit Graph

120 Commits

Author SHA1 Message Date
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
Aaron Raimist
d035efb14e
Fix lint warnings and turn warnings back on (#7409)
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-05 10:41:45 -05:00
Aaron Raimist
401c85ad5b
Fix Promise.defer warnings in WebPlatform.js (#7409)
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-05 10:23:06 -05:00
Matthew Hodgson
d6931252c1 move rageshake to sdk 2018-04-13 01:35:55 +01:00
Matthew Hodgson
3d20a64502 export enum via method for convenience from matrix-react-sdk 2018-04-13 01:25:00 +01:00
Matthew Hodgson
aa54032500 force refresh when updating the app 2018-03-09 01:45:44 +00: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
d5b550f89a replace q method calls with bluebird ones
```
find src test -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/'
```
2017-07-13 00:50:01 +01: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
89533706a8 pollForUpdate is now internal/private to a Platform.
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-11 23:39:21 +01:00
Michael Telatynski
deb7ed660c Merge branch 'develop' of github.com:vector-im/riot-web into t3chguy/updating_stuff 2017-06-11 23:13:49 +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
Kegsay
4cec4f066d Fix #4191: add defaults to avoid throwing (#4195) 2017-06-06 12:38:06 +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
Michael Telatynski
0e6012ad45 absorb updater.js into the Platforms, gets rid of pointless setInterval in Electron
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 24e8a30)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-03 15:58:54 +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
Matthew Hodgson
448c10736a Merge pull request #4012 from vector-im/t3chguy/electron_settings
auto-launch support [Electron]
2017-05-30 23:59:15 +01:00
Michael Telatynski
1d2bd68200 Merge branch 'develop' of github.com:vector-im/riot-web into t3chguy/electron_settings 2017-05-29 22:12:06 +01:00
Michael Telatynski
b9ec25b32f add flow annotation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-29 20:03:21 +01:00
Michael Telatynski
e991461e8d add new BasePlatform method, Analytics fun on the Webpack train
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-29 19:51:28 +01:00
Michael Telatynski
a98792b05e auto-launch support, ux =checkbox in UserSettings[Electron]
settings are sorta generic, probably reusable for proxy settings

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-24 15:52:08 +01:00
Michael Telatynski
c63e429c76 Merge branch 'develop' of github.com:vector-im/riot-web into t3chguy/electron_call_sleep 2017-05-24 10:56:36 +01:00
Michael Telatynski
f57d8e4cb9 make ESLint a touch happier
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-22 18:31:30 +01:00
Michael Telatynski
755c66b9f1 pass dispatcher through to electron, on a whitelist basis
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-22 18:30:45 +01:00
David Baker
dc990f47be Fix app breakage with a 'version' file
Re-add accidenally removed variable initialiser
2017-05-19 17:02:48 +01:00
Michael Telatynski
9352e5d78e Lets make it abundantly clear that we want attention. FLASH FLASH FLASH
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>
2017-05-17 10:39:43 +01:00
Michael Telatynski
bbda658b7f make Electron tray icon mimic the Favico.js one
DRY: moved Favicon stuff into the base platform

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-13 12:37:13 +01:00
Michael Telatynski
6367344181 tidy and fix flow notation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-02 21:32:34 +01:00
Michael Telatynski
b3c9229aee DRY code and change double quotes to single
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-23 09:59:00 +01:00
Michael Telatynski
2139fb74bb change show logic to same as that of the tray icon
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-23 09:56:43 +01:00
Matthew Hodgson
4864716abb Merge pull request #3564 from t3chguy/t3chguy/malformed-notifications-gnome-kde
Escape HTML Tags from Linux Notifications (electron)
2017-04-22 16:45:04 +01:00
Michael Telatynski
0da6ca8aea add more comment to explain this weirdness
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-22 16:05:08 +01:00
David Baker
7f6d9a625d Make the clear cache button work on desktop
Implement reload in Platforms to support
https://github.com/matrix-org/matrix-react-sdk/pull/798

Fixes https://github.com/vector-im/riot-web/issues/3597
2017-04-10 17:40:09 +01:00
Michael Telatynski
99923b7b8f Escape HTML tags in Notifications (Linux)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-03 20:30:05 +01:00
David Baker
7850f7e505 Fix badge spam: attempt 2 (#3073) 2017-01-26 12:58:29 +00:00
Richard van der Hoff
f29e0bfe6d Revert "Merge pull request #3067 from vector-im/matthew/fix-badge-spam"
This reverts commit f9db7f017d, reversing
changes made to 71b149de76.

This caused `number is not defined`
2017-01-26 12:16:44 +00:00
Matthew Hodgson
9797c2fb4b fix electron too 2017-01-26 00:31:52 +01:00
Matthew Hodgson
972a391296 only recalculate favicon if it changes 2017-01-26 00:28:22 +01:00
David Baker
bee4ca2b28 Fixes to electron desktop notifs
Merge the notification part of https://github.com/vector-im/riot-web/pull/2960

 * Show and focus the window when the notification is clicked,
   rather than just restoring it.
 * Implement requestNotificationPermission and return a resolved
   promise (although in practice it should never be called)
2017-01-19 13:25:56 +00:00
David Baker
c5459a2f19 Enable screen sharing easter-egg in desktop app 2017-01-10 18:39:21 +00:00
Hubert Chathi
ad79f67ab6 Add missing brackets to call to toUpperCase 2016-12-06 22:36:42 -05:00
David Baker
5fa0f62ccc Fix clicking on notifications
* Dismiss the notification when it's clicked
 * Accept the room object: we need it to view_room
 * Desktop app: Un-minimise when notification clicked
 * Desktop App: Set App User Model ID so notifications work on
   Windows 8!
2016-12-06 13:28:59 +00:00
David Baker
c786980454 Move getDefaultDeviceName into the Platforms
So we can have a sensible device name on Electron
2016-11-24 16:46:15 +00:00
Richard van der Hoff
646608bf8b Add a cachebuster to /version 2016-11-17 17:31:31 +00:00
David Baker
8d46077ac2 Support for get_app_version 2016-11-08 10:47:01 +00:00
David Baker
9a00ec128c many semicolons 2016-11-04 10:46:51 +00:00
David Baker
ed9c29d365 Use require so we can import conditionally 2016-11-03 15:45:12 +00:00
David Baker
fb3ca441ba Merge remote-tracking branch 'origin/develop' into dbkr/electron_3 2016-11-03 13:32:01 +00:00
David Baker
f1b72dfa09 Fix copyright 2016-11-03 11:51:41 +00:00
David Baker
4d0b492ba0 Merge remote-tracking branch 'origin/develop' into dbkr/platform_version 2016-11-03 11:51:23 +00:00
David Baker
3bcb447e03 Fix copyright 2016-11-03 11:48:49 +00:00
David Baker
275a55266b Merge remote-tracking branch 'origin/develop' into dbkr/electron_3 2016-11-02 19:46:02 +00:00
David Baker
6aba9f8eda Don't always claim we have notif support
Only if the browser has the Notification API
2016-11-02 19:26:07 +00:00
David Baker
caa3cb7d89 Electron support
From https://github.com/vector-im/vector-web/pull/2511 but with
just the actual electron changes
2016-11-02 18:49:28 +00:00
David Baker
17bb47676e Make VectorBasePlatform
For template methods that are only used from within vector (ie. new version
support)
2016-11-02 17:45:35 +00:00
David Baker
757604fd60 Add Notification support to the Web Platform
Except display notification which was already accidentally included in a
previous PR
2016-11-02 17:36:48 +00:00
David Baker
64fdb290eb Move 'new version' support into Platform 2016-11-02 16:02:55 +00:00
David Baker
a714edbf2b Implement Platforms
Provide WebPlatform for functionality specific to the web version of vector.
2016-11-02 15:12:51 +00:00