Merge tag 'v1.1.0' into dev

This commit is contained in:
Yuya Ochiai
2016-03-30 21:19:01 +09:00
25 changed files with 286 additions and 80 deletions

54
CHANGELOG.md Normal file
View File

@@ -0,0 +1,54 @@
# Mattermost Desktop Application Changelog
## Release v1.1.0 (Beta)
The `electron-mattermost` project is now the official desktop application for the Mattermost open source project.
### Changes
#### All platforms
- Rename project from `electron-mattermost` to `desktop`
- Rename the executable file from `electron-mattermost` to `Mattermost`
- The configuration directory is also different from previous versions.
- Should execute following command to take over `config.json`.
- Windows: `copy %APPDATA%\electron-mattermost\config.json %APPDATA%\Mattermost\config.json`
- OS X: `cp ~/Library/Application\ Support/electron-mattermost/config.json ~/Library/Application\ Support/Mattermost/config.json`
- Linux: `cp ~/.config/electron-mattermost/config.json ~/.config/Mattermost/config.json`
### Improvements
#### All platforms
- Refine application icon.
- Show error messages when the application failed in loading Mattermost server.
- Show confirmation dialog to continue connection when there is certificate error.
- Add validation to check whether both of **Name** and **URL** fields are not blank.
- Add simple basic HTTP authentication (requires a command line).
#### Windows
- Show a small circle on the tray icon when there are new messages.
### Fixes
#### Windows
- **File** > **About** does not bring up version number dialog.
#### Linux
- **File** > **About** does not bring up version number dialog.
- Ubuntu: Notification is not showing up.
- The view crashes when freetype 2.6.3 is used in system.
### Known issues
#### All platforms
- Images with `http://` do not render.
- Basic Authentication is not working.
- Some keyboard shortcuts are missing. (e.g. <kbd>Ctrl+W</kbd>, <kbd>Command+,</kbd>)
- Basic authentication requires a command line.
#### Windows
- Application does not appear properly in Windows volume mixer.

View File

@@ -5,8 +5,8 @@ Thank you for your contributing! My requests are few things. Please read below.
Thank you for feedback. When you report a problem, please pay attention to following points.
### Does it happen on web browsers? (especially Chrome)
electron-mattermost is based on Electron. It integrates Chrome as a browser window.
If the problem appears on web browsers, it may be the issue for Mattermost (or Chrome).
Mattermost Desktop is based on Electron, which integrates the Chrome engine within a standalone application.
If the problem you encounter can be reproduced on web browsers, it may be an issue with Mattermost server (or Chrome).
### Try "Clear Cache and Reload"
It's available as `Ctrl(Command) + Shift + R`.
@@ -14,23 +14,25 @@ Some layout problems are caused by browser cache.
Especially, this kind of issue might happen when you have updated Mattermost server.
### Write detailed information
Following points are very helpful to understand the problem.
Detailed information is very helpful to understand the problem.
For example:
* How to reproduce, step-by-step
* Expected behavior (or what is wrong)
* Screenshots (for GUI issues)
* electron-mattermost version
* OS
* Mattermost version
* Application version
* Operating system
* Mattermost server version
## Feature idea
Please see http://www.mattermost.org/feature-requests/ .
## Pull request
PR is welcome. Thank you for your great works!
Pull requests are welcome. Thank you for your great work!
When you edit the code, please run `npm run prettify` before your `git commit`.
Codes will be formatted.
Then, such as following points are helpful.
* Tested OS
* Tested Mattermost version
* Test codes for your changes
1. When you edit the code, please run `npm run prettify` to format your code before `git commit`.
2. In the description of your pull request, please include:
* Operating System version on which you tested
* Mattermost server version on which you tested
* New or updated unit tests for your changes
3. Please complete the [Mattermost CLA](http://www.mattermost.org/mattermost-contributor-agreement/) prior to submitting a PR.

View File

@@ -1,44 +1,54 @@
# electron-mattermost
[![Circle CI](https://circleci.com/gh/yuya-oc/electron-mattermost.svg?style=svg)](https://circleci.com/gh/yuya-oc/electron-mattermost)
# Mattermost Desktop (beta)
[Electron](http://electron.atom.io/)-based desktop application for [Mattermost](http://www.mattermost.org/)
Native desktop application for [Mattermost](http://www.mattermost.org/) running on Windows, Mac and Linux.
Originally created as "electron-mattermost" by Yuya Ochiai. Developed using [Electron](http://electron.atom.io/).
![Mattermost Desktop Screenshot](docs/20160309_mattermost-desktop.gif)
[![Circle CI](https://circleci.com/gh/mattermost/desktop.svg?style=svg)](https://circleci.com/gh/mattermost/desktop)
## Features
### Desktop integration
* Tabs for multiple teams
* Desktop Notification
* Tabs for multiple teams across multiple servers
* Desktop Notifications
* Windows 10: Toast
* Windows 7-8.1: Balloon (fallback behavior, so lesser support)
* OS X: Notification Center
* Linux: libnotify ([Electron's notification spec](http://electron.atom.io/docs/v0.36.0/tutorial/desktop-environment-integration/#linux))
* Badges for unread channels and mention
* Resident application
* Linux: [libnotify](http://electron.atom.io/docs/v0.36.0/tutorial/desktop-environment-integration/#linux)
* Badges for unread channels and mentions
* Installs as native application
### Pre-packaged
You don't have to install any other software.
Packages are available at [release page](http://github.com/yuya-oc/electron-mattermost/releases).
Packages are available on the [releases page](http://github.com/mattermost/desktop/releases).
## Usage
### Installation
Detailed guides are available at [docs/setup.md](docs/setup.md).
1. Download and unarchive a file from [release page](http://github.com/yuya-oc/electron-mattermost/releases).
2. Launch `electron-mattermost` in the unarchived folder.
3. After first launching, please input name and URL for your Mattermost team. For example, `myteam : http://mattermost.example.com/team`.
1. Download and unarchive a file from [release page](http://github.com/mattermost/desktop/releases).
2. Launch `Mattermost` in the unarchived folder.
3. After first launching, please input name and URL for your Mattermost team. For example, `myteam : https://mattermost.example.com/team`.
### Quit
Ctrl or Command + Q to quit.
### Configuration
You can show the dialog from menu bar.
(On Windows, please press Alt key to show the menu bar.)
(Please press Alt key to show the menu bar if it disappers.)
Configuration will be saved into Electron's userData directory:
* `%APPDATA%\electron-mattermost` on Windows
* `~/Library/Application Support/electron-mattermost` on OS X
* `~/.config/electron-mattermost` on Linux
* `%APPDATA%\Mattermost` on Windows
* `~/Library/Application Support/Mattermost` on OS X
* `~/.config/Mattermost` on Linux
*When you upgrade from electron-mattermost, please copy `config.json` from `electron-mattermost`.
Otherwise, you have to configure again.*
### Proxy
Normally, the application will follow your system settings to use proxy.
@@ -61,10 +71,10 @@ Node.js is required to test this app.
When you edit `src/**` files, please execute `npm run build` before `npm start`.
### Development
#### `npm run watch`
###### `npm run watch`
Reload the app automatically when you have saved source codes.
#### `npm test`
###### `npm test`
Run tests with Mocha.
## Packaging
@@ -77,3 +87,6 @@ $ npm run package:osx (Requires OS X or Linux)
$ npm run package:linux
$ npm run package:all (Packages for all platform)
```
## Contributing
Please see [CONTRIBUTING.md](./CONTRIBUTING.md).

47
TESTING.md Normal file
View File

@@ -0,0 +1,47 @@
# Mattermost Desktop App Testing
## Release Testing Guide
To contribute to the process of testing the Mattermost Desktop App:
1. If you haven't already, create an account on https://pre-release.mattermost.com/core
- Set your username to be the same as your GitHub username
2. Follow the testing guide for your platform
- [Windows Testing Guide](#windows-testing-guide)
3. Go to the [Public Test Channel](https://pre-release.mattermost.com/core/channels/public-test-channel) and try the following:
1. Post the message with information on what you're testing, for example: `Testing Mattermost Desktop App 1.07 on Windows 7 SP1 64-bit`
2. Reply to the post by clicking on "**...**" then "**Reply**" with `This is a comment including files` and upload five (5) files including at least one image, one sound file and one video clip from your computer.
3. Search for the word "Desktop" and click "Jump" on the search result of your own post in Step 3.1. Click into the preview of the files you uploaded and try to download each one.
4. For any bugs found, please [file an issue report for each](https://github.com/mattermost/desktop/blob/master/CONTRIBUTING.md#issue).
1. Please include:
- STEPS TO REPRODUCE
- MATTERMOST DESKTOP APP VERSION
- OPERATING SYSTEM VERSION
- SCREENSHOT IF APPLICABLE
2. See [example of Mattermost Desktop issue](https://github.com/mattermost/desktop/issues/63)
5. When your testing is complete, open a GitHub Issue announcing your device has been verified
1. Open an issue [using template for announcing a platform has been tested](https://github.com/mattermost/desktop/issues/70).
## THANK YOU!
We highly appreciate your help improving the quality of the Mattermost Desktop App for the entire community.
Your testing contribution, including GitHub username, will be listed under the [Verified Operating Systems](TESTING.md#verified-operation-systems) section of this document.
## Verified Operating Systems
The following chart summarizes the operating systems which the Mattermost Desktop App releases have been tested:
| Version | OS | Issues | Tester | Date |
|:--- |:--- |:--- |:--- |:--- |
| 1.0.7 | Windows 7 SP1 64-bit | [#63](https://github.com/mattermost/desktop/issues/63) | [@it33](https://github.com/it33) | 2016-03-12 |
## Testing Guides by Operating System
The following guides offer operating system specific instructions for testing the Mattermost Desktop application.
### Windows Testing Guide
1. Install the Mattermost desktop application following the [step-by-step Windows setup guide](docs/setup.md#step-by-step-windows-setup) to connect to the `https://pre-release.mattermost.com/core` team site.
2. Verify [Start Menu and Task Bar shortcuts open the application as documented.](docs/setup.md#start-menu-and-task-bar-shortcuts).
3. Verify [Menu Bar options work as documented](docs/setup.md#menu-bar).
4. Follow the [Release Testing Guide](#release-testing-guide) to file issues and report completion of testing.

View File

@@ -18,14 +18,16 @@ dependencies:
post:
- mkdir -p ~/.electron
- docker run --rm -it -v `pwd`:/home/xclient/electron-mattermost -v ~/.electron:/home/xclient/.electron yuyaoc/em-builder:dev ./electron-mattermost/docker/package_in_docker.sh
- mv release/electron-mattermost-win32-ia32 release/electron-mattermost-win32
- mv release/electron-mattermost-win32-x64 release/electron-mattermost-win64
- mv release/electron-mattermost-darwin-x64 release/electron-mattermost-osx
- cd release && zip -9 -r $CIRCLE_ARTIFACTS/electron-mattermost-win32.zip electron-mattermost-win32
- cd release && zip -9 -r $CIRCLE_ARTIFACTS/electron-mattermost-win64.zip electron-mattermost-win64
- tar zcvf $CIRCLE_ARTIFACTS/electron-mattermost-osx.tar.gz -C release electron-mattermost-osx
- tar zcvf $CIRCLE_ARTIFACTS/electron-mattermost-linux-ia32.tar.gz -C release electron-mattermost-linux-ia32
- tar zcvf $CIRCLE_ARTIFACTS/electron-mattermost-linux-x64.tar.gz -C release electron-mattermost-linux-x64
- mv release/Mattermost-win32-ia32 release/mattermost-desktop-win32
- mv release/Mattermost-win32-x64 release/mattermost-desktop-win64
- mv release/Mattermost-darwin-x64 release/mattermost-desktop-osx
- mv release/Mattermost-linux-ia32 release/mattermost-desktop-linux-ia32
- mv release/Mattermost-linux-x64 release/mattermost-desktop-linux-x64
- cd release && zip -9 -r $CIRCLE_ARTIFACTS/mattermost-desktop-win32.zip mattermost-desktop-win32
- cd release && zip -9 -r $CIRCLE_ARTIFACTS/mattermost-desktop-win64.zip mattermost-desktop-win64
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-osx.tar.gz -C release mattermost-desktop-osx
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-linux-ia32.tar.gz -C release mattermost-desktop-linux-ia32
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-linux-x64.tar.gz -C release mattermost-desktop-linux-x64
test:
override:

View File

@@ -3,6 +3,7 @@ set -ex
wget -q https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2
tar jxvf linux-amd64-github-release.tar.bz2
GITHUB_RELEASE=`pwd`/bin/linux/amd64/github-release
RELEASE_TAG=${CIRCLE_TAG#v}
upload()
{
@@ -15,9 +16,9 @@ make_zip()
{
OLDDIR=`pwd`
ARCH=$1
cp -r release/electron-mattermost-$ARCH /tmp/electron-mattermost-$CIRCLE_TAG-$ARCH
cp -r release/mattermost-desktop-$ARCH /tmp/mattermost-desktop-$RELEASE_TAG-$ARCH
cd /tmp
zip -9 -r electron-mattermost-$CIRCLE_TAG-$ARCH.zip electron-mattermost-$CIRCLE_TAG-$ARCH
zip -9 -r mattermost-desktop-$RELEASE_TAG-$ARCH.zip mattermost-desktop-$RELEASE_TAG-$ARCH
cd $OLDDIR
}
@@ -25,9 +26,9 @@ make_tar_gz()
{
OLDDIR=`pwd`
ARCH=$1
cp -r release/electron-mattermost-$ARCH /tmp/electron-mattermost-$CIRCLE_TAG-$ARCH
cp -r release/mattermost-desktop-$ARCH /tmp/mattermost-desktop-$RELEASE_TAG-$ARCH
cd /tmp
tar zcvf electron-mattermost-$CIRCLE_TAG-$ARCH.tar.gz electron-mattermost-$CIRCLE_TAG-$ARCH
tar zcvf mattermost-desktop-$RELEASE_TAG-$ARCH.tar.gz mattermost-desktop-$RELEASE_TAG-$ARCH
cd $OLDDIR
}
@@ -40,7 +41,7 @@ deploy()
"tar.gz" ) make_tar_gz $ARCH ;;
"*" ) echo "Invalid ARCHIVE_FORMAT: $ARCHIVE_FORMAT" && exit 1 ;;
esac
FILE=electron-mattermost-$CIRCLE_TAG-$ARCH.$ARCHIVE_FORMAT
FILE=mattermost-desktop-$RELEASE_TAG-$ARCH.$ARCHIVE_FORMAT
upload "$FILE" /tmp/$FILE
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

View File

@@ -1,9 +1,10 @@
# Electron-Mattermost Setup Guides
# Mattermost Desktop Setup Guides
## Step-by-step Windows 7 setup
Windows 8 and 10 have similar way.
## Step-by-step Windows setup
1. Download [the latest release](https://github.com/yuya-oc/electron-mattermost/releases) of electron-attermost
To set up the Mattermost desktop application for Windows 7, 8 and 10:
1. Download [the latest release](https://github.com/mattermost/desktop/releases) of Mattermost Desktop
Find the file ending in `-win64.zip` if you're running a x64 version of Windows and `-win32.zip` if you're running an older 32-bit version.
@@ -11,11 +12,13 @@ Windows 8 and 10 have similar way.
A new directory should be created on your PC.
3. Go to `/electron-mattermost...` directory and double-click on `electron-mattermost` file to start the application
3. Go to `/mattermost-desktop...` directory and find the file named `Mattermost`
You should see a new application called **electron-mattermost** open.
- Right-click the file and select "Pin to Taskbar" to make the application available from your Windows task bar.
- Right-click the file and select "Pin to Start Menu" to make the application available from your Windows Start menu.
- Double-click the file to open the application.
4. Press `Alt` key to bring up the menu at the top of the window, then click `File -> Settings`
4. After opening the application, press `Alt` key to bring up the menu at the top of the window, then click `File -> Settings`
5. For each Mattermost team you'd like to use, enter its **Name** and **URL** then click **Add**
@@ -25,11 +28,69 @@ Windows 8 and 10 have similar way.
To quit, use `Ctrl+Q`
## Help
The Mattermost desktop application offers:
- Connectivity to one or more Mattermost team sites and multiple Mattermost servers
- Shortcuts from Start Menu and Windows Task Bar
- Icon notifications from Windows Task Bar
- Desktop notifications
See the Mattermost [help documention](http://docs.mattermost.com/help/getting-started/signing-in.html) for how to use the Mattermost team site.
### Settings Page
The Settings Page is available from the **File** menu under **Settings** (Click `Alt` to show the menu if it's not visible). This page manages connections to team sites and other settings.
- **Add a Team Site**:
1. Under **Teams** section, enter **Name** for team name to show in top tab
2. Enter **URL** for the team site location. For example: `https://example.com/teamname` then click **Add**.
- **Delete a Team Site**:
1. Delete a Team Site by clicking the "x" next to the URL of the team site you wish to delete.
- **Hide Menu Bar**
1. Under **Options** enable this option to hide the menu bar by default. Press "Alt" to show the Menu Bar.
### Menu Bar
Click the `Alt` key to toggle the menu on and off.
Below lists menu options (shortcut keys are listed in brackets):
- **File**
- **About Mattermost** - Shows version information for Mattermost desktop application
- **Settings** - Opens setting menu to add new team sites and configure shortcut key options
- **Quit** (Ctrl+Q) - Exits the application
- **Edit**
- **Undo** (Ctrl+Z) - Reverses previous action
- **Redo** (Ctrl+Shift+Z) - Replays most recent action
- **Cut** (Ctrl+X) - Cuts selected text
- **Copy** (Ctrl+C) - Copies selected text
- **Paste** (Ctrl+V) - Pastes text from clipboard
- **Select All** (Ctrl+A) - Select all text in input box
- **View**
- **Reload** (Ctrl+R) - Reload page from the server
- **Clear Cache and Reload** (Ctrl+Shift+R) - Clear cached content in application and reload page
- **Toggle Full Screen** (F11) - Toggle application from window to full screen and back
- **Toggle Developer Tools** (Ctrl+Shift+I) - Turn on and off sidebar showing developer tools
### Notifications
Mattermost lets users configure [desktop notifications](http://docs.mattermost.com/help/getting-started/configuring-notifications.html#desktop-notifications) to alert users to new events in a team site.
For the Mattermost Windows application, these appear as ballon notifications from the task bar on Windows 7 and Windows 8.1, and as a "toast" pop-up on Windows 10.
### Start Menu and Task Bar shortcuts
If pinned to the Windows Start Menu in Step 3 of the setup procedure, a shortcut to the Mattermost desktop application should be available from the Start Menu by pressing the Windows Key.
If pinned to the Windows Task Bar in Step 3 of the setup procedure, a shortcut to the Mattermost desktop application should be available from the Windows Task Bar.
## Step-by-step OS X setup
For OS X 10.11 El Capitan. An older version of OS X has similar way.
1. Download [the latest release](https://github.com/yuya-oc/electron-mattermost/releases) of electron-mattermost
1. Download [the latest release](https://github.com/mattermost/desktop/releases) of Mattermost Desktop
Find the file ending in `-osx.tar.gz`.
@@ -37,13 +98,13 @@ For OS X 10.11 El Capitan. An older version of OS X has similar way.
A new directory should be created on your Mac.
3. Go to `/electron-mattermost...` directory and right-click on `electron-mattermost` package and select "Open"
3. Go to `/mattermost-desktop...` directory and right-click on `Mattermost` package and select "Open"
If you see a dialog to confirm the application, select "Open".
You should see a new application called **electron-mattermost** open.
You should see a new application called **Mattermost Desktop** open.
4. Click `electron-mattermost` from the menu at the top of the screen, then click `Settings`
4. Click `Mattermost` from the menu at the top of the screen, then click `Settings`
5. For each Mattermost team you'd like to use, enter its **Name** and **URL** then click **Add**

View File

@@ -180,7 +180,6 @@ function makePackage(platform, arch, callback) {
var packageJson = require('./src/package.json');
packager({
dir: './dist',
name: packageJson.name,
platform: platform,
arch: arch,
version: require('./package.json').devDependencies['electron-prebuilt'],
@@ -188,14 +187,14 @@ function makePackage(platform, arch, callback) {
prune: true,
overwrite: true,
"app-version": packageJson.version,
icon: 'resources/electron-mattermost',
icon: 'resources/appicon',
"version-string": {
CompanyName: packageJson.author,
LegalCopyright: 'Copyright (c) 2015 ' + packageJson.author,
FileDescription: packageJson.name,
OriginalFilename: packageJson.name + '.exe',
FileDescription: packageJson.description,
OriginalFilename: packageJson.productName + '.exe',
ProductVersion: packageJson.version,
ProductName: packageJson.name,
ProductName: packageJson.productName,
InternalName: packageJson.name
}
}, function(err, appPath) {
@@ -232,6 +231,7 @@ gulp.task('sync-meta', function() {
var appPackageJson = require('./src/package.json');
var packageJson = require('./package.json');
appPackageJson.name = packageJson.name;
appPackageJson.productName = packageJson.productName;
appPackageJson.version = packageJson.version;
appPackageJson.description = packageJson.description;
appPackageJson.author = packageJson.author;

View File

@@ -1,7 +1,8 @@
{
"name": "electron-mattermost",
"version": "1.0.7",
"description": "Electron-based desktop application for Mattermost",
"name": "mattermost-desktop",
"productName": "Mattermost",
"version": "1.1.0",
"description": "Mattermost Desktop application for Windows, Mac and Linux",
"main": "main.js",
"author": "Yuya Ochiai",
"license": "MIT",

BIN
resources/appicon.icns Normal file

Binary file not shown.

BIN
resources/appicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

BIN
resources/appicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>electron-mattermost</title>
<title>Mattermost</title>
<link rel="stylesheet" href="modules/bootstrap/css/bootstrap.min.css">
</head>

View File

@@ -240,7 +240,7 @@ var MattermostView = React.createClass({
var currentURL = url.parse(webview.getURL());
var destURL = url.parse(e.url);
if (currentURL.host === destURL.host) {
window.open(e.url, 'electron-mattermost');
window.open(e.url, 'Mattermost');
} else {
// if the link is external, use default browser.
require('shell').openExternal(e.url);

View File

@@ -72,7 +72,7 @@ var SettingsPage = React.createClass({
var options = [];
if (process.platform === 'win32' || process.platform === 'linux') {
options.push(<Input ref="hideMenuBar" type="checkbox" label="Hide menubar (Press Alt to show menubar)" checked={ this.state.hideMenuBar } onChange={ this.handleChangeHideMenuBar } />);
options.push(<Input ref="hideMenuBar" type="checkbox" label="Hide Menu Bar (Press Alt to show Menu Bar)" checked={ this.state.hideMenuBar } onChange={ this.handleChangeHideMenuBar } />);
}
var options_row = (options.length > 0) ? (
<Row>
@@ -202,7 +202,7 @@ var TeamListItemNew = React.createClass({
<div className="form-group">
<label for="inputTeamURL">URL</label>
{ ' ' }
<input type="url" className="form-control" id="inputTeamURL" placeholder="http://example.com/team" value={ this.state.url } onChange={ this.handleURLChange } />
<input type="url" className="form-control" id="inputTeamURL" placeholder="https://example.com/team" value={ this.state.url } onChange={ this.handleURLChange } />
</div>
{ ' ' }
<Button type="submit" disabled={ !this.shouldEnableAddButton() }>Add</Button>

View File

@@ -50,8 +50,17 @@ var mainWindow = null;
var trayIcon = null;
var willAppQuit = false;
// For toast notification on windows
app.setAppUserModelId('yuya-oc.electron-mattermost');
app.on('login', function(event, webContents, request, authInfo, callback) {
event.preventDefault();
var readlineSync = require('readline-sync');
console.log("HTTP basic auth requiring login, please provide login data.");
var username = readlineSync.question('Username: ');
var password = readlineSync.question('Password: ', {
hideEchoBack: true
});
console.log("Replacing default auth behaviour.");
callback(username, password);
});
// Quit when all windows are closed.
app.on('window-all-closed', function() {
@@ -166,7 +175,10 @@ app.on('ready', function() {
// follow Electron's defaults
window_options = {};
}
window_options.icon = path.resolve(__dirname, 'resources/appicon.png');
if (process.platform === 'win32' || process.platform === 'linux') {
// On HiDPI Windows environment, the taskbar icon is pixelated. So this line is necessary.
window_options.icon = path.resolve(__dirname, 'resources/appicon.png');
}
window_options.fullScreenable = true;
mainWindow = new BrowserWindow(window_options);
mainWindow.setFullScreenable(true); // fullscreenable option has no effect.

View File

@@ -29,7 +29,13 @@ var createTemplate = function(mainWindow) {
label: first_menu_name,
submenu: [{
label: 'About ' + app_name,
role: 'about'
role: 'about',
click: function(item, focusedWindow) {
electron.dialog.showMessageBox(mainWindow, {
buttons: ["OK"],
message: `${app_name} Desktop ${electron.app.getVersion()}`
});
}
}, {
label: 'Settings',
click: function(item, focusedWindow) {

View File

@@ -1,7 +1,8 @@
{
"name": "electron-mattermost",
"version": "1.0.7",
"description": "Electron-based desktop application for Mattermost",
"name": "mattermost-desktop",
"productName": "Mattermost",
"version": "1.1.0",
"description": "Mattermost Desktop application for Windows, Mac and Linux",
"main": "main.js",
"author": "Yuya Ochiai",
"license": "MIT",
@@ -14,6 +15,7 @@
"react": "^0.14.3",
"react-bootstrap": "^0.28.1",
"react-dom": "^0.14.3",
"readline-sync": "^1.4.1",
"yargs": "^3.31.0"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -30,7 +30,7 @@ var options = {
}
};
describe('electron-mattermost', function() {
describe('mattermost-desktop', function() {
this.timeout(10000);
var chromedriver;
@@ -56,6 +56,7 @@ describe('electron-mattermost', function() {
it('should show settings.html when there is no config file', function() {
return client
.init()
.pause(1000)
.getUrl().then(function(url) {
var p = path.parse(url);
p.base.should.equal('settings.html');
@@ -69,6 +70,7 @@ describe('electron-mattermost', function() {
}));
return client
.init()
.pause(1000)
.getUrl().then(function(url) {
var p = path.parse(url);
p.base.should.equal('index.html');
@@ -83,6 +85,7 @@ describe('electron-mattermost', function() {
}));
return client
.init()
.pause(1000)
.getUrl().then(function(url) {
var p = path.parse(url);
p.base.should.equal('index.html');
@@ -155,12 +158,14 @@ describe('electron-mattermost', function() {
it('should show only the selected team', function() {
return client
.init()
.waitForVisible('#mattermostView0')
.pause(1000)
.waitForVisible('#mattermostView0', 1000)
.isVisible('#mattermostView1').then(function(visility) {
visility.should.be.false();
})
.click('#teamTabItem1')
.waitForVisible('#mattermostView1')
.pause(1000)
.waitForVisible('#mattermostView1', 1000)
.isVisible('#mattermostView0').then(function(visility) {
visility.should.be.false();
})

View File

@@ -8,7 +8,7 @@ describe('settings.js', function() {
it('should upgrade v0 config file', function() {
const v0_config = {
url: 'http://example.com/team'
url: 'https://example.com/team'
};
config = settings.upgrade(v0_config);
config.teams.length.should.equal(1);