Merge branch 'master' into dev
This commit is contained in:
@@ -1,23 +1,30 @@
|
||||
# Contributing Guidelines
|
||||
Thank you for your contributing! My requirements are few things. Please read them.
|
||||
Thank you for your contributing! My requests are few things. Please read below.
|
||||
|
||||
## Issue
|
||||
Thank you for feedback. When you report a problem, please pay attention to fowllowing points.
|
||||
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).
|
||||
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).
|
||||
|
||||
### Try "Clear Cache and Reload"
|
||||
It's available as `Ctrl(Command) + Shift + R`.
|
||||
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 important to understand the problem.
|
||||
Following points are very helpful to understand the problem.
|
||||
|
||||
* How to reproduce, step-by-step
|
||||
* Expected behavior (or what is wrong)
|
||||
* Screenshots (for GUI issues)
|
||||
* electron-mattermost version
|
||||
* OS
|
||||
* Mattermost version
|
||||
* Expected behavior (or what is wrong)
|
||||
* How to reproduce, step-by-step
|
||||
|
||||
## Pull request
|
||||
PR is welcome.
|
||||
PR is welcome. Thank you for your great works!
|
||||
|
||||
When you edit the code, please run `npm run prettify` before your `git commit`.
|
||||
Codes will be formatted.
|
||||
|
15
README.md
15
README.md
@@ -7,18 +7,17 @@
|
||||
|
||||
### Desktop integration
|
||||
* Tabs for multiple teams
|
||||
* Notifications
|
||||
* Desktop Notification
|
||||
* Windows 10: Toast
|
||||
* Windows 7-8.1: Balloon
|
||||
* 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
|
||||
* Desktop Notification
|
||||
* 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
|
||||
|
||||
### 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).
|
||||
|
||||
## Usage
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron-mattermost",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.7",
|
||||
"description": "Electron-based desktop application for Mattermost",
|
||||
"main": "main.js",
|
||||
"author": "Yuya Ochiai",
|
||||
|
@@ -115,6 +115,7 @@ function overrideNotificationWithBalloon() {
|
||||
options: options
|
||||
});
|
||||
};
|
||||
Notification.permission = NativeNotification.permission;
|
||||
Notification.requestPermission = function(callback) {
|
||||
callback('granted');
|
||||
};
|
||||
@@ -126,6 +127,7 @@ function overrideNotification() {
|
||||
Notification = function(title, options) {
|
||||
this.notification = new NativeNotification(title, options);
|
||||
};
|
||||
Notification.permission = NativeNotification.permission;
|
||||
Notification.requestPermission = function(callback) {
|
||||
callback('granted');
|
||||
};
|
||||
|
@@ -121,10 +121,15 @@ app.on('ready', function() {
|
||||
window_options = {};
|
||||
}
|
||||
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.
|
||||
if (window_options.maximized) {
|
||||
mainWindow.maximize();
|
||||
}
|
||||
if (window_options.fullscreen) {
|
||||
mainWindow.setFullScreen(true);
|
||||
}
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
||||
|
@@ -7,6 +7,24 @@ var createTemplate = function(mainWindow) {
|
||||
var app_name = electron.app.getName();
|
||||
var first_menu_name = (process.platform === 'darwin') ? app_name : 'File';
|
||||
var template = [];
|
||||
|
||||
const platformAppMenu = process.platform === 'darwin' ? [{
|
||||
type: 'separator'
|
||||
}, {
|
||||
label: 'Hide ' + app_name,
|
||||
accelerator: 'Command+H',
|
||||
selector: 'hide:'
|
||||
}, {
|
||||
label: 'Hide Others',
|
||||
accelerator: 'Command+Shift+H',
|
||||
selector: 'hideOtherApplications:'
|
||||
}, {
|
||||
label: 'Show All',
|
||||
selector: 'unhideAllApplications:'
|
||||
}, {
|
||||
type: 'separator'
|
||||
}] : [];
|
||||
|
||||
template.push({
|
||||
label: first_menu_name,
|
||||
submenu: [{
|
||||
@@ -17,7 +35,7 @@ var createTemplate = function(mainWindow) {
|
||||
click: function(item, focusedWindow) {
|
||||
mainWindow.loadURL('file://' + __dirname + '/browser/settings.html');
|
||||
}
|
||||
}, {
|
||||
}, ...platformAppMenu, {
|
||||
label: 'Quit',
|
||||
accelerator: 'CmdOrCtrl+Q',
|
||||
click: function(item, focusedWindow) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron-mattermost",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.7",
|
||||
"description": "Electron-based desktop application for Mattermost",
|
||||
"main": "main.js",
|
||||
"author": "Yuya Ochiai",
|
||||
|
Reference in New Issue
Block a user