Skip to content

Commit

Permalink
v6.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Oct 14, 2017
1 parent 5b327c6 commit 6845938
Show file tree
Hide file tree
Showing 37 changed files with 2,726 additions and 3,668 deletions.
3 changes: 1 addition & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ install:

before_build:
- cmd: echo 📥 Installing Dependencies
- cmd: npm install
- cmd: yarn install

build_script:
- cmd: echo 📦 Building
- cmd: npm run build --metadata

deploy_script:
- cmd: echo 📮 Deploying
- cmd: echo 📮 Deploying to GitHub
- cmd: npm run deploy

artifacts:
Expand Down
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
matrix:
include:
- os: osx
osx_image: xcode8.2
osx_image: xcode9.0
sudo: required
- os: linux
sudo: required
Expand Down Expand Up @@ -43,22 +43,20 @@ before_install:

install:
- echo "📥 Installing Dependencies"
- npm install
- yarn install

script:
- echo "📦 Building"
- npm run build --metadata

after_success:
- echo "📮 Deploying"
- echo "📮 Deploying to Github"
- npm run deploy

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/24d905038aa07dda37df
on_success: change
on_failure: always
on_start: never

on_success: change
urls:
- https://webhooks.gitter.im/e/24d905038aa07dda37df
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ Uses the macOS [Notification Center](https://en.wikipedia.org/wiki/Notification_

> **Cross-Platform**
Tested on macOS (10.11, 10.12), Windows 10 (Anniversary Update) and Debian Linux (Ubuntu 16.04, elementary OS 0.4)
Tested on:

> **Unobstrusive**
- macOS: 10.11, 10.12, 10.13
- Windows 10: 1607, 1703, 1709
- Linux: Ubuntu 16.04/17.04, elementaryOS 0.4, Linuxmint 18

> **Unobtrusive**
Small resource footprint - runs as a macOS Menu Bar app or a Windows System Tray app.

Expand All @@ -43,17 +47,22 @@ Channel-specific (e.g. [IFTTT](https://ifttt.com/), [Zapier](https://zapier.com
Preview thumbnails for pushes containing images.

> **Custom Sound Effects**
> **Custom Notification Sound Effect**
Use the default Pushbullet sound or one of your choice.
Use the default Pushbullet notification sound effect or one of your choice.
Supports `.m4a`, `.mp3`, `.mp4`, `.ogg` and `.wav`.

> **Dedicated Push Target**
Use the *PB for Desktop* PushBullet device to only send pushes to your desktop.

> **Inline Notification SMS Message Reply**
Reply to SMS messages directly within native Desktop notifications (macOS).

> **Mirroring**
Mirror Android notifications (Android only).
Mirror Android notifications (Android).

> **SMS** [![Feature Status: Beta](https://img.shields.io/badge/feature-alpha-blue.svg?style=flat-square)]()
Expand All @@ -76,9 +85,9 @@ Use tags to add emoji to notifications, e.g.: add `{video}` to show a 📺 with

## <a name="installation"/></a> Installation

### Standard Installation
### Normal Installation

Download the latest version of PB for Desktop on the [Releases](https://github.com/sidneys/pb-for-desktop/releases) page.
Grab the latest version here: [Download Pushbullet for Desktop](https://sidneys.github.io/pb-for-desktop/#download)

### Installation as Commandline Tool

Expand Down Expand Up @@ -227,3 +236,5 @@ Read the [contribution documentation](https://github.com/sidneys/pb-for-desktop/
## <a name="author"/></a> Author

[sidneys](http://sidneys.github.io) 2017


30 changes: 29 additions & 1 deletion RELEASENOTES.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
{
"6.0.6": {
"6.1.1": {
"🍾 features": [
"Adds improved `webview` user interface controls",
"Updated sound file support: `.m4a`, `.mp3`, `.mp4`, `.ogg`, `.wav`"
],
"🚨 fixes": [
"Addresses high resource usage (#67)",
"Addresses window size & visibility persistence (#58)",
"Adds enforcement of a single application instance (#63)"
],
"📒 documentation": [
"Augments readme.md",
"Extends JSDoc coverage"
],
"👷 internals": [
"`Electron v1.7.9`",
"Upgrades `node_modules`",
"Upgrades `services`",
"Upgrades `lib`"
]
},
"6.0.8": {
"👷 internals": [
"Upgrades Electron to v1.7.8",
"Upgrades `node_modules`",
"Upgrades `lib`"
]
},
"6.0.7": {
"🍾 features": [
"Adds interactive notifications for messages (macOS)",
"Adds notification body text hiding"
Expand Down
23 changes: 15 additions & 8 deletions app/html/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,41 @@
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="../styles/ionicons.css">
<link rel="stylesheet" type="text/css" href="../styles/styles.css">
</head>
<body>

<!-- spinner -->
<div id="spinner">
<div id="spinner__logo"></div>
<div class="spinner__icon"></div>
<div id="spinner__text">Connecting</div>
</div>
<!-- /spinner -->

<div id="controls-extra">
<div class="controls-extra__button home">
<!-- supplemental-menu -->
<div id="supplemental-menu">
<div class="supplemental-menu__button home">
<div class="title">Home</div>
<i class="icon ion-home"></i>
<div class="icon"></div>
</div>
</div>
<!-- /supplemental-menu -->

<!-- titlebar -->
<div class="titlebar top draggable"></div>
<div class="titlebar left draggable"></div>
<div class="titlebar right draggable"></div>
<!-- titlebar -->

<!-- webview -->
<webview id="webview"
disablewebsecurity="on"
partition="persist:app"
preload="../scripts/renderer/webviews/pushbullet-webview.js"
src="http://pushbullet.com">
disablewebsecurity="true"
partition="persist:app"
preload="../scripts/renderer/webviews/pushbullet-webview.js"
src="http://pushbullet.com">
</webview>
<!-- webview-->

<script src="../scripts/renderer/main.js"></script>

Expand Down
4 changes: 4 additions & 0 deletions app/images/icon-home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 33 additions & 1 deletion app/scripts/main/components/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const path = require('path');
* @constant
*/
const electron = require('electron');
const { app } = electron;
const { app, BrowserWindow } = electron;

/**
* Modules
Expand All @@ -31,6 +31,14 @@ const appRootPath = require('app-root-path');
EventEmitter.defaultMaxListeners = Infinity;
appRootPath.setPath(path.join(__dirname, '..', '..', '..', '..'));


/**
* App
* Configuration
*/
app.disableHardwareAcceleration();


/**
* Modules
* Internal
Expand Down Expand Up @@ -65,3 +73,27 @@ app.on('before-quit', () => {
app.once('ready', () => {
logger.debug('app#ready');
});

/**
* Ensure single instance
*/
const isSecondInstance = app.makeSingleInstance(() => {
logger.debug('isSecondInstance', 'primary instance');

logger.warn('Multiple application instances detected', app.getPath('exe'));
logger.warn('Multiple application instances detected', 'Restoring primary application instance');

BrowserWindow.getAllWindows().forEach((browserWindow) => {
browserWindow.restore();
app.focus();
});
});

if (isSecondInstance) {
logger.debug('isSecondInstance', 'secondary instance');

logger.warn('Multiple application instances detected', app.getPath('exe'));
logger.warn('Multiple application instances detected', 'Shutting down secondary application instances');

process.exit(0);
}
25 changes: 11 additions & 14 deletions app/scripts/main/managers/configuration-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const appCurrentVersion = global.manifest.version;
* Modules
* Configuration
*/
let autoLauncher = new AutoLaunch({ name: appName, mac: { useLaunchAgent: true } });
const autoLauncher = new AutoLaunch({ name: appName, mac: { useLaunchAgent: true } });
/** @namespace electronSettings.delete */
/** @namespace electronSettings.file */
/** @namespace electronSettings.get */
Expand Down Expand Up @@ -278,13 +278,13 @@ let configurationItems = {
let interval = setInterval(() => {
const mainWindow = getMainWindow();
if (!mainWindow) { return; }
if (!mainWindow.getBounds()) { return; }

// Auto-Persist
mainWindow.on('close', () => {
const bounds = mainWindow.getBounds();
if (bounds) { this.set(bounds); }
});
// Observe future changes
mainWindow.on('move', event => this.set(event.sender.getBounds()));
mainWindow.on('resize', event => this.set(event.sender.getBounds()));

// Apply saved value
this.implement(this.get());

clearInterval(interval);
Expand Down Expand Up @@ -364,10 +364,11 @@ let configurationItems = {
const mainWindow = getMainWindow();
if (!mainWindow) { return; }

// Auto-Persist
mainWindow.on('show', () => { this.set(true); });
mainWindow.on('hide', () => { this.set(false); });
// Observe future changes
mainWindow.on('show', event => this.set(event.sender.isVisible()));
mainWindow.on('hide', event => this.set(event.sender.isVisible()));

// Apply saved value
this.implement(this.get());

clearInterval(interval);
Expand All @@ -393,11 +394,7 @@ let configurationItems = {
const mainWindow = getMainWindow();
if (!mainWindow) { return; }

if (value) {
mainWindow.show();
} else {
mainWindow.hide();
}
value === true ? mainWindow.show() : mainWindow.hide();
}
},
/**
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/main/menus/tray-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const appRootPath = require('app-root-path')['path'];
*/
const configurationManager = require(path.join(appRootPath, 'app', 'scripts', 'main', 'managers', 'configuration-manager'));
const logger = require(path.join(appRootPath, 'lib', 'logger'))({ write: true });
const messengerProvider = require(path.join(appRootPath, 'app', 'scripts', 'main', 'providers', 'messenger-provider'));
const dialogProvider = require(path.join(appRootPath, 'app', 'scripts', 'main', 'providers', 'dialog-provider'));
const platformHelper = require(path.join(appRootPath, 'lib', 'platform-helper'));


Expand Down Expand Up @@ -116,7 +116,7 @@ let createTrayMenuTemplate = () => {
icon: trayMenuItemImageReset,
type: 'normal',
click() {
messengerProvider.showQuestion('Are you sure you want to reset?',
dialogProvider.question('Are you sure you want to reset?',
`${appProductName} will reset to its initial state.${os.EOL}Unsaved changes will be lost.`,
(result) => {
if (result === 0) {
Expand Down Expand Up @@ -163,7 +163,7 @@ let createTrayMenuTemplate = () => {
icon: trayMenuItemImageReconnect,
type: 'normal',
click() {
messengerProvider.showQuestion('Are you sure you want to reconnect to Pushbullet?',
dialogProvider.question('Are you sure you want to reconnect to Pushbullet?',
`${appProductName} will reconnect to Pushbullet.${os.EOL}` +
`All unsaved changes will be lost.`,
(result) => {
Expand Down Expand Up @@ -275,9 +275,9 @@ let createTrayMenuTemplate = () => {
icon: trayMenuItemImagePushbulletSoundFile,
type: 'normal',
click() {
messengerProvider.openFile('Change Sound', 'audio', appSoundDirectory, (error, soundFile) => {
dialogProvider.file('Open Sound File (.m4a, .mp3, .mp4, .ogg, .wav)', ['m4a', 'mp3', 'mp4', 'wav', 'ogg'], appSoundDirectory, (error, soundFile) => {
if (error) {
logger.error('pushbulletSoundFile', 'messengerProvider.openFile', error);
logger.error('pushbulletSoundFile', 'dialogProvider.file', error);
return;
}

Expand Down
Loading

0 comments on commit 6845938

Please sign in to comment.