Merge branch 'release-3.5'

This commit is contained in:
Yuya Ochiai 2016-12-14 20:52:38 +09:00
commit 166c4b7ae6
7 changed files with 190 additions and 127 deletions

View file

@ -1,53 +1,61 @@
# Mattermost Desktop Application Changelog # 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 Release date: December 14, 2016
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
### Improvements ### Improvements
- "Cannot connect to Mattermost" is now on top of the page
- Suppressed verbose error which is related to certificates #### All Platforms
- Clear cache on desktop app update: The application cache will be purged whenever the desktop app version changes - URL address is shown when hovering over links with a mouse
- Added CTRL+SHIFT+MINUS as a shortcut for zooming out - Link addresses can now be copied and pasted inside the app
- Show URL when the mouse cursor is hovering over links - 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 #### Windows
- Copying a links address and pasting it inside the app now works - Link addresses can now be copied and pasted inside the app
#### macOS
#### Linux (Beta)
### Bug Fixes ### Bug Fixes
- Fixed wrong cursor for "Edit" and "Remove" in Setting page
- Fixed an issue where "Zoom in/out" does not properly work #### All Platforms
- YouTube preview works, even if mixed content is allowed - 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 #### 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` - 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) #### Linux (Beta)
- Fixed an issue where the option "Leave app running in notification area when the window is closed" was never enabled. - Fixed an issue where the option "Leave app running in notification area when the window is closed" was never enabled.
### New Known Issues ### Known Issues
This part should be merged with "Known Issues" when releasing new version.
- "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 #### 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 ### Bug Fixes
#### OS X #### Mac
- Fixed an issue where the app window pops up second to foreground when a new message is received - 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 ### Improvements
#### Windows #### All Platforms
- Current team and channel name shown in window title bar - 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 - 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: - Added new shortcuts:
- `CTRL + S`: sets focus on the Mattermost search box - `CTRL+S`; `CMD+S` on Mac: sets focus on the Mattermost search box
- `ALT + Left Arrow`: go to previous page in history - `ALT+Left Arrow`; `CMD+[` on Mac: go to previous page in history
- `ALT + Right Arrow`: go to next page in history - `ALT+Right Arrow`; `CMD+]` on Mac: go to next page in history
- Upgraded the Settings page user interface - 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 - 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 #### Windows
- Current team and channel name shown in window title bar - Added access to the settings menu from the system tray icon
- Team tab is bolded for unread messages and has a red dot with a count of unread mentions - 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 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) #### 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 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 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 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 - 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 - Only one instance of the desktop application will now load at a time
### Bug Fixes ### Bug Fixes
#### Windows #### All Platforms
- Cut, copy and paste are shown in the user interface only when the commands are available - Cut, copy and paste are shown in the user interface only when the commands are available
- Copying link addresses now work properly - Copying link addresses now work properly
- Saving images by right-clicking the image preview now works - 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 - 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 misleading shortcuts from the system tray menu
- Removed unclear desktop notifications when the application page fails to load - Removed unclear desktop notifications when the application page fails to load
- Fixed the Mattermost icon for desktop notifications in Windows 10 - 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 application icon at the top left of the window was pixelated
- Fixed an issue where the application kept focus after closing the app window - 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) #### 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 misleading shortcuts from the system tray menu
- Removed unclear desktop notifications when the application page fails to load - 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 ### Known Issues
#### All Platforms
- YouTube videos do not work if mixed content is enabled from app settings
#### Windows #### Windows
- Copying a link address and pasting it inside the app doesn't work - 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 #### 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] 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) - [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 ### Improvements
#### Windows #### All Platforms
- 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.
- Added auto-reloading when tab fails to load the team. - 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. - Added the ability to access all of your teams by right clicking the system tray icon.
#### OS X ##### Menu Bar
- 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
- New Keyboard Shortcuts - New Keyboard Shortcuts
- Adjust text size - Adjust text size
- Ctrl+0 (Menu Bar -> View -> Actual Size): Reset the zoom level. - 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) - Link to [**Mattermost Docs**](docs.mattermost.com)
- Field to indicate the application version number. - 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 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. - 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 ### Other Changes
- Application license changed from MIT License to Apache License, Version 2.0. - 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 the blurred system tray icon.
- Fixed a redundant description appearing in the pinned start menu on Windows 7. - Fixed a redundant description appearing in the pinned start menu on Windows 7.
#### OS X #### Mac
- Fixed two icons appearing on a notification. - Fixed two icons appearing on a notification.
### Known Issues ### Known Issues
@ -259,7 +235,7 @@ Many thanks to all our contributors. In alphabetical order:
### Improvements ### 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. - 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. - Added a right-click menu option for tray icon to open the Desktop application on Windows and OS X.
### Known issues ### 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 **Allow mixed content** option to render images with `http://`.
- Add the login dialog for http authentication. - Add the login dialog for http authentication.
#### OS X #### Mac
- Add the option to show the icon on menu bar. - Add the option to show the icon on menu bar.
#### Linux #### Linux

View file

@ -44,7 +44,7 @@
"chai-as-promised": "^5.3.0", "chai-as-promised": "^5.3.0",
"cross-env": "^3.1.2", "cross-env": "^3.1.2",
"devtron": "^1.3.0", "devtron": "^1.3.0",
"electron": "1.4.6", "electron": "1.4.12",
"electron-builder": "^7.11.2", "electron-builder": "^7.11.2",
"electron-connect": "~0.6.0", "electron-connect": "~0.6.0",
"eslint": "^3.4.0", "eslint": "^3.4.0",
@ -76,7 +76,7 @@
}, },
{ {
"from": "resources/linux", "from": "resources/linux",
"filter": "create_desktop_file.sh" "filter": ["create_desktop_file.sh", "README.md"]
} }
] ]
}, },

69
resources/linux/README.md Normal file
View file

@ -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-<VERSION>`) and follow the steps below.
### Desktop launcher
Execute the script file to create a `Mattermost.desktop` file.
```
/opt/mattermost-desktop-<VERSION>/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-<VERSION>/mattermost-desktop is the executable file.
export PATH=$PATH:/opt/mattermost-desktop-<VERSION>
```
Alternatively, you can also create a symbolic link for the application.
```sh
sudo ln -s /opt/mattermost-desktop-<VERSION>/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

View file

@ -9,7 +9,7 @@ cat <<EOS > Mattermost.desktop
[Desktop Entry] [Desktop Entry]
Name=Mattermost Name=Mattermost
Comment=Mattermost Desktop application for Linux Comment=Mattermost Desktop application for Linux
Exec="${FULL_PATH}/Mattermost" Exec="${FULL_PATH}/mattermost-desktop"
Terminal=false Terminal=false
Type=Application Type=Application
Icon=${FULL_PATH}/icon.png Icon=${FULL_PATH}/icon.png

View file

@ -1,5 +1,6 @@
const React = require('react'); 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 {ipcRenderer, remote} = require('electron');
const AutoLaunch = require('auto-launch'); const AutoLaunch = require('auto-launch');
@ -114,7 +115,7 @@ const SettingsPage = React.createClass({
}, },
handleChangeTrayIconTheme() { handleChangeTrayIconTheme() {
this.setState({ this.setState({
trayIconTheme: !this.refs.trayIconTheme.props.checked trayIconTheme: ReactDOM.findDOMNode(this.refs.trayIconTheme).value
}); });
}, },
handleChangeAutoStart() { handleChangeAutoStart() {
@ -123,9 +124,7 @@ const SettingsPage = React.createClass({
}); });
}, },
handleChangeMinimizeToTray() { handleChangeMinimizeToTray() {
var shouldMinimizeToTray = const shouldMinimizeToTray = this.state.showTrayIcon && !this.refs.minimizeToTray.props.checked;
(process.platform !== 'darwin' || !this.refs.showTrayIcon.props.checked) &&
!this.refs.minimizeToTray.props.checked;
this.setState({ this.setState({
minimizeToTray: shouldMinimizeToTray minimizeToTray: shouldMinimizeToTray
@ -191,16 +190,19 @@ const SettingsPage = React.createClass({
} }
if (process.platform === 'linux') { if (process.platform === 'linux') {
options.push( options.push(
<Checkbox <FormGroup>
key='inputTrayIconTheme' <ControlLabel>{'Icon theme (Need to restart the application)'}</ControlLabel>
ref='trayIconTheme' <FormControl
type='select' componentClass='select'
value={this.state.trayIconTheme} key='inputTrayIconTheme'
onChange={this.handleChangeTrayIconTheme} ref='trayIconTheme'
>{'Icon theme (Need to restart the application)'} value={this.state.trayIconTheme}
<option value='light'>{'Light'}</option> onChange={this.handleChangeTrayIconTheme}
<option value='dark'>{'Dark'}</option> >
</Checkbox>); <option value='light'>{'Light'}</option>
<option value='dark'>{'Dark'}</option>
</FormControl>
</FormGroup>);
} }
options.push( options.push(
<Checkbox <Checkbox

View file

@ -20,6 +20,7 @@ function loadDefault(version) {
showTrayIcon: false, showTrayIcon: false,
trayIconTheme: '', trayIconTheme: '',
disablewebsecurity: true, disablewebsecurity: true,
minimizeToTray: false,
toggleWindowOnTrayIconClick: false, toggleWindowOnTrayIconClick: false,
version: 1, version: 1,
notifications: { notifications: {

View file

@ -64,6 +64,12 @@ const assetsDir = path.resolve(app.getAppPath(), 'assets');
// be closed automatically when the JavaScript object is garbage collected. // be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null; var mainWindow = null;
// Fix confused cursor in HiDPI
// https://github.com/electron/electron/issues/7655#issuecomment-259688853
if (process.platform === 'win32') {
app.commandLine.appendSwitch('enable-use-zoom-for-dsf', 'false');
}
var argv = require('yargs').parse(process.argv.slice(1)); var argv = require('yargs').parse(process.argv.slice(1));
const electronConnect = argv.livereload ? require('electron-connect') : null; const electronConnect = argv.livereload ? require('electron-connect') : null;
@ -147,12 +153,21 @@ const trayImages = (() => {
} }
case 'linux': case 'linux':
{ {
const theme = config.trayIconTheme || 'light'; const theme = config.trayIconTheme;
return { try {
normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconTemplate.png')), return {
unread: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconUnreadTemplate.png')), normal: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconTemplate.png')),
mention: nativeImage.createFromPath(path.resolve(assetsDir, 'linux', theme, 'MenuIconMentionTemplate.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: default:
return {}; return {};