Commit graph

1397 commits

Author SHA1 Message Date
Devin Binnie ae4a8dca1f
Icon update (#2729) 2023-05-24 13:23:11 -04:00
Devin Binnie 1239add076
[MM-50352] Improve URL validation and add/edit server experience (#2720)
* [MM-50352] Improve URL validation and add/edit server experience

* Fix build

* Fix translations

* First pass of fixes

* Some changes to avoid 2 clicks, tests

* PR feedback

* Update translations

* PR feedback

* Fix translations

* PR feedback

* E2E test fixes
2023-05-24 09:04:38 -04:00
Devin Binnie a87e770c73
Fix two server manager issues (#2727) 2023-05-20 11:39:32 -04:00
Devin Binnie 2ed851c2a4
[MM-52879] Fixed calls popout URL checking (#2725) 2023-05-18 12:58:05 -04:00
Devin Binnie 3899b7c582
Make ExtraBar dark when using dark mode (#2718)
* Make ExtraBar dark when using dark mode

* Update ExtraBar to use colors from MainBar in dark mode

* Update the colour

---------

Co-authored-by: zoltan-ofir <45757556+zoltan-ofir@users.noreply.github.com>
2023-05-17 11:18:51 -04:00
Christopher Poile 3b8bddd5e7
MM-51956 - Fix for: Calls popout generating duplicate notifications (#2713)
* set userAgent in the widget popout

* tests

* set userAgent on widget, for consistency

* added link to ticket for the proper fix
2023-05-11 13:54:20 -04:00
Devin Binnie 925b2fcc32
Fixed issue where launching the app a second time wouldn't show the main window if it was hidden. (#2712) 2023-05-08 10:10:36 -04:00
Devin Binnie 316beba950
[MM-14093] Rename 'team' to 'server' and 'tab' to 'view' in most cases, some additional cleanup (#2711)
* Rename MattermostTeam -> UniqueServer, MattermostTab -> UniqueView

* Rename 'team' to 'server'

* Some further cleanup

* Rename weirdly named function

* Rename 'tab' to 'view' in most instances

* Fix i18n

* PR feedback
2023-05-08 09:17:01 -04:00
Devin Binnie d685762ac7
Fix weird macOS crash that occurs when closing the settings window (#2707)
* Fix weird macOS crash that occurs when closing the settings window

* Added comment
2023-05-04 13:37:33 -04:00
Devin Binnie 574c4e98a7
Fix issue where Linux menubar pops up when it's not supposed to (#2709) 2023-05-04 13:32:52 -04:00
Devin Binnie c20088f6fa
[MM-52625] Rework tray icon code into a class, make the behaviour of the tray icon consistent with the OS it's running on (#2708)
* Rework tray into a class, make click behaviour consistent

* Fix issue where app wouldn't switch to workspace where the app was visible

* Fixed an issue where the app would show the window with hideOnStart enabled

* Add comment about StatusIconLinuxDbus

* Fix tests
2023-05-04 09:21:50 -04:00
Devin Binnie 78dc529d32
Fixed Linux snapping, performance stuff (#2706) 2023-05-03 13:09:54 -04:00
Devin Binnie 717544779a
Fixed the window resize for Windows as well (#2705) 2023-05-03 11:40:43 -04:00
Devin Binnie 1049b0763c
Fixed a few resizing issues (#2703)
* Fix bad handler on resize for Linux

* Fix maximize/minimize issue again

* Fix macOS rapid resizing issue

* Make sure #2638 is still fixed

* Still don't need this

* Added comment and fixed test
2023-05-03 08:48:54 -04:00
Devin Binnie e227c6bf1d
[MM-52587] Clean up URL utils, use isInternalURL when possible (#2702) 2023-05-03 08:48:41 -04:00
Devin Binnie f3a4417464
[MM-52139] Force user to reset default downloads directory when the app is not allowed to access it (#2699)
* [MM-52139] Force user to reset default downloads directory when the app is not allowed to access it

* Fix a bug where a different download location choice would cause a problem

* Missed i18n
2023-05-02 14:37:14 -04:00
Claudio Costa 09fe196bc6
Prevent calls widget window from showing native shadow (#2693) 2023-05-02 14:45:24 +02:00
Devin Binnie 509c1a7be0
[MM-52380] Fix unhandled rejection when clearing app cache (#2696)
* [MM-52380] Fix unhandled rejection when clearing app cache

* Make sure the window is loaded first

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-05-01 12:09:52 -04:00
Devin Binnie 0f94b7d510
Fixed Snap issue with resizing on Windows 11 (#2686)
* Fixed Snap issue with resizing on Windows 11

* Run on focus/blur as well

* Whoops, left my logging changes

* Fix tests
2023-04-21 18:09:20 -04:00
Devin Binnie 73edb2fe48
Fixed bad mention counts in the dropdown menu (#2687) 2023-04-21 16:57:44 -04:00
Devin Binnie f4f4511cc7
Remove WindowManager, separate functionality into smaller modules (#2682)
* Move sendToRenderer to respective singletons

* Move to using ViewManager call for getting view by webContentsId

* Move show and create logic to main window, handle deep linking seperately

* Move resizing logic and event handing to mainWindow

* Move server switching logic to main/app

* Move tab switching logic to main/app, rely on showById for most usage

* Migrate remaining functions, remove windowManager objects, set up imports for self-contained singletons

* Fix E2E tests

* Update src/main/app/servers.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-04-19 11:04:26 -04:00
Devin Binnie a141d3cde4
Migrate downloads dropdown menus to singletons (#2680) 2023-04-18 09:14:18 -04:00
Devin Binnie b71322a682
Migrate teamDropdownView to singleton (#2677) 2023-04-14 12:14:11 -04:00
Devin Binnie 1428ba694b
Clean up appState module, move to common, simplify events (#2676)
* Refactor appState into class, simplify events

* Move appState to common module, make case for object consistent

* Naming change

* Update name
2023-04-14 12:09:33 -04:00
Devin Binnie 686b4ac9f1
[MM-50485] Migrate app to ServerManager, remove view names and replace with IDs (#2672)
* Migrate app to ServerManager, remove view names and replace with IDs

* Fixed a test

* Fixed a bug when adding the initial server

* Merge'd

* Bug fixes and PR feedback
2023-04-12 12:52:34 -04:00
Devin Binnie 661099dd28
[MM-51961] Migrate calls widget to singleton (#2667)
* Migrate callsWidgetWindow to singleton

* REVERT ME: removed references to ServerManager
2023-04-12 07:50:34 -04:00
Devin Binnie 741087cb55
Refactor config, move ipc calls to app module, some cleanup (#2669) 2023-04-06 11:24:57 -04:00
Devin Binnie 88eb2e2c70
[MM-51964] Clean up MattermostView, remove tuple in preparation for id (#2668)
undefined
2023-04-06 11:17:33 -04:00
Devin Binnie 53fb8c8fd3
[MM-50485] Implement ServerManager, introduce id concept for identifying servers/views (#2654)
* Implement ServerManager, introduce id concept for identifying servers/views

* REVERT ME (eventually): Move back to old logging

* PR feedback

* PR feedback

* Revert "REVERT ME (eventually): Move back to old logging"

This reverts commit 46954a5bbed4dd29e89ca9d5217bb75af2837bb3.

* Merge'd

* Use the correct method for Logger in ServerManager
2023-04-05 16:30:50 -04:00
Devin Binnie 862287edff
Migrate viewManager to singleton (#2656) 2023-04-05 13:01:09 -04:00
Devin Binnie 245215c678
[MM-51873] Create central logging module for adding prefixes to differentiate logs between modules (#2652)
* Create central logging module for adding prefixes to differentiate logs between modules

* Turn logger into class

* Merge'd

* Rework to use class more intelligently

* Fix modalView

* Fix webContentEvents

* Update src/main/app/intercom.ts

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* Shorten prefixes on object creation

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2023-04-05 12:09:56 -04:00
Devin Binnie 39150137b6
[MM-51874] Migrate loading screen to singleton (#2655)
* Migrate loadingScreen to singleton

* REVERT ME when MainWindow singleton changes are merged

* Revert "REVERT ME when MainWindow singleton changes are merged"

This reverts commit 2de5520117b9aefb8eeb161d493de7cb275f7a5b.
2023-04-04 11:49:40 -04:00
Devin Binnie 22ec280945
[MM-51871] Migrate mainWindow and settingsWindow to singletons (#2650)
* Migrate mainWindow to singleton

* Migrate settingsWindow to singleton

* PR feedback

* Missed a couple unwrapping cases
2023-04-04 10:01:40 -04:00
Devin Binnie 112a591796
Move Validator to common module (#2651) 2023-04-04 08:05:40 -04:00
Christopher Poile 4fe66b298d
MM-51850 - Calls: Fix for crash after closing popout (#2647) 2023-03-31 11:46:27 -04:00
Christopher Poile d18e3e2251
MM-51535 - Calls: Fix unrestricted redirect from calls widget (#2635)
* add will-redirect handler to prevent unrestricted redirect

* import ordering

* simplify onWillRedirect handler; tests

* Adding punctuation to force tests to run again.
2023-03-28 09:53:30 -04:00
Claudio Costa cc706f7a97
Escape regexp input in isCallsPopOutURL (#2629) 2023-03-23 10:56:47 -06:00
Claudio Costa 9570e030e7
Allow starting a call from existing thread (#2630) 2023-03-21 14:01:41 -04:00
Devin Binnie c85a4497b6
Fix the issue where we sometimes need to wait for GPO teams properly (#2621) 2023-03-20 16:24:07 -04:00
Devin Binnie cf8aa6499c
[MM-51406] Update node-abi, fix some server modal bugs (#2617)
* Update node-abi so tests can run

* [MM-51392] Fix modal ping bugs
2023-03-15 09:12:53 -04:00
Jon Seager 69831bbe13
fix: use XDG_DOWNLOAD_DIR as default download dir (#2615)
On Linux machines that are using a desktop env which conforms to
the FreeDesktop spec, users should have the XDG_DOWNLOAD_DIR
variable set to specify their default download directory.

This patch ensures that this directory is used if the variable is
present.

Hoping this will fix the following issue in the Mattermost snap:
https://github.com/snapcrafters/mattermost-desktop/issues/65
2023-03-15 09:12:16 -04:00
Devin Binnie 37e7fb1100
[MM-51406] Check for other server URLs when trying to navigate (#2616) 2023-03-15 09:08:33 -04:00
Claudio Costa 49ed221659
Fix race condition on switching calls (#2591) 2023-03-07 18:23:21 -06:00
Devin Binnie 12ec2748b4
Refactor webContentsEvents and popup listeners (#2587) 2023-03-07 08:50:39 -05:00
Devin Binnie 99a84a0fd7
[GH-2534] Refocus the popup window if already exists (#2581)
* [GH-2534] Refocus the popup window if already exists

* PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-06 11:49:15 -05:00
Devin Binnie 417e53cb13
[MM-50948] Prevent popup windows from navigating outside of the plugin/managed resource URLs (#2580) 2023-03-06 09:11:39 -05:00
Antonis Stamatiou b62b25fdda
feat(ci): CircleCI migration to Github Actions (#2516)
* Deprecated trigger-desktop-nightly repo from gitlab
* Migrated Nightly builds URLs from CircleCI to S3
* Full CI/CD is handled by Github Actions

---------

Co-authored-by: Tasos Boulis <tboulis@hotmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-06 11:51:25 +02:00
Devin Binnie 5342507954 Restore URL checking code 2023-03-02 17:03:55 -05:00
Claudio Costa a52e96694d
[MM-50973] Harden Calls windows URL navigation checks (#2573)
* Harden Calls windows URL navigation checks

* Update src/main/windows/callsWidgetWindow.ts

Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>

* Fix bad merge

* Extract team name to use isUrlType

* Simplify

---------

Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
2023-03-02 13:10:47 -05:00
Devin Binnie ec4a733507
[MM-50527] Explicitly allow the Mattermost views access to write to the clipboard using Copy Link (#2565)
* [MM-50527] Explicitly allow the Mattermost views access to write to the clipboard using Copy Link

* Include calls widget window

* Add calls popout to the list as well

* Update src/main/app/initialize.ts

Co-authored-by: Christopher Poile <cpoile@gmail.com>

---------

Co-authored-by: Christopher Poile <cpoile@gmail.com>
2023-03-01 22:48:55 -05:00
Claudio Costa cd051fe679
[MM-50995] Harden Calls events handling (#2571)
* Simplify server switching logic in calls events

* Harden calls events handling

* Fix subpath
2023-03-01 16:01:39 -06:00
Alexander Griesser 7d109b9084
Fix typo in error message (#2572)
stumbled upon that while debugging a problem with a community user
2023-03-01 10:20:09 -05:00
Devin Binnie e6a93dcc69
[MM-50569] Fix insecure win32 path regex (#2566) 2023-02-28 10:14:57 -05:00
Devin Binnie 2009d0290b
[MM-50712] Fix local prototype pollution flaw (#2567)
* [MM-50712] Fix local prototype pollution flaw

* Update src/main/diagnostics/steps/internal/loggerHooks.test.js

Co-authored-by: Daniel Espino García <larkox@gmail.com>

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2023-02-28 09:48:48 -05:00
Claudio Costa d1f6fc5a5f
[MM-46980] Improve screensharing permissions flow (#2556)
* Little improvements and simplification

* Improve MacOS screen permissions handling flow

* Add missing error event

* Propagate calls client errors (#2557)
2023-02-17 15:07:29 -05:00
Christopher Poile ec8e0b9cc2
MM-49079 - Calls: process link clicks from Calls popout (#2558)
* process link clicks from Calls popout

* add a mock for windows tests
2023-02-17 13:41:01 -05:00
Claudio Costa 7127ec153a
Send error to global widget if missing screen sharing permissions (#2554) 2023-02-16 10:20:50 -06:00
Devin Binnie 5cc2e98a1d
Merge and migrate locally-trusted preload scripts to contextBridge API (#2553)
* Migrate intl_provider to contextBridge

* Migrate modalPreload to contextBridge

* Migrate loadingScreenPreload to contextBridge

* Migrate downloadDropdown preloads to contextBridge

* Migrate server dropdown preload to contextBridge

* Migrate urlView preload to contextBridge

* Merge all desktop API scripts into one

* Remove unused communication channel constants
2023-02-15 13:42:53 -05:00
Claudio Costa 562ef14aef
Fix media permissions failure on Calls window (#2550) 2023-02-10 11:13:31 -06:00
Devin Binnie 8dbdb0a75e
[MM-50409] Stop the main window from creating its own uncontrolled child windows (#2549) 2023-02-09 09:04:02 -05:00
Devin Binnie 6dca4a5095
[MM-50410] Allow any unhandled target=_blank links to open in the browser (#2548) 2023-02-09 09:03:32 -05:00
Claudio Costa 06eb76dc21
[MM-48658] Improve global widget resizing logic (#2545)
* Improved global widget resizing

* Remove min width/height

* Fix test
2023-02-07 11:00:42 -05:00
Devin Binnie 07e41ec678
Remove use of getView() and replace with getViewByURL() where necessary. (#2544)
* WIP

* Replace getView with getViewByURL
2023-02-07 08:59:35 -05:00
Claudio Costa 9213083335
[MM-49739] Set parent window on calls expanded popout view (#2539)
* Set parent window on calls expanded popout view

* Fix focus on calls popout window

* Unregister event
2023-02-06 10:31:50 -05:00
Tasos Boulis 9b45935bee
Use location as is when displaying thumbnails inside downloads dropdown in MAS builds (#2536) 2023-02-02 19:37:04 +02:00
Devin Binnie 61a0b41d47
[MM-50042] Detect Boards using the BuildBoards flag in the client config (#2535) 2023-02-02 11:31:11 -05:00
Tasos Boulis db5a2e055d
[MM-50237] Add menu item for showing the logs folder (#2533)
* Add menu item for showing the logs folder

* Add translation
2023-02-02 16:24:18 +02:00
Devin Binnie f62944c5a4
[MM-43656] Flush cookies to disk on finishing custom login (#2076)
* [MM-43656] Flush cookies to disk on finishing custom login

* Fixed a test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-02-01 14:32:22 -05:00
Tasos Boulis bbb29a0d1b
[MM-48407] Include entry for websocket too when trusting a certificate for https (#2526)
* Inlcude entry for websocket too when trusting a certificate for https

* Improve condition for protocol
2023-01-30 16:14:57 +02:00
Devin Binnie 09ecc7430f
[MM-49690] Set currentView to undefined instead of using delete (#2522) 2023-01-27 14:32:48 -05:00
Claudio Costa b7c9d3527d
Hide menu bar in calls popout window (#2475) 2023-01-27 09:32:25 -06:00
Devin Binnie cf6611cc87
[MM-50011] Disable popping the dialog box for uncaught exceptions (#2519) 2023-01-27 09:05:32 -05:00
Devin Binnie a68e3ffacf
Fixed an issue where opening the app with a deeplink may cause the app not to redirect to the correct URL (#2514) 2023-01-23 12:28:04 -05:00
kevfocke f23bbb9272
minimize on click (#2508) 2023-01-22 02:29:36 -05:00
Devin Binnie d312bfca24
[MM-44004] Optionally turn off UTF-8 encoding for winreg if the system doesn't support it (#2128)
* [MM-44004] Optionally turn off UTF-8 encoding for winreg if the system doesn't support it

* Fix tests

* REVERT ME: Enable msi installer

* REVERT ME: Wait for msi

* Toggle between winreg and winreg-utf8 if the latter doesn't work

* Revert MSI stuff

* Added logging for the catch at the end to see what error is occurring there

* Catch the error on registry creation as well

* Update logging a bit further

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-01-20 12:11:37 -05:00
Tasos Boulis 94120a0315
[MM-49743] Remove screen change listeners due to electron's bug (#2506)
* Remove screen change listeners due to electron bug

* Remove unused functions
2023-01-20 11:09:26 +02:00
Tasos Boulis 4131f8fb66
Close downloads menu when clicking "show in folder" (#2507) 2023-01-19 16:34:24 +02:00
Tasos Boulis 5bafaff297
Check if view is destroyed before sending ipc message (#2505) 2023-01-18 19:24:42 +02:00
Devin Binnie c8c88a274f
[MM-49724] More robust check for startup before starting E2E tests (#2504)
* [MM-49724] More robust check for startup before starting E2E tests

* Fix a few more tests
2023-01-18 12:11:11 +02:00
KyeongSoo Kim 7d79cab916
open a file when it is clicked from the download list (#2501) 2023-01-16 17:05:24 -05:00
Devin Binnie db76a67fb5
Reduce the number of writes to the config (#2498)
* Add some logging, refactor setting config items

* Move active team to setMultiple, reduce serverInfos calls if the data is already the same

* Fix some logging

* Lint fix
2023-01-12 08:46:06 -05:00
Tasos Boulis 9f6893fdb2
Remove any existing IPC hanlders/listeners before assigning new ones inside the downloadsManager (#2493)
* Remove any existing IPC hanlders/listeners before assigning new ones inside the downloadsManager

* Mock more ipx functions during tests
2023-01-09 16:57:53 +02:00
Tasos Boulis 76caf02cb2
Maximize main window if monitor removed/changed resolution (#2486)
* Maximize main window if monitor removed/changed resolution

* Fix unit tests

* Add better handlers to support active screen changes
2023-01-03 18:11:35 +02:00
Devin Binnie a089d51d0e
Fix flaky unit test (#2479) 2022-12-16 16:18:16 -05:00
Devin Binnie 29f10f1467
Fixed some unit tests and add test step to run on Windows/Mac builds (#2466)
* Fixed some unit tests and add test step to run on Windows/Mac builds

* Update failing test

* Fix backlash

* Fix windows run

* Fix Windows again

Co-authored-by: Tasos Boulis <tboulis@hotmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-14 17:10:20 -04:00
Claudio Costa e63a293b28
Fix main window disappering on call join (#2472) 2022-12-14 14:23:34 -06:00
Tasos Boulis a1c39d954b
Replace deprecated "gpu-process-crashed" with "child-process-gone" (#2471) 2022-12-14 10:49:12 +02:00
Tasos Boulis de65cfca4e
Escape server name when used inside regex (#2449)
* Escape server name when used inside regex

* Move util under common and add test
2022-12-06 17:29:02 +02:00
Devin Binnie 865fd2522f
Fixed some E2E tests that broke on v5.2 (#2453)
* Fixing some E2E tests

* Fixed a couple flaky ones

* Fixed some issues on Windows
2022-12-06 14:40:56 +02:00
Tasos Boulis e8754df3c0
Check if url is a plugin url when calculating the window bounds (#2446) 2022-12-05 12:33:40 +02:00
Tasos Boulis 161ae99e94
[MM-47202] - Desktop diagnostics (#2439)
* Add custom assertion to match object in array (#2358)

* Add custom assertion to match object in array

* Remove test that is not implemented yet

* [MM-48213] Add "Run diagnostics" menu item under Help (#2359)

* Add submenu item that runs diagnostics

* Add custom assertion to match object in array

* Remove test that is not implemented yet

* Add tests

* Add translation

* [MM-47206] Diagnostics steps setup (#2361)

* Add baseline code for diagnostics and their steps

* Fix failing test

* [MM-47206] [MM-48155] Obfuscate logs (#2369)

* Add logging hooks to mask sensitive data

* Add hook that truncates long strings in diagnostics logs

* Add template file for creating steps

* Add readme inside diagnostics

* [MM-48145] Diagnostics step 2 - internet connectivity (#2372)

* Add diagnostics step 2 - internet connectivity check

* Update tests

* [MM-48144] Diagnostics Step - Configure logger (#2390)

* Configure logger

* Move configure logger into step1

* Add file extension to fileName variable

* Diagnostics Step 2: Validate configuration (#2391)

* Resolve conflicts with base branch

* Update test and implement Code review suggestion

* Fix failing test

* [MM-48147]Diagnostics step 3 - server connectivity (#2397)

* Add step3: Check server connectivity by using the /api/v4/system/ping endpoint

* Fix failing tests

* Add better obfuscator functions that mask all types of data (#2399)

* Add better obfuscator functions that mask all types of data(string, array, objects)

* Update tests

* [MM-48148] Add Diagnostics step 4 - session validation (#2398)

* Add diagnostics step 4 - session data validation

* Fix failing tests

* [MM-48152] Add diagnostics step 5 - BrowserWindows checks (#2404)

* Add diagnostics step 5 - browserwindow checks for main window

* Add tests

* [MM-48151] Diagnostics step 6 - Permissions (#2409)

* Add diagnostics step 6 - Permissions check

* Check permissions for microphone ond screen onn mac, windows

* Update tests count in tests

* [MM-48551] Diagnostics step 7 - Performance & Memory (#2410)

* Add diagnostics step 6 - Permissions check

* Check permissions for microphone ond screen onn mac, windows

* Update tests count in tests

* Add diagnostics step 7 - performance and memory

* Fix failing tests

* [MM-48153] Add diagnostics step 8 - Log heuristics (#2418)

* Add diagnostics step 8 - Log heuristics

* Add diagnostics step 9 - config (#2422)

* [MM-48556] Diagnostics Step 10 - Crash reports (#2423)

* Add diagnostics step 9 - config

* Add diagnostics step 10 - include crash reports

* Update tests

* Add diagnostics step 11 - cookies report (#2427)

* [MM-48157] Diagnostics report (#2432)

* Add better logging and pretty print report

* Update last step

* Update log message

* Move log after hooks so that path is masked

* Use correct directory for diagnostics files
2022-12-02 16:33:42 +02:00
Tasos Boulis 08e94b9f55
[MM-48574] Fixed issue on windows where in some cases window resize does not work (#2441)
* Fixed issue on windows where in some cases window resize does not work

* Use silly instead of debug for window resizing functions
2022-12-01 19:44:47 +02:00
Devin Binnie 0a32030985
[MM-48682] Stop user from opening the servers menu when no servers are configured (#2434) 2022-11-30 11:08:24 -05:00
Pantelis Vratsalis 84ab14eabf
[MM-48685] Fix failing downloads dropdown items tests (#2431)
* [MM-48685] Fix failing downloads dropdown items tests

* Remove unused styles for Thumbnail
2022-11-30 17:43:55 +02:00
Devin Binnie 45e7ec95b7
[MM-48079] Fix race condition related to registry loading vs. the welcome screen popup (#2408) 2022-11-22 09:35:46 -05:00
Tasos Boulis b4e21b5c5e
Remove invalid files from downloads list on startup (#2401) 2022-11-18 18:58:32 +02:00
Devin Binnie 791c141aee
[MM-47706] Remove exposure of the ipcRenderer methods in the desktop app and only expose specific endpoints (#2387) 2022-11-16 09:40:18 -05:00
Tasos Boulis 216674a673
Fix issue with windows-focus-assist returning truthy value on older windows versions (#2385) 2022-11-16 11:50:53 +02:00
Tasos Boulis e1f5250c0c
[MM-48080] Update tray icon instantly when the settings change (#2376)
* Update wording and update tray icon instantly when the settings change

* Add tests

* Include new file
2022-11-14 21:40:18 +02:00
Devin Binnie 0ec3da40ba
[MM-48167] Only grab the last extension from a filename during Save As (#2357) 2022-11-07 09:49:27 -05:00
Claudio Costa 47edeea601
[MM-46993] Implement CallsWidgetWindow (#2265)
* Initial implementation of CallsWidgetWindow

* Refactor + implement widget resizing logic

* Add tests

* Enable screen sharing

* Channel link

* Add more tests

* Move constants to common file

* Extract boundsDiff into util

* Set background color on initialization

* Fix channel link

* Support installations under a subpath

* Fix path, caching issues and pass title

* [MM-48142] Fix remaining call state issues in main window (#2349)

* Update widget URL to new format

* Slightly bump widget dimensions to account for border

* Fix call state on parent window
2022-11-07 09:40:13 +01:00
Tasos Boulis c319038704
[MM-48184] Disallow edit/remove server if it is imported from GPO (#2353)
* Disallow edit/remove server if it is imported from GPO

* Fix width issue of team dropdown
2022-11-04 17:58:21 +02:00
Tasos Boulis 935cf3a0cc
[MM-48079] Dont show server login when GPO has preconfigured servers (#2346)
* Show onboarding server screen only when teams.length is 0

* Add tests

* Add more tests

* Fix issue where callback would not re-evaluate variables
2022-11-04 16:11:56 +02:00
Devin Binnie 6ae055728d
Downloads fixes (#2331)
* Add file extension when necessary

* [MM-48017] Set the bounds for the dropdowns on finished resize
2022-10-28 16:19:59 -04:00
Tasos Boulis ca62814ce6
[MM-47970] + [MM-47754] Downloads fixes (#2326)
* Use downloads location as default when clicking "Save as". Remove update from downloads after upgrade when application starts

* Fix issue where "addedAt" was extracted from undefined object

* Fix tests
2022-10-27 13:00:28 -04:00
Devin Binnie 635a41f998
[MM-47801][MM-45980] Added support for security-scoped bookmarks to allow the MAS build to save files wherever needed (#2315)
* First pass

* [MM-47801] Added support for security-scoped bookmarks to allow the MAS build to save files wherever needed
2022-10-25 15:02:00 +03:00
Tasos Boulis 0f51a628f0
[MM-47776] Reverse order of input fields in server welcome screen (#2309)
* Reverse order of inputs in Server modals (add/edit)

* Revert "Reverse order of inputs in Server modals (add/edit)"

This reverts commit f3d577dcd5c0e13d6d0e3c2cc4de588008f53e68.

* Update order of server fields in welcome screens

* Update server modal focus test

* Add margin between inputs
2022-10-24 10:59:09 -04:00
Tasos Boulis 33da0afce5
[MM-47842] Make "save as" in context menu show the save dialog (#2311)
* Make "save as" in context menu show the save dialog

* Update tests
2022-10-24 10:08:04 -04:00
Devin Binnie dc49003d38
[MM-47779] Prevent crash when either URL view or main window was destroyed first (#2300) 2022-10-21 09:19:33 -04:00
Tasos Boulis f7f38102d8
Reposition 3-dot menu only when it is open (#2304) 2022-10-21 16:16:39 +03:00
Devin Binnie 179eacb582
[MM-47778] Remove Sign into another Server menu item when no servers exist (#2301) 2022-10-21 09:14:02 -04:00
Tasos Boulis 167f7d832a
[MM-47754] Remove update from downloads when "Restart and Upgrade" is clicked (#2299)
* Remove update from downloads when "Restart and Upgrade" is clicked

* Fix failing test

* Mock downloadsManager in autoUpdater tests
2022-10-21 13:27:24 +03:00
Tasos Boulis aa28948800
Fix color issues in Downloads dropdown (#2298)
* Fix color issues in Downloads dropdown

* More styling changes
2022-10-21 12:52:52 +03:00
Tasos Boulis 1f5f5ef71d
[MM-47756] Close Downloads when clicking in tabBar (Windows) (#2293)
* Make tabBar disabled when dropdowns are open so that clicking there can close them

* Update src/renderer/components/MainPage.tsx

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>

* Remove console

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
2022-10-20 16:47:53 +03:00
Tasos Boulis bbf162e7d0
Disabled Clear All button when downloads include only the application update and when they also include files, clear only the files (#2294) 2022-10-20 16:20:51 +03:00
Tasos Boulis cf647ce3e9
[MM-36456] Add support for Gnome's do-not-disturb (#2278)
* Add support for gnome do-not-disturb mode

* Add tests

* Invert condition
2022-10-17 16:37:42 +03:00
Tasos Boulis d5cf3e76e1
Fix issue where update progress was not displayed (#2286) 2022-10-14 11:17:51 -04:00
Tasos Boulis 9f7a96e794
Fix 3-dot menu not losing focus after clicking outside (Windows). Related to MM-46424 (#2242) 2022-10-12 18:04:15 +03:00
Devin Binnie 0ac53605c0
[MM-47279] Upgrade to Electron v21 (#2270)
* WIP

* Fixed robotjs on windows
2022-10-11 14:02:54 -04:00
Tasos Boulis a5dac0f4b2
Fix issue with downloads position after window (un)maximize (#2273) 2022-10-07 10:14:17 -04:00
Tasos Boulis a4b05c601b
Remove duplicate handler for showing file in folder (#2274) 2022-10-07 10:14:03 -04:00
Tasos Boulis 131b5fa2ac
[MM-22239] Downloads dropdown (#2227)
* WIP: show/hide temp downloads dropdown

* WIP: Position downloads dropdown correctly under the button

* WIP: Use correct width for dropdown so that right radius and shadows are displayed

* WIP: Add items to download list after finished downloading

* WIP: Add download item base components

* Add "clear all" functionality

* Use type Record<> for downloads saved in config

* Add styling to files in the downloads dropdown

* Open file in folder when clicking it from downloads dropdown. Center svg in parent element

* Update scrollbar styling

* Update scrollbar styling

* Update state of downloaded items if deleted from folder

* Add progress bar in downloads

* Use "x-uncompressed-content-length" in file downloads.

* Keep downloads open when clicking outside their browserview

* Use correct color for downloads dropdown button

* Add better styling to downloads dropdown button

* Allow only 50 download files maximum. Oldest file is being removed if reached

* Autoclose downloads dropdown after 4s of download finish

* Add file thumbnails

* Dont show second dialog if first dismissed

* Add red badge when downloads running and dropdown closed

* Add menu item for Downloads

* Add support for more code file extensions

* Open downloads dropdown instead of folder from the menu

* Run lint:js and fix problems

* Add tests for utils

* Fix issue with dropdown not displaying

* Remove unecessary comment

* Move downloads to separate json file, outside Config

* Add downloads dropdown menu for the 3-dot button

* Dont show dev tools for downloads

* Add cancel download functionality

* Add dark mode styling

* Use View state for downloadsMenu open state

* Fix some style issues

* Add image preview for downloaded images

* Remove extra devTool in weback config

* Fix issue with paths on windows

* Align items left in downloads menu

* Use pretty-bytes for file sizes

* Show download remaining time

* Close downloads dropdown when clicking outside

* Show different units in received bytes when they are different from the total units (kb/mb)

* Dont hide downloads when mattermost view is clicked

* Keep downloads open if download button is clicked

* Use closest() to check for download clicks

* Fix unit tests.
Add tests for new Views and downloadManager
Add @types/jest as devDependency for intellisense

* Remove unecessary tsconfig for jest

* Fix types error

* Add all critical tests for downloadsManager

* WIP: add e2e tests for downloads

* WIP: add e2e tests for downloads

* Rename downloads spec file

* WIP: make vscode debugger work for e2e tests

* Remove unused mock

* Remove defaults for v4 config

* Use electron-mocha for e2e debugger

* Fix e2e tests spawning JsonFileManager twice

* Add async fs functions and add tests for download item UI

* Add async fs functions and add tests for download item UI

* Improve tests with "waitForSelector" to wait for visible elements

* Wait for page load before assertions

* Add tests for file uploads/downloads

* Dont show native notification for completed downloads if dropdown is open

* Increment filenames if file already exists

* Fix antializing in downloads dropdown

* Fix styling of downloads header

* Increase dimensions of green/red icons in downloads

* Fix styling of 3-dot button

* Fix unit tests

* Show 3-dot button only on hover or click

* PR review fixes

* Revert vscode debug fixes

* Mock fs.constants

* Mock fs instead of JsonFileManager in downlaods tests

* Mock fs instead of JsonFileManager in downlaods tests

* Add necessary mocks for downloads manager

* Mark file as deleted if user deleted it

* Fix min-height of downloads dropdown and 3-dot icon position

* Add more tests

* Make size of downloads dropdown dynamic based on content

* Combine log statements

* Close 3-dot menu if user clicks elsewhere

* Move application updates inside downloads dropdown

* Fix update issues

* Fix ipc event payload

* Add missing prop

* Remove unused translations

* Fix failing test

* Fix version unknown

* Remove commented out component
2022-10-07 11:40:27 +03:00
David Edler e3e8ee0362
disable flashWindow on linux, it doesn't work and causes notifications without context #2262 (#2263) 2022-09-30 12:53:05 +03:00
Devin Binnie 7c3b68fb68
[MM-46857] Remove misleading console error about tab status when servers don't exist (#2260) 2022-09-21 08:53:43 -04:00
Julian Mondragón c3493b09ff
MM-45981_Desktop: Add Server Screen: Improve Onboarding screens (#2243) 2022-09-16 10:35:37 -05:00
Pantelis Vratsalis 7e414bdf5a
Change order of fields in add server modal to match the one in mobile v2 (#2230) 2022-09-02 12:30:20 -04:00
Tasos Boulis 172025f037
Make writeToFile return a Promise in JsonFileManager (#2246)
* Make writeToFile return a Promise in JsonFileManager

* Add return after promise reject
2022-09-01 12:42:51 -04:00
Devin Binnie 4c968dc747
Add webContents listeners to modals (#2247)
* Add webContents listeners to modals

* Fix tests
2022-09-01 09:41:06 -04:00
Tasos Boulis 6d550a8a16
Add recommended VSCode extensions (#2244)
* Add code spell check and i18n-ally to recommended vscode extens
ions

* Add EditorConfig to recommended extensions and formatCodeOnAction to use eslint fix
2022-08-29 17:15:25 -04:00
Devin Binnie f95fce2c85
Remove notification logging from info (#2245) 2022-08-29 09:19:58 -04:00
Devin Binnie 840c640fdf
[MM-46405] Drop support for asterisk-based unreads (#2239) 2022-08-25 14:23:29 -04:00
Devin Binnie 78d9a41a7b
[MM-45003] Fix the infinite redirect caused by MFA sending the login signal repeatedly (#2237)
* [MM-45003] Fix the infinite redirect caused by MFA sending the login signal repeatedly

* Update src/main/windows/windowManager.ts

Co-authored-by: Tasos Boulis <tboulis@hotmail.com>

Co-authored-by: Tasos Boulis <tboulis@hotmail.com>
2022-08-25 14:21:36 -04:00
Devin Binnie f58a4b1826
[MM-46533] Remove buildConfig item and add webpack flags for onboarding screens and GPU acceleration (#2241)
* [MM-46533] Remove buildConfig item and add webpack flags for onboarding screens and GPU acceleration

* REVERT ME

* Use contexts instead

* Revert "REVERT ME"

This reverts commit 1e75779623f1c5eb2ce3a64e0c39cd4a8cf7ada7.
2022-08-25 10:58:06 -04:00
Julian Mondragón 8f8407c16a
MM-46445_Add a way to bypass Desktop App onboarding to buildConfig (#2232) 2022-08-23 11:19:41 -04:00
Devin Binnie 455d0c334a
Fix for mac unit tests (#2231) 2022-08-19 12:10:12 +08:00
Julian Mondragón faf2dae74b
MM-25003_Improve Onboarding screens for the desktop app - Intro Screen (#2220) 2022-08-16 12:33:03 -05:00
Devin Binnie 1270859d39
[MM-46101] Move allowed protocols to build config (#2217) 2022-08-15 09:06:31 -04:00
Devin Binnie 0c2f0676d1
[MM-46114] More fixes for Windows resizing (#2216) 2022-08-03 10:51:13 -04:00
Devin Binnie 1e35a97f33
[MM-36326][MM-45669] Added Native Node Module support - incl demo to fix DND issue (#2195)
* [MM-36326] Added Native Node Module support - incl demo to fix DND issue

* Fix OS per build

* Fix to include priority alarms on Windows

* Update node command

* Fixes for mac (only work on non-MAS build)

* Attempt to rebuild properly since electron-builder is having issues with a module

* Show me more logs maybe idk

* Try with ignore-scripts

* Force async to work asyncly

* PR feedback and ESLint fixes

* Add comment for node-gyp

* Revert me: test msi and mac installer

* Revert me too

* Try reverting back to the old system cause the new one miraculously broke...

* Add ignore scripts to makefile

* Ignore non-macho files :P

* Revert "Revert me too"

This reverts commit 074dc9551a2d8ce34a23a3abaeed937d957e8b76.

* Revert "Revert me: test msi and mac installer"

This reverts commit 0ac998c26a824e7136bdfdc825280a407bb1aa7f.
2022-08-02 11:33:48 -04:00
Devin Binnie fcc9215f37
Fix windows resize (#2214) 2022-07-29 11:07:05 -04:00
Devin Binnie 829b49571f
[MM-43941] Optimize app resizing on Windows/Linux by waiting for the viewport to resize (#2204)
* [MM-43941] Optimize app resizing on Windows/Linux by waiting for the viewport to resize

* Some mitigations for Windows

* Make the logs sillier

* Fixed the no servers case

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-26 10:25:13 -04:00
Devin Binnie e73e77daf9
Fix some issues caused by i18n addition (#2209)
* Fix some issues caused by i18n addition

* Couple more small changes
2022-07-26 09:11:56 -04:00
Devin Binnie 40c072981a
[MM-44229] Ignore and untrust cross-origin certificates from existing Mattermost servers (#2205) 2022-07-20 17:09:12 -04:00
Devin Binnie ad3e1500cc
[MM-45646] Change download notification text to display saved filename instead of original (#2203) 2022-07-20 15:46:03 -04:00
Devin Binnie 2618abe822
Fixed an issue with a permission modal translation (#2197)
* Fixed an issue with a permission modal translation

* oops
2022-07-15 09:26:48 -04:00
Devin Binnie 59e4e7e516
[MM-14058] Add support for i18n (#2190)
* Add language files

* Add react-intl, mmjstool, setup for adding translations

* Translated main module

* Translations for renderer

* A few minor fixes

* More fixes

* Add CI, add missing menu translations, other cleanup

* Added setting to manually select the language of the app

* Force English for E2e

* Unit tests

* Fix mmjstool

* Move set language to before update menu

* PR feedback
2022-07-14 11:04:18 -04:00
Tasos Boulis 22c97591d5
[MM-40233] Swap names for dark/light tray icons on Linux and Windows (#2180)
* Swap names for dark/light tray icons for linux and windows.

* Swap icon tray themes when system default is used

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-06 09:47:09 -04:00
Tasos Boulis aa21179f8f
[MM-44931] Allow zoom in/out when Shift is pressed (#2178)
* Add hidden menuitems for zoomIn zoomOut with shift

* Add e2e tests for zoom in/out with shift

* Fix e2e tests

* Add missing async

* Fix lint errors

* Put tests inside describes

* Fix lint errors

* Update e2e/specs/menu_bar/view_menu.test.js

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>

* Update e2e/specs/menu_bar/view_menu.test.js

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
2022-06-30 14:14:47 -04:00
Devin Binnie c6cc870e19
[MM-44932] Fixed issue where deleting a server doesn't switch to another server (or show the new server modal) (#2174) 2022-06-28 08:00:25 -04:00
Devin Binnie 055c699c70
[MM-44071] Fixed an issue where the first certificate could not be selected (#2162) 2022-06-22 11:04:38 -04:00