diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad8293a5..e77ffb3a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/README.md b/README.md index e40dbc20..5aa8c8de 100644 --- a/README.md +++ b/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 diff --git a/package.json b/package.json index e0d14742..0a7c40c4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/browser/webview/mattermost.js b/src/browser/webview/mattermost.js index 6e6f8bf5..859472da 100644 --- a/src/browser/webview/mattermost.js +++ b/src/browser/webview/mattermost.js @@ -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'); }; diff --git a/src/main.js b/src/main.js index c071f3fe..8dd38c02 100644 --- a/src/main.js +++ b/src/main.js @@ -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'); diff --git a/src/main/menus/app.js b/src/main/menus/app.js index 68fdb8a4..e56dec54 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -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) { diff --git a/src/package.json b/src/package.json index 806c7c98..9ecbd50b 100644 --- a/src/package.json +++ b/src/package.json @@ -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",