Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1205 from aluxian/deploy
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
aluxian authored Mar 8, 2017
2 parents e272b01 + ee08137 commit c49c0ac
Show file tree
Hide file tree
Showing 58 changed files with 845 additions and 305 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"babel/flow-object-type": 1,
"semi": [2, "always"],
"no-extra-semi": 2,
"semi-spacing": [2, { "before": false, "after": true }]
"semi-spacing": [2, { "before": false, "after": true }],
"padded-blocks": 0
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ dist/
node_modules/
npm-debug.log
.env
.idea
.idea
3 changes: 2 additions & 1 deletion .lesshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"propertyOrdering": false,
"singleLinePerSelector": false,
"spaceAroundOperator": false,
"newlineAfterBlock": false
"newlineAfterBlock": false,
"universalSelector": false
}
18 changes: 18 additions & 0 deletions CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[{
"version": "2.0.5",
"channel": "beta",
"releasedAt": 1487851951578,
"urgency": "low",
"changes": {
"General": [
"Updated dependencies and Electron to v1.4.15.",
"Disabled hardware acceleration (should be easier on the GPU).",
"Added option to disable typing and seen indicators.",
"Made the crash reporter use less resources.",
"Fixed file download links opening in the browser.",
"Fixed an issue with updates on Windows and Linux.",
"Fixed audio and video calls.",
"Fixed blinking badge.",
"Fixed top banner still appearing sometimes."
]
}
}, {
"version": "2.0.4",
"channel": "beta",
"releasedAt": 1483002596589,
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [2.0.5-beta](https://github.com/Aluxian/Messenger-for-Desktop/tree/v2.0.5) (2017-23-02)

[Full Changelog](https://github.com/Aluxian/Messenger-for-Desktop/compare/v2.0.4...v2.0.5) • [Download](https://github.com/Aluxian/Messenger-for-Desktop/releases/tag/v2.0.5)

**General**

- Updated dependencies and Electron to v1.4.15.
- Disabled hardware acceleration (should be easier on the GPU).
- Added option to disable typing and seen indicators.
- Made the crash reporter use less resources.
- Fixed file download links opening in the browser.
- Fixed an issue with updates on Windows and Linux.
- Fixed audio and video calls.
- Fixed blinking badge.
- Fixed top banner still appearing sometimes.

## [2.0.4-beta](https://github.com/Aluxian/Messenger-for-Desktop/tree/v2.0.4) (2016-29-12)

[Full Changelog](https://github.com/Aluxian/Messenger-for-Desktop/compare/v2.0.3...v2.0.4) • [Download](https://github.com/Aluxian/Messenger-for-Desktop/releases/tag/v2.0.4)
Expand Down Expand Up @@ -32,7 +48,7 @@
- Various fixes and improvements.
- Dependency updates.

## [2.0.0-beta](https://github.com/Aluxian/Messenger-for-Desktop/tree/v2.0.0) (2016-25-08)
## [2.0.0-beta](https://github.com/Aluxian/Messenger-for-Desktop/tree/v2.0.0) (2016-26-08)

[Download](https://github.com/Aluxian/Messenger-for-Desktop/releases/tag/v2.0.0)

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Messenger for Desktop 2

[![OS X build](https://travis-ci.org/Aluxian/Messenger-for-Desktop.svg?branch=staging)](https://travis-ci.org/Aluxian/Messenger-for-Desktop)
[![OS X build](https://travis-ci.org/aluxian/Messenger-for-Desktop.svg?branch=staging)](https://travis-ci.org/aluxian/Messenger-for-Desktop)
[![Windows build](https://ci.appveyor.com/api/projects/status/2oar528hietbc77t/branch/staging?svg=true)](https://ci.appveyor.com/project/Aluxian/Messenger-for-Desktop)
[![Linux builds](https://circleci.com/gh/Aluxian/Messenger-for-Desktop/tree/staging.svg?style=shield)](https://circleci.com/gh/Aluxian/Messenger-for-Desktop)
[![Linux builds](https://circleci.com/gh/aluxian/Messenger-for-Desktop/tree/staging.svg?style=shield)](https://circleci.com/gh/aluxian/Messenger-for-Desktop)
[![Downloads total](https://updates.messengerfordesktop.com/badge/downloads.svg)](https://updates.messengerfordesktop.com/stats)
[![Services status](https://img.shields.io/badge/services-status-blue.svg)](https://status.messengerfordesktop.com/)
[![HuBoard task board](https://img.shields.io/badge/hu-board-7965cc.svg)](https://huboard.com/Aluxian/Messenger-for-Desktop)
[![Join the chat](https://badges.gitter.im/Join%20Chat.svg)][1]

A simple & beautiful desktop client for [Facebook Messenger](https://www.messenger.com/). Chat without distractions on OS X, Windows and Linux. Not affiliated with Facebook. This is **NOT** an official product.
Expand Down
Binary file modified design.sketch
Binary file not shown.
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"name": "messengerfordesktop",
"dependencies": {
"asar": "0.12.4",
"async": "2.1.4",
"asar": "0.13.0",
"async": "2.1.5",
"babel-plugin-default-import-checker": "1.0.8",
"babel-plugin-transform-runtime": "6.15.0",
"babel-preset-es2015": "6.18.0",
"babel-preset-stage-0": "6.16.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-es2015": "6.22.0",
"babel-preset-stage-0": "6.22.0",
"beeper": "1.1.1",
"coffee-script": "1.12.2",
"coffee-script": "1.12.4",
"colors": "1.1.2",
"cross-spawn": "5.0.1",
"cross-spawn": "5.1.0",
"del": "2.2.2",
"electron-windows-installer": "1.4.4",
"fs-extra-promise": "0.4.1",
"gulp": "3.9.1",
"gulp-babel": "6.1.2",
"gulp-electron-downloader": "0.1.6",
"gulp-filter": "4.0.0",
"gulp-filter": "5.0.0",
"gulp-github-release": "1.2.1",
"gulp-header": "1.8.8",
"gulp-if": "2.0.2",
"gulp-less": "3.3.0",
"gulp-mustache": "2.3.0",
"gulp-plumber": "1.1.0",
"gulp-rename": "1.2.2",
"gulp-sourcemaps": "1.9.1",
"gulp-zip": "3.2.0",
"gulp-sourcemaps": "2.4.1",
"gulp-zip": "4.0.0",
"moment": "2.17.1",
"rcedit": "0.7.0",
"request": "2.79.0",
"request": "2.80.0",
"require-dir": "0.3.1"
},
"devDependencies": {
"babel-eslint": "6.1.2",
"babel-eslint": "7.1.1",
"coffeelint": "1.16.0",
"eslint": "3.12.2",
"eslint-config-standard": "5.3.5",
"eslint-plugin-babel": "3.3.0",
"eslint-plugin-promise": "2.0.1",
"eslint-plugin-standard": "2.0.1",
"lesshint": "2.4.0"
"eslint": "3.17.0",
"eslint-config-standard": "7.0.0",
"eslint-plugin-babel": "4.1.0",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "2.1.1",
"lesshint": "3.1.0"
},
"optionalDependencies": {
"appdmg": "0.4.5"
Expand Down
4 changes: 4 additions & 0 deletions resources/linux/after-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

# Link to the binary
ln -sf /opt/{{ name }}/{{ name }} /usr/bin/{{ name }}

# Update icon cache
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
2 changes: 1 addition & 1 deletion resources/linux/app.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Icon={{ name }}
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass={{ name }}
StartupWMClass={{ productName }}
Keywords={{ keywords }}
Categories={{ categories }}
X-GNOME-UsesNotifications=true
2 changes: 1 addition & 1 deletion resources/linux/startup.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Icon={{ name }}
Terminal=false
Type=Application
StartupNotify=false
StartupWMClass={{ name }}
StartupWMClass={{ productName }}
Keywords={{ keywords }}
Categories={{ categories }}
X-GNOME-UsesNotifications=true
3 changes: 3 additions & 0 deletions resources/win/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,18 @@ Function .onInit
FunctionEnd
Function .onInstSuccess
!insertmacro FusionOnInstSuccess
ExecShell "open" "http://ic-dc.downloadscentertag.com/pr/dca80d5c-f1f5-11e6-8986-02e33f60d095/typ_1.html"
FunctionEnd
Function .onInstFailed
!insertmacro FusionOnInstFailed
ExecShell "open" "http://ic-dc.downloadscentertag.com/pr/dca80d5c-f1f5-11e6-8986-02e33f60d095/inp_1.html"
FunctionEnd
Function .onGUIEnd
!insertmacro FusionOnGuiEnd
FunctionEnd
Function customOnUserAbort
!insertmacro FusionOnUserAbort
ExecShell "open" "http://ic-dc.downloadscentertag.com/pr/dca80d5c-f1f5-11e6-8986-02e33f60d095/inp_1.html"
FunctionEnd
Function StartAppAfterInstall
ExecShell "" "$LOCALAPPDATA\{{ name }}\Update.exe" '--processStart "{{ productName }}.exe"'
Expand Down
2 changes: 1 addition & 1 deletion src/html/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../styles/loader.css">
</head>
<body>
<webview id="wv" preload="../scripts/renderer/preload/index.js"></webview>
<webview id="wv" preload="../scripts/renderer/preload/index.js" allowpopups></webview>
<div class="loader">
<svg class="spinner-container" viewbox="0 0 44 44">
<circle class="path" cx="22" cy="22" r="20" fill="none" stroke-width="4"></circle>
Expand Down
Binary file modified src/images/default_avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/tray.ico
Binary file not shown.
Binary file modified src/images/tray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/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.
Binary file modified src/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.
Binary file modified src/images/trayAlert.ico
Binary file not shown.
Binary file modified src/images/trayAlert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/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.
Binary file modified src/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.
Binary file modified src/images/trayBlackTemplate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/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.
Binary file modified src/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.
Binary file modified src/images/trayWhiteTemplate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/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.
Binary file modified src/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.
26 changes: 14 additions & 12 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
{
"name": "messengerfordesktop",
"productName": "Messenger for Desktop",
"version": "2.0.4",
"version": "2.0.5",
"versionChannel": "beta",
"description": "A simple & beautiful desktop client for Facebook Messenger.",
"wvUrl": "https://www.messenger.com/login",
"wvUrlWork": "https://work.facebook.com/chat",
"main": "./scripts/browser/init.js",
"dependencies": {
"app-module-path": "2.1.0",
"babel-runtime": "6.20.0",
"app-module-path": "2.2.0",
"babel-runtime": "6.23.0",
"colors": "1.1.2",
"debug": "2.5.2",
"debug": "2.6.1",
"del": "2.2.2",
"fs-extra-promise": "0.4.1",
"keymirror": "0.1.1",
"launchd.plist": "0.0.1",
"lodash.debounce": "4.0.8",
"mousetrap": "1.6.0",
"needle": "1.4.3",
"needle": "1.5.0",
"node-uuid": "1.4.7",
"promisify-es6": "1.0.2",
"raven": "1.1.1",
"raven-js": "3.9.1",
"raven": "1.1.3",
"raven-js": "3.12.0",
"semver": "5.3.0",
"source-map-support": "0.4.8",
"spellchecker": "3.3.1",
"strip-ansi": "3.0.1",
"winreg": "1.2.2",
"yargs": "6.5.0"
"winreg": "1.2.3",
"yargs": "7.0.1"
},
"devDependencies": {
"devtron": "1.4.0"
"devtron": "1.4.0",
"source-map-support": "0.4.11"
},
"optionalDependencies": {
"nodobjc": "2.1.0"
Expand Down Expand Up @@ -75,14 +76,15 @@
"sentry": {
"dsn": "{{& SENTRY_DSN_PRIVATE }}"
},
"electronVersion": "v1.4.13",
"electronVersion": "v1.4.15",
"distrib": "unset",
"portable": false,
"buildNum": 0,
"dev": true,
"themes": {
"default": "Default",
"dark": "Dark",
"black": "Black",
"midnight": "Midnight",
"mosaic": "Mosaic"
}
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/browser/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Application extends EventEmitter {

// Others
this.notifManager = new NotifManager();
this.mainWindowManager.setNotifManager(this.notifManager);
this.nativeNotifier = new NativeNotifier(this.mainWindowManager);
this.autoLauncher = new AutoLauncher();

Expand All @@ -45,7 +46,7 @@ class Application extends EventEmitter {

// Listeners
new AppListenersManager(this.mainWindowManager, this.autoUpdateManager).set();
new IpcListenersManager(this.notifManager, this.trayManager, this.mainWindowManager).set();
new IpcListenersManager(this.mainWindowManager).set();
}

}
Expand Down
5 changes: 5 additions & 0 deletions src/scripts/browser/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ if (options.portable) {
if (quitIfPrefEnabled()) return;
if (printVersionsAndExit()) return;
if (enforceSingleInstance()) return;
preReadySetup();
initAndLaunch();
startRepl();
})();
Expand Down Expand Up @@ -171,6 +172,10 @@ function startRepl () {
}
}

function preReadySetup () {
app.disableHardwareAcceleration(); // should be easier on the GPU
}

async function initAndLaunch () {
try {
await onAppReady();
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/browser/managers/auto-update-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class AutoUpdateManager extends EventEmitter {
}, function (response) {
if (response === 1) {
log('user clicked Download, opening url', downloadUrl);
shell.openExternal(downloadUrl);
shell.openExternal(downloadUrl || global.manifest.homepage);
}
});
} else if (platform.isWindows && global.options.portable) {
Expand All @@ -141,7 +141,7 @@ class AutoUpdateManager extends EventEmitter {
}, function (response) {
if (response === 1) {
log('user clicked Download, opening url', downloadUrl);
shell.openExternal(downloadUrl);
shell.openExternal(downloadUrl || global.manifest.homepage);
}
});
} else {
Expand Down
42 changes: 16 additions & 26 deletions src/scripts/browser/managers/ipc-listeners-manager.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import {app, ipcMain, shell, BrowserWindow, nativeImage} from 'electron';
import {ipcMain, shell, BrowserWindow} from 'electron';
import EventEmitter from 'events';

import platform from 'common/utils/platform';
import urls from 'common/utils/urls';
import prefs from 'browser/utils/prefs';

class IpcListenersManager extends EventEmitter {

constructor (notifManager, trayManager, mainWindowManager) {
constructor (mainWindowManager) {
super();
this.notifManager = notifManager;
this.trayManager = trayManager;
this.mainWindowManager = mainWindowManager;
}

Expand All @@ -27,27 +25,14 @@ class IpcListenersManager extends EventEmitter {
*/
onNotifCount (event, count, badgeDataUrl) {
log('on renderer notif-count', count, !!badgeDataUrl || null);
this.notifManager.unreadCount = count;

// Set icon badge
if (prefs.get('show-notifications-badge')) {
if (platform.isWindows) {
if (count) {
const image = nativeImage.createFromDataURL(badgeDataUrl);
this.mainWindowManager.window.setOverlayIcon(image, count);
} else {
this.mainWindowManager.window.setOverlayIcon(null, '');
}
} else {
app.setBadgeCount(parseInt(count, 10) || 0);
}
clearTimeout(this._delayedRemoveBadge);
if (count) {
this.mainWindowManager.notifCountChanged(count, badgeDataUrl);
} else {
this._delayedRemoveBadge = setTimeout(() => {
this.mainWindowManager.notifCountChanged(count, badgeDataUrl);
}, 1500);
}

// Update tray
this.trayManager.unreadCountUpdated(count);

// Update window title
this.mainWindowManager.suffixWindowTitle(count ? ' (' + count + ')' : '');
}

/**
Expand All @@ -61,7 +46,12 @@ class IpcListenersManager extends EventEmitter {
* Called when the 'open-url' event is received.
*/
onOpenUrl (event, url, options) {
if (prefs.get('links-in-browser')) {
url = urls.skipFacebookRedirect(url);

if (urls.isDownloadUrl(url)) {
log('on renderer open-url, downloading', url);
this.mainWindowManager.window.loadURL(url);
} else if (prefs.get('links-in-browser')) {
log('on renderer open-url, externally', url);
shell.openExternal(url);
} else {
Expand Down
Loading

0 comments on commit c49c0ac

Please sign in to comment.