Commit graph

1397 commits

Author SHA1 Message Date
Devin Binnie c55e37da2f
[MM-45780] Update to macos-notification-state 3.0, update entitlements and provisioning profile to allow Communication Notification access (#2972)
* [MM-45780] Update to macos-notification-state 3.0, update entitlements and provisioning profile to allow Communication Notification access

* Remove extra entitlements

* Add proper inherit
2024-03-11 09:37:38 -04:00
Devin Binnie 9b36c25e4e
[MM-52696] Upgrade and clean up Desktop App dev dependencies (#2970)
* Upgrade to ESLint v8

* Upgrade TypeScript, api-types, react-intl

* Remove unnecessary dependencies

* Update to React 17.0.2

* npm audit fixes, remove storybook

* Lock some packages

* Remove nan patch

* Remove some deprecated dependencies

* Fix lint/type/tests

* Merge'd

* Fix bad use of spawn

* Fix notarize

* Fix afterpack, switch to tsc es2020

* Fix api types

* Use @mattermost/eslint-plugin
2024-03-07 15:55:33 -05:00
Devin Binnie 12d59cd81c
[MM-48518] Include renderer logs in main log (#2969) 2024-03-06 09:42:34 -05:00
Devin Binnie 405403ca99
[MM-56882] Fix a potential crash in diagnostics (#2960) 2024-02-16 12:27:30 -05:00
Devin Binnie 68034b166f
[MM-54872] Ensure matched subpaths are exact and not substrings of each other (#2958) 2024-02-12 08:45:08 -05:00
Devin Binnie 1a7516aac9
[MM-55134] Don't blank the Site URL when it's not properly configured on an otherwise working server (#2959) 2024-02-12 08:44:45 -05:00
Claudio Costa 1613eb17bc
[MM-55503] Update Calls Desktop API (#2937)
* Update Calls Desktop API

* Update tests

* Handle Calls links internally

---------

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
2024-01-24 10:54:19 -05:00
Claudio Costa 3308730f13
[MM-55720] Add menu item to open developer tools for Call Widget window (#2936)
* Add menu item to open developer tools for Call Widget window

* Add dedicated Developer Tools submenu
2024-01-09 17:31:06 -06:00
Devin Binnie 113fda79b1
Fixed a crash when the view loads for the first time (#2931) 2023-12-15 11:32:32 -05:00
Devin Binnie 0cab09b7f5
[MM-55152] Add new Desktop API endpoints, improve preload script, some clean-up (#2900)
* Add constants for app info, add to API

* Migrate history button

* Converted calls API over to context bridge, removed some unnecessary logging

* Convert to TS, add types for web app to consume

* Fix tests, prune

* Fix lint

* More changes to support the legacy API

* Force legacy code off, add support for unreads/mentions/expired through the API

* Fix issues with cross-tab login, removed need for log in/log out signalling

* Fixed test, typos

* Change package name for types

* Add some other stuff to the types

* PR feedback

* More feedback

* Use npm package

* Change types and API to provide off listeners

* Version number

* Lock

* Fix typo

* Add sessionID for calls
2023-12-13 09:39:46 -05:00
Hasan Can 9f80b7d82b
customize taskbar icon depending to session (#2899)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-12-05 11:22:53 -05:00
Devin Binnie d2b03fdc7c
Fix session expired issue (#2921) 2023-12-01 09:57:02 -05:00
Michael Waiblinger 8171f0f0fa
Add x-scheme-handler to the desktop file script (#2917)
Co-authored-by: wiebel <mail@wiebel.org>
2023-11-28 08:56:30 -05:00
Devin Binnie 762324b596
[MM-55317] Force deep linking to use formatted path names when rewriting the URL (#2907)
* [MM-55317] Force deep linking to use formatted path names when rewriting the URL

* PR feedback
2023-11-10 10:48:26 -05:00
Devin Binnie a1071277d6
[MM-55261] Allow embedded video links to go fullscreen after a permission check (#2905) 2023-11-10 09:02:34 -05:00
Devin Binnie 9faaa79064
[MM-55054] Consider a matching origin for a media request as a trusted URL when checking permissions (#2893) 2023-11-02 12:21:58 -04:00
Devin Binnie 3a099c699b
Add argument passing to the desktop file script (#2896) 2023-10-27 08:03:45 -04:00
Devin Binnie 8a52a94dd6
[MM-54979] Stop auto opening Boards/Playbooks tabs, close existing open tabs once for users that might have them open (#2886) 2023-10-25 09:18:50 -04:00
Michael Baumgartner 2ed96e9969
[GH 2874] Fix category for deb and clairfy directory information in README for linux (#2884)
* Remove expliced category from deb

The expliced category value for deb is not correct. The linux section
has a correct category value and deb is part of its target. So the
category from linux should be applied if there is no expliced one in the
deb section.
Issue: mattermost/desktop#2874

* Linux README: clarify where to find directory

Change the example directory to the path, where it is at a deb
installation. Add a hint that a reader in a local README already
found the correct directory.
Issue: mattermost/desktop#2874
2023-10-17 10:18:30 -04:00
Devin Binnie 36daa3d67e
[MM-54742] Force secure keyboard entry off when window loses focus and when servers switch (#2869)
* [MM-54742] Force secure keyboard entry off when window loses focus and when servers switch

* Fix for when window is not focused, added tests
2023-10-10 10:47:13 -04:00
Daniel Espino García 9aec7db821
Fix notifications not working (#2865)
* Fix notifications not working

* Transform into a manager

* Remove test accessor
2023-10-10 16:13:07 +02:00
Devin Binnie 02261c9de3
[MM-54701] Fix development deep linking for login for Windows/Linux (#2867)
* [MM-54701] Add exec and dist path for Windows dev deep linking

* Add script for Linux to add a desktop entry for deep linking

* Fix build
2023-10-10 10:07:10 -04:00
Devin Binnie 013d46da8a
[MM-54584] Fixed an issue where clicking on a link to an unregistered protocol on macOS would cause the app to crash (#2868) 2023-10-06 08:29:24 -04:00
Devin Binnie 8281bbbb37
[MM-54591] Use getVersion endpoint to report app name (#2862) 2023-09-29 11:16:29 -04:00
Devin Binnie 2a88175b09
[GH-2857] Allow only macOS to call setSecureKeyboardEntryEnabled (#2860) 2023-09-28 11:07:58 -04:00
Devin Binnie d2266ac109
[MM-54616] Remove regex matching for URL lookups (#2851) 2023-09-20 12:02:05 +02:00
Devin Binnie 47087a3176
Fix multiple permission dialogs displaying for the same permission check (#2849) 2023-09-19 12:07:47 +02:00
Devin Binnie b7e5c6091d
[MM-54465] Add Permissions Manager, require manual interaction to approve use of microphone and camera, to send notifications, and to use location per server (#2832) 2023-09-15 10:54:22 -04:00
Devin Binnie d5f5c4849a
[MM-54463] Enforce secure keyboard entry on macOS when a password box is focused (#2829)
* [MM-54463] Enforce secure keyboard entry on macOS when a password box is focused

* PR feedback
2023-09-15 10:24:19 -04:00
Devin Binnie 88e1fea4e7
Fix issue where logging will be stuck on info level (#2830) 2023-09-15 10:21:42 -04:00
Devin Binnie 128d15a283
[MM-54465] Remove lowercase call when checking path names (#2831) 2023-09-15 10:20:28 -04:00
Daniel Espino García 5afc8e738c
Fix top bar theme when changing the system settings (#2821) 2023-09-06 16:58:19 -04:00
Devin Binnie 06872452f4
[MM-54170] Automatically set the logging level to info if not specified (#2811)
* [MM-54170] Automatically set the logging level to info if not specified

* Fix test
2023-09-01 11:52:11 -04:00
Devin Binnie 80fcbf27c3
[MM-54276] Stop URL from being populated on validation regardless of change/timeout (#2814) 2023-09-01 11:50:56 -04:00
Devin Binnie b36b40e017
[MM-54321] Expose app name through the API correctly (#2813) 2023-09-01 11:47:13 -04:00
Devin Binnie 8bf7a59721
[MM-54279] Fix issues around working with saved downloads (#2812) 2023-09-01 11:46:22 -04:00
Devin Binnie 9c3febd4c9
[MM-53847] Expose isDev API to allow webapp to check if the app is in dev mode (#2800)
* [MM-53847] Expose isDev API to allow webapp to check if the app is in dev mode

* Fix test
2023-08-29 10:07:33 -04:00
Florian Apolloner f581f439df
Upgrade to Electron v26.1.0 (#2808)
* Upgrade to Electron v26.1.0

* Fix TS issues

---------

Co-authored-by: Devin Binnie <devin.binnie@mattermost.com>
2023-08-29 09:19:29 -04:00
Dmitry Lyzlov d8a42d68db
Replaced hardcoded app name with parameter in localizable strings (#2807) 2023-08-29 07:17:55 -04:00
Devin Binnie a05f408b80
[MM-53841] Remove upgrade notification if auto updates were switched off (#2801) 2023-07-31 09:19:40 -04:00
Devin Binnie d4a4defaa3
[MM-53490] Reduce min window width to 600px (#2787) 2023-07-18 09:42:53 -04:00
Devin Binnie adf4b40836
Fix React Developer Tools for some users (#2783)
* Fix react dev tools test

* Fix test
2023-07-11 11:32:49 -04:00
Devin Binnie 0519a119d7
[MM-50536] Add workaround for Dev Tools not opening correctly on Mac (#2777) 2023-06-30 11:46:44 -04:00
Christopher Poile 0728ddf42f
MM-52857 - Add call-join-request to calls widget (#2751)
* add call-join-request to calls widget

* targetID -> callID

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-26 10:17:47 -04:00
Devin Binnie 850573326c
[MM-53295] Fix crash in diagnostics when server is unreachable (#2771)
* [MM-53295] Fix crash in diagnostics when server is unreachable

* Fix URL parsing, lint fixes
2023-06-26 08:48:42 -04:00
Devin Binnie f51a7d31db
[MM-53294] Fix bad user feedback when plugins are disabled (#2772) 2023-06-23 09:50:39 -04:00
Devin Binnie 21e3044ff2
[MM-52333] Create Server View State module, move into new app module (#2739)
* Create Server View State Module

* Move currentServerId to serverViewState

* Move view state into server view state module

* PR feedback/bug fixes
2023-06-12 08:35:14 -04:00
Devin Binnie a7c25ee95e
[MM-53056] Force a pathname when checking for deep links (#2748) 2023-06-07 11:16:04 -04:00
Devin Binnie 1db2828a93
[MM-52984] Fix minimized window not showing when clicking the notification (#2745)
* Fix minimized window not showing when clicking the notification

* Fix tests
2023-06-01 13:01:27 -04:00
Devin Binnie 66b611bb1a
Fix window issues (#2730)
* Fixed the issue where the window doesn't remember the last window state

* Fixed issue with unsnapping windows on switching server on Windows

* Fix tests
2023-05-25 09:01:12 -04:00
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