diff --git a/CHANGELOG.md b/CHANGELOG.md index 9de8e25d..10760879 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,53 +1,61 @@ # Mattermost Desktop Application Changelog -## UNDER DEVELOPMENT +## Release v3.5.0 -The "UNDER DEVELOPMENT" section of the Mattermost Desktop changelog appears in the product's `master` branch -to note key changes committed to `master` and are on their way to the next stable release. -When a stable release is pushed, "UNDER DEVELOPMENT" heading is removed from the final changelog of the release. - -Release date: TBD +Release date: December 14, 2016 ### Improvements - - "Cannot connect to Mattermost" is now on top of the page - - Suppressed verbose error which is related to certificates - - Clear cache on desktop app update: The application cache will be purged whenever the desktop app version changes - - Added CTRL+SHIFT+MINUS as a shortcut for zooming out - - Show URL when the mouse cursor is hovering over links + +#### All Platforms + - URL address is shown when hovering over links with a mouse + - Link addresses can now be copied and pasted inside the app + - Added `CTRL+SHIFT+MINUS` as a shortcut for decreasing font size (zooming out) + - Reduce upgrade issues by properly clearing cache when updating the desktop app to a new version (the application cache will be purged whenever the desktop app version changes) + - When disconnected from Mattermost, the "Cannot connect to Mattermost" page is now properly aligned at the top of the window + - Suppressed error messages when launching the app from the command line and `certificate.json` is missing in the user data directory #### Windows - - Copying a links address and pasting it inside the app now works - -#### macOS - -#### Linux (Beta) + - Link addresses can now be copied and pasted inside the app ### Bug Fixes - - Fixed wrong cursor for "Edit" and "Remove" in Setting page - - Fixed an issue where "Zoom in/out" does not properly work - - YouTube preview works, even if mixed content is allowed + +#### All Platforms + - YouTube previews now work, even if mixed content is allowed + - Fixed an incorrect cursor mode for "Edit" and "Remove" buttons on the Settings page + - Fixed an issue where "Zoom in/out" settings did not properly work #### Windows - - The accelerator of "Redo" is now shown as `Ctrl+Y` + - The menu bar option for "Redo" is now properly shown as `CTRL+Y` -#### macOS +#### Mac - Fixed an issue where the default download folder was `Macintosh HD` - - Removed the unexpected "Show Tab Bar" menu item on macOS 10.12 + - Removed an unexpected "Show Tab Bar" menu item on macOS 10.12 #### Linux (Beta) - Fixed an issue where the option "Leave app running in notification area when the window is closed" was never enabled. -### New Known Issues -This part should be merged with "Known Issues" when releasing new version. +### Known Issues - - "Zoom in/out" does not properly work when the tab bar has focus +#### All Platforms + - [If you click twice on the tab bar, and then attempt to use the "Zoom in/out" to change font size, the app window doesn't render properly](https://github.com/mattermost/desktop/issues/334) + - [Direct messages cause notification icons to appear on each team on the tab bar, which don't clear until you click on each team](https://github.com/mattermost/desktop/issues/160) + - [After right-clicking an image or a link, the "Copy Link" option sometimes moves around when clicking different places afterwards](https://github.com/mattermost/desktop/issues/340) #### Windows - - The vertical position of mouse cursor is randomly incorrect when using DPI of 150% + - [Windows 7] [Sometimes the app tries to render the page inside the app instead of in a new browser tab when clicking links](https://github.com/mattermost/desktop/issues/369) -#### OS X +#### Mac + - [After uploading a file with a keyboard shortcut, focus isn't set back to the message box](https://github.com/mattermost/desktop/issues/341) -#### Linux +#### Linux (Beta) + - [Ubuntu - 64 bit] [Right clicking taskbar icon and choosing **Quit** only minimizes the app](https://github.com/mattermost/desktop/issues/90#issuecomment-233712183) + - [Ubuntu - 64 bit] [Direct message notification comes as a streak of line instead of a pop up](https://github.com/mattermost/platform/issues/3589) + +### Contributors + +Many thanks to all our contributors. In alphabetical order: + +- [itsmartin](https://github.com/itsmartin), [jasonblais](https://github.com/jasonblais), [jcomack](https://github.com/jcomack), [jnugh](https://github.com/jnugh), [kytwb](https://github.com/kytwb), [magicmonty](https://github.com/magicmonty), [Razzeee](https://github.com/Razzeee), [yuya-oc](https://github.com/yuya-oc) ---- @@ -57,7 +65,7 @@ Release date: September 30, 2016 ### Bug Fixes -#### OS X +#### Mac - Fixed an issue where the app window pops up second to foreground when a new message is received ---- @@ -72,92 +80,62 @@ Version number updated to 3.4 to make numbering consistent with Mattermost serve ### Improvements -#### Windows +#### All Platforms - Current team and channel name shown in window title bar - Team tab is bolded for unread messages and has a red dot with a count of unread mentions - - Added an option to configure whether a red badge is shown on taskbar icon for unread messages - Added new shortcuts: - - `CTRL + S`: sets focus on the Mattermost search box - - `ALT + Left Arrow`: go to previous page in history - - `ALT + Right Arrow`: go to next page in history + - `CTRL+S`; `CMD+S` on Mac: sets focus on the Mattermost search box + - `ALT+Left Arrow`; `CMD+[` on Mac: go to previous page in history + - `ALT+Right Arrow`; `CMD+]` on Mac: go to next page in history - Upgraded the Settings page user interface - - Added access to the settings menu from the system tray icon - - Added validation for name and URL when adding a new team on the Settings page - The app now tries to reconnect periodically if a page fails to load - - Only one instance of the desktop application will now load at a time + - Added validation for name and URL when adding a new team on the Settings page -#### OS X - - Current team and channel name shown in window title bar - - Team tab is bolded for unread messages and has a red dot with a count of unread mentions +#### Windows + - Added access to the settings menu from the system tray icon + - Only one instance of the desktop application will now load at a time + - Added an option to configure whether a red badge is shown on taskbar icon for unread messages + +#### Mac - Added an option to configure whether a red badge is shown on taskbar icon for unread messages - - Added new shortcuts: - - `CMD + S`: sets focus on the Mattermost search box - - `CMD + [`: go to previous page in history - - `CMD + ]`: go to next page in history - - Upgraded the Settings page user interface - - The app now tries to reconnect periodically if a page fails to load - - Added validation for name and URL when adding a new team on the Settings page #### Linux (Beta) - - Current team and channel name shown in window title bar - - Team tab is bolded for unread messages and has a red dot with a count of unread mentions - Added an option to flash taskbar icon when a new message is received - Added a badge to count mentions on the taskbar icon (for Unity) - Added a script, `create_desktop_file.sh` to create `Mattermost.desktop` desktop entry to help [integrate the application into a desktop environment](https://wiki.archlinux.org/index.php/Desktop_entries) more easily - - Added new shortcuts: - - `CTRL + S`: sets focus on the Mattermost search box - - `ALT + Left Arrow`: go to previous page in history - - `ALT + Right Arrow`: go to next page in history - - Upgraded the Settings page user interface - Added access to the settings menu from the system tray icon - - The app now tries to reconnect periodically if a page fails to load - - Added validation for name and URL when adding a new team on the Settings page - Only one instance of the desktop application will now load at a time ### Bug Fixes -#### Windows +#### All Platforms - Cut, copy and paste are shown in the user interface only when the commands are available - Copying link addresses now work properly - Saving images by right-clicking the image preview now works - Refreshing the app page no longer takes you to the team selection page, but keeps you on the current channel + - Fixed an issue where the maximized state of the app window was lost in some cases + - Fixed an issue where shortcuts didn't work when switching applications or tabs in some cases + +#### Windows - Removed misleading shortcuts from the system tray menu - Removed unclear desktop notifications when the application page fails to load - Fixed the Mattermost icon for desktop notifications in Windows 10 - - Fixed an issue where the maximized state of the app window was lost in some cases - - Fixed an issue where shortcuts didn't work when switching applications or tabs in some cases - Fixed an issue where application icon at the top left of the window was pixelated - Fixed an issue where the application kept focus after closing the app window -#### OS X - - Cut, copy and paste are shown in the user interface only when the commands are available - - Copying link addresses now work properly - - Saving images by right-clicking the image preview now works - - Refreshing the app page no longer takes you to the team selection page, but keeps you on the current channel - - Fixed an issue where the maximized state of the app window was lost in some cases - - Fixed an issue where shortcuts didn't work when switching applications or tabs in some cases - #### Linux (Beta) - - Cut, copy and paste are shown in the user interface only when the commands are available - - Copying link addresses now work properly - - Saving images by right-clicking the image preview now works - - Refreshing the app page no longer takes you to the team selection page, but keeps you on the current channel - Removed misleading shortcuts from the system tray menu - Removed unclear desktop notifications when the application page fails to load - - Fixed an issue where the maximized state of the app window was lost in some cases - - Fixed an issue where shortcuts didn't work when switching applications or tabs in some cases ### Known Issues +#### All Platforms + - YouTube videos do not work if mixed content is enabled from app settings + #### Windows - Copying a link address and pasting it inside the app doesn't work - - YouTube videos do not work if mixed content is enabled from app settings - -#### OS X - - YouTube videos do not work if mixed content is enabled from app settings #### Linux - - YouTube videos do not work if mixed content is enabled from app settings - [Ubuntu - 64 bit] Right clicking taskbar icon and choosing **Quit** only minimizes the app - [Ubuntu - 64 bit] [Direct message notification comes as a streak of line instead of a pop up](https://github.com/mattermost/platform/issues/3589) @@ -177,30 +155,11 @@ Release date: 2016-07-18 ### Improvements -#### Windows -- Added an installer for better install experience. -- The app now minimizes to the system tray when application window is closed. -- Added an option to launch application on login. -- Added an option to blink the taskbar icon when a new message has arrived. -- Added tooltip text for the system tray icon in order to show count of unread channels/mentions. -- Added an option to toggle the app to minimize/restore when clicking on the system tray icon. +#### All Platforms - Added auto-reloading when tab fails to load the team. - Added the ability to access all of your teams by right clicking the system tray icon. -#### OS X -- Added colored badges to the menu icon when there are unread channels/mentions. -- Added an option to minimize the app to the system tray when application window is closed. -- Added auto-reloading when tab fails to load the team. -- Added the ability to access all of your teams by right clicking the system tray icon. - -#### Linux (Beta) -- Added an option to show the icon on menu bar (requires libappindicator1 on Ubuntu). -- Added an option to launch application on login. -- Added an option to minimize the app to the system tray when application window is closed. -- Added auto-reloading when tab fails to load the team. -- Added the ability to access all of your teams by right clicking the system tray icon. - -#### Menu Bar +##### Menu Bar - New Keyboard Shortcuts - Adjust text size - Ctrl+0 (Menu Bar -> View -> Actual Size): Reset the zoom level. @@ -218,10 +177,27 @@ Release date: 2016-07-18 - Link to [**Mattermost Docs**](docs.mattermost.com) - Field to indicate the application version number. -#### Settings Page +##### Settings Page - Added a "+" button next to the **Teams** label, which allows you to add more teams. - Added the ability to edit team information by clicking on the pencil icon to the right of the team name. +#### Windows +- Added an installer for better install experience. +- The app now minimizes to the system tray when application window is closed. +- Added an option to launch application on login. +- Added an option to blink the taskbar icon when a new message has arrived. +- Added tooltip text for the system tray icon in order to show count of unread channels/mentions. +- Added an option to toggle the app to minimize/restore when clicking on the system tray icon. + +#### Mac +- Added colored badges to the menu icon when there are unread channels/mentions. +- Added an option to minimize the app to the system tray when application window is closed. + +#### Linux (Beta) +- Added an option to show the icon on menu bar (requires libappindicator1 on Ubuntu). +- Added an option to launch application on login. +- Added an option to minimize the app to the system tray when application window is closed. + ### Other Changes - Application license changed from MIT License to Apache License, Version 2.0. @@ -234,7 +210,7 @@ Release date: 2016-07-18 - Fixed the blurred system tray icon. - Fixed a redundant description appearing in the pinned start menu on Windows 7. -#### OS X +#### Mac - Fixed two icons appearing on a notification. ### Known Issues @@ -259,7 +235,7 @@ Many thanks to all our contributors. In alphabetical order: ### Improvements - Added a dialog to confirm use of non-http(s) protocols prior to opening links. For example, clicking on a link to `file://test` will open a dialog to confirm the user intended to open a file. -#### Windows and OS X +#### Windows and Mac - Added a right-click menu option for tray icon to open the Desktop application on Windows and OS X. ### Known issues @@ -286,7 +262,7 @@ This release contains a security update and it is highly recommended that users - Add **Allow mixed content** option to render images with `http://`. - Add the login dialog for http authentication. -#### OS X +#### Mac - Add the option to show the icon on menu bar. #### Linux diff --git a/package.json b/package.json index 5206979b..27f7b1f7 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "chai-as-promised": "^5.3.0", "cross-env": "^3.1.2", "devtron": "^1.3.0", - "electron": "1.4.6", + "electron": "1.4.12", "electron-builder": "^7.11.2", "electron-connect": "~0.6.0", "eslint": "^3.4.0", @@ -76,7 +76,7 @@ }, { "from": "resources/linux", - "filter": "create_desktop_file.sh" + "filter": ["create_desktop_file.sh", "README.md"] } ] }, diff --git a/resources/linux/README.md b/resources/linux/README.md new file mode 100644 index 00000000..3f4d42f0 --- /dev/null +++ b/resources/linux/README.md @@ -0,0 +1,69 @@ +# Mattermost Desktop for Linux + +## Table of Contents + +- [Install](#install) +- [User Guide](#user-guide) +- [Contributing](#contributing) +- [License](#license) + + +## Install + +If you installed the application via a package manager, it's ready to use in your system. Please follow the [User Guide](#user-guide) for further information. + +Otherwise, first locate the extracted directory in your desired directory (e.g. `/opt/mattermost-desktop-`) and follow the steps below. + +### Desktop launcher + +Execute the script file to create a `Mattermost.desktop` file. + +``` +/opt/mattermost-desktop-/create_desktop_file.sh +``` + +Then move it to the appropriate directory of your desktop environment. For example, on Ubuntu Unity it's `~/.local/share/applications/` for the current user. + +``` +mv Mattermost.desktop ~/.local/share/applications/ +``` + +### Terminal command + +Set a `PATH` environment variable to enable launching from the terminal. For example, you can append the following line into `~/.bashrc`. + +```sh +# assuming that /opt/mattermost-desktop-/mattermost-desktop is the executable file. +export PATH=$PATH:/opt/mattermost-desktop- +``` + +Alternatively, you can also create a symbolic link for the application. + +```sh +sudo ln -s /opt/mattermost-desktop-/mattermost-desktop /usr/local/bin/ +``` + +You're now all set! See the [User Guide](#user-guide) below for instructions. + + +## User Guide + +After launching, you need to configure the application to interact with your team. + +1. If you don't see a page titled "Settings", select **File** > **Settings...** from the menu bar. +2. Click **Add new team** next to the right of Team Management section. +3. Enter **Name** and a valid **URL**, which begins with either `http://` or `https://`. +4. Click **Add**. +5. Click **Save**. + +More guides are available at [Mattermost Documentation](https://docs.mattermost.com/help/apps/desktop-guide.html). + + +## Contributing + +See [contributing guidelines](https://github.com/mattermost/desktop/blob/master/CONTRIBUTING.md) for reporting bugs, features or submitting pull requests. + + +## License + +Apache License, Version 2.0 diff --git a/resources/linux/create_desktop_file.sh b/resources/linux/create_desktop_file.sh index 3eb06b7d..3241c30f 100755 --- a/resources/linux/create_desktop_file.sh +++ b/resources/linux/create_desktop_file.sh @@ -9,7 +9,7 @@ cat < Mattermost.desktop [Desktop Entry] Name=Mattermost Comment=Mattermost Desktop application for Linux -Exec="${FULL_PATH}/Mattermost" +Exec="${FULL_PATH}/mattermost-desktop" Terminal=false Type=Application Icon=${FULL_PATH}/icon.png diff --git a/src/browser/components/SettingsPage.jsx b/src/browser/components/SettingsPage.jsx index 0eaeeb2d..c4509dfa 100644 --- a/src/browser/components/SettingsPage.jsx +++ b/src/browser/components/SettingsPage.jsx @@ -1,5 +1,6 @@ const React = require('react'); -const {Button, Checkbox, Col, FormGroup, Grid, Navbar, Row} = require('react-bootstrap'); +const ReactDOM = require('react-dom'); +const {Button, Checkbox, Col, FormGroup, FormControl, ControlLabel, Grid, Navbar, Row} = require('react-bootstrap'); const {ipcRenderer, remote} = require('electron'); const AutoLaunch = require('auto-launch'); @@ -114,7 +115,7 @@ const SettingsPage = React.createClass({ }, handleChangeTrayIconTheme() { this.setState({ - trayIconTheme: !this.refs.trayIconTheme.props.checked + trayIconTheme: ReactDOM.findDOMNode(this.refs.trayIconTheme).value }); }, handleChangeAutoStart() { @@ -123,9 +124,7 @@ const SettingsPage = React.createClass({ }); }, handleChangeMinimizeToTray() { - var shouldMinimizeToTray = - (process.platform !== 'darwin' || !this.refs.showTrayIcon.props.checked) && - !this.refs.minimizeToTray.props.checked; + const shouldMinimizeToTray = this.state.showTrayIcon && !this.refs.minimizeToTray.props.checked; this.setState({ minimizeToTray: shouldMinimizeToTray @@ -191,16 +190,19 @@ const SettingsPage = React.createClass({ } if (process.platform === 'linux') { options.push( - {'Icon theme (Need to restart the application)'} - - - ); + + {'Icon theme (Need to restart the application)'} + + + + + ); } options.push( { } case 'linux': { - const theme = config.trayIconTheme || 'light'; - return { - normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconTemplate.png')), - unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconUnreadTemplate.png')), - mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconMentionTemplate.png')) - }; + const theme = config.trayIconTheme; + try { + return { + normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconTemplate.png')), + unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconUnreadTemplate.png')), + mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconMentionTemplate.png')) + }; + } catch (e) { + //Fallback for invalid theme setting + return { + normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconTemplate.png')), + unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconUnreadTemplate.png')), + mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', 'light', 'MenuIconMentionTemplate.png')) + }; + } } default: return {};