Skip to content

Commit

Permalink
v9.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Aug 6, 2019
1 parent 6f076b4 commit f042bbb
Show file tree
Hide file tree
Showing 12 changed files with 1,789 additions and 2,170 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ init:

install:
- cmd: echo 🔧 Setting up Node
- ps: Update-NodeJsInstallation 12.6.0
- ps: Update-NodeJsInstallation 12.7.0
- cmd: npm --global update npm
- cmd: npm --global install yarn

Expand Down
40 changes: 0 additions & 40 deletions .jsdoc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
matrix:
include:
- os: linux
dist: xenial
sudo: required
dist: trusty
group: edge
compiler: clang

Expand Down Expand Up @@ -36,7 +36,7 @@ env:
before_install:
- 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 12.6.0 && nvm use 12.6.0
- source "${HOME}"/.nvm/nvm.sh && nvm install 12.7.0 && nvm use 12.7.0
- npm --global update npm
- npm --global install yarn

Expand Down
26 changes: 26 additions & 0 deletions RELEASENOTES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
{
"9.3.9": {
"🍾 features": [
"adds `msi` installer package (Windows)",
"adds portable application package (Windows)"
],
"🚨 fixes": [
"fixes multiple isses regarding application auto updates"
],
"👷 internals": [
"upgrades internal `node_modules`",
"upgrades external `node_modules`"
]
},
"9.1.1": {
"💎 improvements": [
"various stability and performance improvements"
],
"🚨 fixes": [
"migrates `electron` APIs to v6.0.0"
],
"👷 internals": [
"upgrades `electron` to `v6.0.0`",
"upgrades internal `node_modules`",
"upgrades external `node_modules`"
]
},
"9.0.9": {
"🍾 features": [
"adds file-based `Notification Filter` for hiding notifications via text or regular expression pattern (https://github.com/sidneys/pb-for-desktop/issues/76)"
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/main/menus/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ let getAppMenuTemplate = () => {
type: 'separator'
},
{
label: `Open Log...`,
label: `Show Logfile...`,
click() {
shell.openItem(logFilePath)
shell.showItemInFolder(logFilePath)
}
},
{
label: `Restart in Developer Mode...`,
label: `Restart in Debugging Mode...`,
click() {
app.relaunch({ args: process.argv.slice(1).concat([ '--debug' ]) })
app.quit()
Expand Down
62 changes: 49 additions & 13 deletions app/scripts/main/menus/tray-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const { app, ipcMain, Menu, MenuItem, shell, Tray, webContents } = require('elec
*/
const appRootPath = require('app-root-path')['path']
const dialogProvider = require('@sidneys/electron-dialog-provider')
const electronUpdaterService = require('@sidneys/electron-updater-service')
const isDebug = require('@sidneys/is-env')('debug')
const logger = require('@sidneys/logger')({ write: true })
const platformTools = require('@sidneys/platform-tools')
Expand Down Expand Up @@ -133,6 +134,15 @@ let createTrayMenuTemplate = () => {
configurationManager('appAutoUpdate').set(menuItem.checked)
}
},
{
id: 'simulateAppUpdate',
label: 'Simulate App Update...',
type: 'normal',
visible: process.defaultApp || isDebug,
click(menuItem) {
electronUpdaterService.simulate()
}
},
{
type: 'separator'
},
Expand All @@ -142,9 +152,16 @@ let createTrayMenuTemplate = () => {
icon: trayMenuItemImageReset,
type: 'normal',
click() {
dialogProvider.question('Are you sure you want to reset?',
dialogProvider.showConfirmation('Are you sure you want to reset?',
`${appProductName} will reset to its initial state.${os.EOL}Unsaved changes will be lost.`,
(result) => {
(error, result) => {
// Handle Error
if (error) {
logger.error('reset', 'dialogProvider.showConfirmation', error)
return
}

// Handle Result
if (result === 0) {
configurationManager('appLaunchOnStartup').set(configurationManager('appLaunchOnStartup').default)
configurationManager('appShowBadgeCount').set(configurationManager('appShowBadgeCount').default)
Expand All @@ -164,7 +181,10 @@ let createTrayMenuTemplate = () => {
})

sessionList.forEach((session, sessionIndex) => {
if (!session.clearCache) { return }
if (!session.clearCache) {
return
}

session.clearCache(() => {
session.clearStorageData({
storages: [ 'appcache', 'cookies', 'filesystem', 'indexdb', 'localstorage', 'serviceworkers', 'shadercache', 'websql' ],
Expand All @@ -189,15 +209,23 @@ let createTrayMenuTemplate = () => {
icon: trayMenuItemImageReconnect,
type: 'normal',
click() {
dialogProvider.question('Are you sure you want to reconnect to Pushbullet?',
dialogProvider.showConfirmation('Are you sure you want to reconnect to Pushbullet?',
`${appProductName} will reconnect to Pushbullet.${os.EOL}` +
`All unsaved changes will be lost.`,
(result) => {
if (result === 0) {
(error, result) => {
// Handle Error
if (error) {
logger.error('reconnect', 'dialogProvider.showConfirmation', error)
return
}

// Handle Result
if (result === 1) {
logger.log('reconnect', 'relaunching')

app.relaunch()
app.quit()
return
}
})
}
Expand Down Expand Up @@ -324,13 +352,20 @@ let createTrayMenuTemplate = () => {
type: 'normal',
click() {
app.focus()
dialogProvider.file('Open Sound File (.m4a, .mp3, .mp4, .ogg, .wav)', [ 'm4a', 'mp3', 'mp4', 'wav', 'ogg' ], appSoundDirectory, (error, soundFile) => {
if (error) {
logger.error('pushbulletSoundFilePath', 'dialogProvider.file', error)
return
}
dialogProvider.openFile(
'Open Sound File (.m4a, .mp3, .mp4, .ogg, .wav)',
[ 'm4a', 'mp3', 'mp4', 'wav', 'ogg' ],
appSoundDirectory,
(error, filePath) => {
// Handle Error
if (error) {
logger.error('pushbulletSoundFilePath', 'dialogProvider.openFile', error)

return
}

configurationManager('pushbulletSoundFilePath').set(soundFile)
// Handle Result
configurationManager('pushbulletSoundFilePath').set(filePath)
})
}
},
Expand Down Expand Up @@ -395,7 +430,8 @@ let createTrayMenuTemplate = () => {
},
{
id: 'showTestNotification',
label: 'Show Test Notification',
label: 'Show Test Notification...',
type: 'normal',
click() {
const notification = notificationProvider.create({
body: 'This is a test notification.',
Expand Down
5 changes: 4 additions & 1 deletion app/scripts/main/windows/main-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ class MainWindow {
webPreferences: {
allowRunningInsecureContent: true,
backgroundThrottling: false,
experimentalCanvasFeatures: true,
contextIsolation: false,
experimentalFeatures: true,
experimentalFeatures: true,
nodeIntegration: true,
nodeIntegrationInSubFrames: true,
nodeIntegrationInWorker: true,
partition: 'persist:app',
sandbox: false,
scrollBounce: platformTools.isMacOS ? true : void 0,
webaudio: true,
webgl: true,
Expand Down
14 changes: 4 additions & 10 deletions app/scripts/renderer/pushbullet/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const moment = require('moment')
const notificationProvider = remote.require('@sidneys/electron-notification-provider')
const opn = require('opn')
const shortid = require('shortid')
const throttledQueue = require('throttled-queue')
const dynamicThrottledQueue = require('dynamic-throttled-queue')
const _ = require('lodash')


Expand Down Expand Up @@ -80,22 +80,16 @@ const youtubeThumbnailEndpoint = 'https://img.youtube.com/vi/'


/**
* Notification Defaults
* Notification Defaults & Globals
* @constant
* @default
* @global
*/
const notificationDisplayInterval = 2000
const notificationDisplayInterval = 1000
const notificationIconWidth = 88
const notificationFilterCommentTag = '//'
const notificationFilterDebugPrefix = '[FILTERED]'

/**
* Notification Globals
* @constant
* @global
*/
const notificationQueue = throttledQueue(1, notificationDisplayInterval, true)
const notificationQueue = dynamicThrottledQueue({ min_rpi: 1, interval: notificationDisplayInterval, evenly_spaced: true })


/**
Expand Down
4 changes: 3 additions & 1 deletion app/scripts/renderer/webviews/pushbullet-webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ let addWebsocketEventHandlers = () => {
if (!(pb && pb.ws && pb.ws.socket)) { return }

pb.ws.socket.addEventListener('message', (ev) => {
logger.debug('pb.ws.socket#message')
// logger.debug('pb.ws.socket#message')

let message

Expand All @@ -288,6 +288,8 @@ let addWebsocketEventHandlers = () => {
return
}

logger.debug('pb.ws.socket#message', 'type:', message.type)

if (message.type !== 'push') { return }

/**
Expand Down
Loading

0 comments on commit f042bbb

Please sign in to comment.