Skip to content

Commit

Permalink
v6.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Dec 28, 2017
1 parent 86132f3 commit 47584ed
Show file tree
Hide file tree
Showing 18 changed files with 2,474 additions and 8,902 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ before_install:
- echo "🚦 Authorizing Build"
- echo "🔧 Setting up Node"
- curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | NVM_DIR="${HOME}"/.nvm sh
- source "${HOME}"/.nvm/nvm.sh && nvm install 9.1.0 && nvm use 9.1.0
- source "${HOME}"/.nvm/nvm.sh && nvm install 9.3.0 && nvm use 9.3.0
- npm --global update npm
- npm --global install yarn

Expand Down
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,30 +85,16 @@ Use tags to add emoji to notifications, e.g.: add `{video}` to show a 📺 with

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

### Manual Installation
### Standard Installation

Grab the latest version here: [Download Pushbullet for Desktop](https://sidneys.github.io/pb-for-desktop/#download)

### Installation via nodejs
### Installation as global nodejs module

```bash
npm install --global pb-for-desktop
```

### Installation via package manager (Linux)

*Debian-based (via apt)*
```bash
curl -s https://packagecloud.io/install/repositories/sidneys/pb-for-desktop/script.deb.sh | sudo bash # Adds package repository
sudo apt-get install pb-for-desktop # Installs it
```

*Redhat-based (via yum)*
```bash
curl -s https://packagecloud.io/install/repositories/sidneys/pb-for-desktop/script.rpm.sh | sudo bash # Adds package repository
sudo yum install pb-for-desktop # Installs it
```

## <a name="developers"/></a> Developers

### Sources
Expand Down
31 changes: 27 additions & 4 deletions RELEASENOTES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
{
"6.7.7": {
"🍾 features": [
"Adds automatic favicon downloads for IFTTT notifications (https://ifttt.com/pushbullet)",
"Adds preference: `Universal Clipboard`"
],
"💎 improvements": [
"Improves Pushbullet Pro account validation for `Universal Clipboard`",
"Various stability and performance improvements"
],
"🚨 fixes": [
"Fixes notification not showing on Windows 10 Fall Creators Update (https://github.com/electron/electron/issues/10864) (Windows)",
"Fixes notification actions on macOS (https://github.com/electron/electron/pull/10709) (macOS)"
],
"📒 documentation": [
"Removes `README.md` section: `Installation via Linux package manager`"
],
"👷 internals": [
"Upgrades `electron` to `v1.7.10`",
"Upgrades `node_modules`",
"Upgrades `services`",
"Upgrades `lib`"
]
},
"6.5.1": {
"🍾 features": [
"Adds preference: application auto updates"
Expand All @@ -12,7 +35,7 @@
]
},
"6.5.0": {
"💎 improved": [
"💎 improvements": [
"Various stability and performance improvements"
],
"🚨 fixed": [
Expand All @@ -30,7 +53,7 @@
"YouTube Thumbnails: Pushed YouTube URLs include thumbnail of the linked video",
"Adds `.snap` package (Linux) (#64)"
],
"💎 improved": [
"💎 improvements": [
"Show & focus the main window on tray menu click (Windows, Linux) (#57)"
],
"👷 internals": [
Expand All @@ -42,7 +65,7 @@
"🚨 fixed": [
"Fixes rendering of release notes after update completion"
],
"💎 improved": [
"💎 improvements": [
"Changed application configuration file to reflect application name",
"Added `.json` extension to application configuration file"
],
Expand All @@ -62,7 +85,7 @@
]
},
"6.2.0": {
"💎 improved": [
"💎 improvements": [
"Augments start-up & background resource usage (#67)",
"Simplified network reachability detection & on-/offline handling"
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions app/scripts/main/components/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,23 @@ const platformTools = require('@sidneys/platform-tools');
* Modules
* Configuration
*/
app.disableHardwareAcceleration();
appRootPath.setPath(path.join(__dirname, '..', '..', '..', '..'));

/**
* Modules
* Internal
* @constant
*/
/* eslint-disable no-unused-vars */
const globals = require(path.join(appRootPath['path'], 'app', 'scripts', 'main', 'components', 'globals'));
/* eslint-enable */

/**
* Modules
* Configuration
*/
app.disableHardwareAcceleration();
app.setAppUserModelId(global.manifest.appId);
events.EventEmitter.defaultMaxListeners = Infinity;
if (platformTools.isLinux) {
process.env.XDG_CURRENT_DESKTOP = 'Unity';
Expand All @@ -43,7 +58,6 @@ if (platformTools.isLinux) {
* @constant
*/
/* eslint-disable no-unused-vars */
const globals = require(path.join(appRootPath['path'], 'app', 'scripts', 'main', 'components', 'globals'));
const appMenu = require(path.join(appRootPath.path, 'app', 'scripts', 'main', 'menus', 'app-menu'));
const mainWindow = require(path.join(appRootPath.path, 'app', 'scripts', 'main', 'windows', 'main-window'));
const configurationManager = require(path.join(appRootPath.path, 'app', 'scripts', 'main', 'managers', 'configuration-manager'));
Expand Down
1 change: 1 addition & 0 deletions app/scripts/main/components/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const packageJson = require(path.join(appRootPath['path'], 'package.json'));
* @constant
*/
global.manifest = {
appId: packageJson.appId || `com.${packageJson.author}.${packageJson.name}`,
homepage: packageJson.homepage,
name: packageJson.name,
productName: packageJson.productName || packageJson.name,
Expand Down
20 changes: 20 additions & 0 deletions app/scripts/main/managers/configuration-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,26 @@ let configurationItems = {
electronSettings.set(this.keypath, parseFloat(value));
}
},
/**
* pushbulletClipboardEnabled
*/
pushbulletClipboardEnabled: {
keypath: 'pushbulletClipboardEnabled',
default: false,
init() {
logger.debug(this.keypath, 'init');
},
get() {
logger.debug(this.keypath, 'get');

return electronSettings.get(this.keypath);
},
set(value) {
logger.debug(this.keypath, 'set');

electronSettings.set(this.keypath, value);
}
},
/**
* pushbulletSmsEnabled
*/
Expand Down
9 changes: 8 additions & 1 deletion app/scripts/main/menus/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ const Appdirectory = require('appdirectory');
const isDebug = require('@sidneys/is-env')('debug');
const logger = require('@sidneys/logger')({ write: false });

/**
* Modules
* Internal
* @constant
*/
const platformTools = require('@sidneys/platform-tools');


/**
* Application
Expand Down Expand Up @@ -193,7 +200,7 @@ let getAppMenuTemplate = () => {
}
];

if (process.platform === 'darwin') {
if (platformTools.isMacOS) {
template.unshift({
label: appProductName,
submenu: [
Expand Down
13 changes: 12 additions & 1 deletion app/scripts/main/menus/tray-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const trayMenuItemImageAppShowBadgeCount = path.join(appRootPath, 'app', 'images
const trayMenuItemImageAppTrayOnly = path.join(appRootPath, 'app', 'images', `tray-item-appTrayOnly${platformTools.menuItemImageExtension}`);
const trayMenuItemImagePushbulletHideNotificationBody = path.join(appRootPath, 'app', 'images', `tray-item-pushbulletHideNotificationBody${platformTools.menuItemImageExtension}`);
const trayMenuItemImagePushbulletRepeatRecentNotifications = path.join(appRootPath, 'app', 'images', `tray-item-pushbulletRepeatRecentNotifications${platformTools.menuItemImageExtension}`);
const trayMenuItemImagePushbulletClipboardEnabled = path.join(appRootPath, 'app', 'images', `tray-item-pushbulletClipboardEnabled${platformTools.menuItemImageExtension}`);
const trayMenuItemImagePushbulletSmsEnabled = path.join(appRootPath, 'app', 'images', `tray-item-pushbulletSmsEnabled${platformTools.menuItemImageExtension}`);
const trayMenuItemImagePushbulletSoundEnabled = path.join(appRootPath, 'app', 'images', `tray-item-pushbulletSoundEnabled${platformTools.menuItemImageExtension}`);
const trayMenuItemImagePushbulletSoundFile = path.join(appRootPath, 'app', 'images', `tray-item-pushbulletSoundFile${platformTools.menuItemImageExtension}`);
Expand Down Expand Up @@ -203,9 +204,19 @@ let createTrayMenuTemplate = () => {
configurationManager('pushbulletHideNotificationBody').set(menuItem.checked);
}
},
{
id: 'pushbulletClipboardEnabled',
label: 'Universal Clipboard',
icon: trayMenuItemImagePushbulletClipboardEnabled,
type: 'checkbox',
checked: configurationManager('pushbulletClipboardEnabled').get(),
click(menuItem) {
configurationManager('pushbulletClipboardEnabled').set(menuItem.checked);
}
},
{
id: 'pushbulletSmsEnabled',
label: 'Mirror SMS Messages',
label: 'SMS Mirroring',
icon: trayMenuItemImagePushbulletSmsEnabled,
type: 'checkbox',
checked: configurationManager('pushbulletSmsEnabled').get(),
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/main/providers/dialog-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let showMessage = (title = appProductName, message = title, buttonList = ['OK'],

logger.debug('showMessage', 'title', title, 'message', message, 'buttonList', buttonList, 'type', type);

dialog.showMessageBox(BrowserWindow.getFocusedWindow(), {
dialog.showMessageBox({
type: type,
title: title,
message: title,
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/main/windows/main-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ class MainWindow extends BrowserWindow {
height: void 0,
minHeight: 256,
minWidth: 128,
partition: 'persist:app',
show: true,
show: false,
thickFrame: platformTools.isWindows ? true : void 0,
title: windowTitle,
titleBarStyle: platformTools.isMacOS ? 'hiddenInset' : void 0,
Expand All @@ -72,6 +71,7 @@ class MainWindow extends BrowserWindow {
experimentalCanvasFeatures: true,
experimentalFeatures: true,
nodeIntegration: true,
partition: 'persist:app',
scrollBounce: platformTools.isMacOS ? true : void 0,
webaudio: true,
webgl: false,
Expand Down
33 changes: 26 additions & 7 deletions app/scripts/renderer/pushbullet/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
'use strict';


/**
* Modules
* Node
* @constant
*/
const path = require('path');

/**
* Modules
* Electron
Expand All @@ -14,8 +21,16 @@ const { clipboard } = remote;
* External
* @constant
*/
const appRootPath = require('app-root-path')['path'];
const logger = require('@sidneys/logger')({ write: true });

/**
* Modules
* Internal
* @constant
*/
const configurationManager = remote.require(path.join(appRootPath, 'app', 'scripts', 'main', 'managers', 'configuration-manager'));


/**
* @constant
Expand All @@ -28,6 +43,13 @@ const defaultInterval = 2000;
/** @namespace pb.e2e.encrypt */


/**
* Retrieve PushbulletClipboardEnabled
* @return {Boolean} - Enabled
*/
let retrievePushbulletClipboardEnabled = () => configurationManager('pushbulletClipboardEnabled').get();


/**
* Get 'pb-for-desktop' device
* @return {Array} Devices with model = 'pb-for-desktop'
Expand All @@ -51,6 +73,7 @@ let receiveClip = (clip) => {

const pb = window.pb;

if (!retrievePushbulletClipboardEnabled()) { return; }
if (!pb.account.pro) { return; }

pb.lastClip = clipboard.readText();
Expand Down Expand Up @@ -123,6 +146,9 @@ let startMonitoring = () => {
};

setInterval(() => {
if (!retrievePushbulletClipboardEnabled()) { return; }
if (!pb.account.pro) { return; }

const text = clipboard.readText();
const image = clipboard.readImage();

Expand Down Expand Up @@ -156,13 +182,6 @@ let init = () => {
let interval = setInterval(() => {
if (!(pb && pb.account)) { return; }

if (!pb.account.pro) {
logger.info('No pro account found');

clearInterval(interval);
return;
}

startMonitoring();

clearInterval(interval);
Expand Down
Loading

0 comments on commit 47584ed

Please sign in to comment.