Browse Source

0.5.13

0.5.13
pull/1210/head
Ramiro Saenz 8 years ago committed by GitHub
parent
commit
b217c9d8f1
  1. 8
      app.json
  2. 72
      app/Application.js
  3. 4
      app/package.json
  4. 28
      app/store/ServicesList.js
  5. 15
      app/util/IconLoader.js
  6. 34
      app/ux/Auth0.js
  7. 64
      app/ux/WebView.js
  8. 2
      app/view/main/Main.js
  9. 10
      app/view/main/MainController.js
  10. 4
      app/view/preferences/Preferences.js
  11. 6
      app/view/preferences/PreferencesController.js
  12. 2
      appveyor.yml
  13. 1
      electron/main.js
  14. 18
      electron/tray.js
  15. 746
      package-lock.json
  16. 4
      package.json
  17. BIN
      resources/icons/gadugadu.png
  18. BIN
      resources/icons/mailru.png
  19. BIN
      resources/icons/sandstorm.png
  20. 2
      resources/js/auth0-7.1.0.min.js
  21. 1
      resources/js/lock-10.2.2/de.js
  22. 1
      resources/js/lock-10.2.2/en.js
  23. 1
      resources/js/lock-10.2.2/es.js
  24. 1
      resources/js/lock-10.2.2/it.js
  25. 18
      resources/js/lock-10.2.2/lock.min.js
  26. 1
      resources/js/lock-10.2.2/nb.js
  27. 1
      resources/js/lock-10.2.2/pt-br.js
  28. 1
      resources/js/lock-10.2.2/ru.js
  29. 1
      resources/js/lock-10.2.2/zh.js
  30. 4
      resources/js/rambox-modal-api.js

8
app.json

@ -103,14 +103,6 @@
{ {
"path": "${framework.dir}/build/ext-all-rtl.js" "path": "${framework.dir}/build/ext-all-rtl.js"
}, },
{
"path": "resources/js/auth0-7.1.0.min.js",
"remote": true
},
{
"path": "resources/js/lock-10.2.2/lock.min.js",
"remote": true
},
{ {
"path": "resources/js/GALocalStorage.js" "path": "resources/js/GALocalStorage.js"
}, },

72
app/Application.js

@ -42,7 +42,7 @@ Ext.define('Rambox.Application', {
if ( Ext.util.Cookies.get('auth0') === null ) Ext.util.Cookies.set('auth0', false); if ( Ext.util.Cookies.get('auth0') === null ) Ext.util.Cookies.set('auth0', false);
// Check for updates // Check for updates
if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 && process.platform !== 'win32' ) Rambox.app.checkUpdate(true); if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 ) Rambox.app.checkUpdate(true);
// Add shortcuts to switch services using CTRL + Number // Add shortcuts to switch services using CTRL + Number
var map = new Ext.util.KeyMap({ var map = new Ext.util.KeyMap({
@ -205,76 +205,6 @@ Ext.define('Rambox.Application', {
Ext.cq1('app-main').getController().showLockWindow(); Ext.cq1('app-main').getController().showLockWindow();
} }
// Synchronization problem in version 0.5.3 steps to fix it
if ( localStorage.getItem('id_token') && localStorage.getItem('refresh_token') === null ) {
var win = Ext.create('Ext.window.Window', {
title: 'Backup your services'
,autoShow: true
,modal: true
,closable: false
,resizable: false
,bodyPadding: '0 15 15 15'
,width: 500
,layout: 'card'
,items: [
{
xtype: 'container'
,html: '<h1>Synchronization problem fixed!</h1>In previous version, we had a bug that backing up your services throw an error. Now is fixed, but you will need to follow two simple steps to make it work.<br><br>If you decide not to do it now, you can cancel but it will ask you again next time you open Rambox until you do it.'
}
,{
xtype: 'container'
,html: '<h1>Login again</h1>Just click the "Sign in" button at the bottom-right of this window to sign in again with the same account you used before.'
}
,{
xtype: 'container'
,html: '<h1>Backup</h1>To finish, click the "Sync!" button to backup your current services and that\'s all!'
}
]
,buttons: [
{
text: locale['button[1]']
,ui: 'decline'
,handler: function() {
win.close();
}
}
,'->'
,{
text: 'Start'
,handler: function(btn) {
btn.hide();
btn.nextSibling('#signin').show();
win.getLayout().setActiveItem(1);
}
}
,{
text: 'Sign in'
,itemId: 'signin'
,hidden: true
,handler: function(btn) {
Rambox.ux.Auth0.backupCurrent = true;
Rambox.ux.Auth0.login();
Ext.defer(Rambox.ux.Auth0.logout, 1000);
btn.hide();
btn.nextSibling('#sync').show();
win.getLayout().setActiveItem(2);
}
}
,{
text: 'Sync!'
,itemId: 'sync'
,hidden: true
,handler: function() {
Rambox.ux.Auth0.backupConfiguration(function() {
win.close();
Rambox.ux.Auth0.backupCurrent = false;
});
}
}
]
});
}
// Remove spinner // Remove spinner
Ext.get('spinner').destroy(); Ext.get('spinner').destroy();
} }

4
app/package.json

@ -1,7 +1,7 @@
{ {
"name": "Rambox", "name": "Rambox",
"productName": "Rambox", "productName": "Rambox",
"version": "0.5.12", "version": "0.5.13",
"description": "Rambox", "description": "Rambox",
"main": "electron/main.js", "main": "electron/main.js",
"private": true, "private": true,
@ -30,6 +30,8 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@exponent/electron-cookies": "2.0.0", "@exponent/electron-cookies": "2.0.0",
"auth0-js": "^8.10.1",
"auth0-lock": "^10.22.0",
"auto-launch-patched": "5.0.2", "auto-launch-patched": "5.0.2",
"electron-config": "0.2.1", "electron-config": "0.2.1",
"electron-is-dev": "^0.1.2", "electron-is-dev": "^0.1.2",

28
app/store/ServicesList.js

@ -28,7 +28,7 @@ Ext.define('Rambox.store.ServicesList', {
,description: locale['services[0]'] ,description: locale['services[0]']
,url: 'https://web.whatsapp.com/' ,url: 'https://web.whatsapp.com/'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function checkUnread(){var a=document.getElementsByClassName("infinite-list-item"),b=0;for(i=0;i<a.length;i++)if(!(a[i].getElementsByClassName("icon-muted").length>0||0===a[i].getElementsByClassName("unread-count").length)){var c=parseInt(a[i].getElementsByClassName("unread-count")[0].innerHTML.trim());b+=isNaN(c)?0:c}updateBadge(b)}function updateBadge(count) { if (count && count >= 1) { rambox.setUnreadCount(count); } else { rambox.clearUnreadCount(); } }setInterval(checkUnread,1e3);' ,js_unread: 'function checkUnread(){var i=0;document.querySelectorAll(".unread").forEach(function(e){0===e.querySelectorAll("[data-icon=muted]").length&&i++});updateBadge(i)}function updateBadge(count) { if (count && count >= 1) { rambox.setUnreadCount(count); } else { rambox.clearUnreadCount(); } }setInterval(checkUnread,1e3);'
,dont_update_unread_from_title: true ,dont_update_unread_from_title: true
}, },
{ {
@ -848,6 +848,32 @@ Ext.define('Rambox.store.ServicesList', {
,url: 'https://voice.google.com' ,url: 'https://voice.google.com'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function parseIntOrZero(e){return isNaN(parseInt(e))?0:parseInt(e)}function checkUnread(){var e=document.querySelector(".msgCount"),n=0;e?n=parseIntOrZero(e.innerHTML.replace(/[\(\) ]/gi,"")):["Messages","Calls","Voicemail"].forEach(function(e){var r=document.querySelector(\'gv-nav-button[tooltip="\'+e+\'"] div[aria-label="Unread count"]\');r&&(n+=parseIntOrZero(r.innerHTML))}),updateBadge(n)}function updateBadge(e){var n=e>0?"("+e+") ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);' ,js_unread: 'function parseIntOrZero(e){return isNaN(parseInt(e))?0:parseInt(e)}function checkUnread(){var e=document.querySelector(".msgCount"),n=0;e?n=parseIntOrZero(e.innerHTML.replace(/[\(\) ]/gi,"")):["Messages","Calls","Voicemail"].forEach(function(e){var r=document.querySelector(\'gv-nav-button[tooltip="\'+e+\'"] div[aria-label="Unread count"]\');r&&(n+=parseIntOrZero(r.innerHTML))}),updateBadge(n)}function updateBadge(e){var n=e>0?"("+e+") ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);'
},
{
id: 'sandstorm'
,logo: 'sandstorm.png'
,name: 'Sandstorm'
,description: 'Sandstorm is a self-hostable web productivity suite.'
,url: 'https://oasis.sandstorm.io/'
,type: 'messaging'
,custom_domain: true
,allow_popups: true
},
{
id: 'gadugadu'
,logo: 'gadugadu.png'
,name: 'Gadu-Gadu'
,description: 'The most popular Polish messenger.'
,url: 'https://www.gg.pl/'
,type: 'messaging'
},
{
id: 'mailru'
,logo: 'mailru.png'
,name: 'Mail.Ru'
,description: 'Free voice and video calls, ICQ support, Odnoklassniki, VKontakte, Facebook, online games, free SMS.'
,url: 'http://webagent.mail.ru/webim/agent/popup.html'
,type: 'email'
} }
] ]
}); });

15
app/util/IconLoader.js

@ -1,6 +1,6 @@
/** /**
* Singleton class to handle the global unread counter. * Singleton class to handle the custom icons for special services.
*/ */
Ext.define('Rambox.util.IconLoader', { Ext.define('Rambox.util.IconLoader', {
singleton: true, singleton: true,
@ -12,21 +12,26 @@ Ext.define('Rambox.util.IconLoader', {
/** /**
* Sets the icon for a specific service. * Sets the icon for a specific service.
* *
* @param {*} id Id of the service * @param {*} service Id of the service
* @param {*} webview Webview component of the service
*/ */
this.loadServiceIconUrl = function (service, webview) { this.loadServiceIconUrl = function (service, webview) {
switch (service.type) { switch (service.type) {
case 'slack': case 'slack':
webview.executeJavaScript("(()=>{let a=document.querySelector('.team_icon');if(!a){const d=document.querySelector('#team_menu');d&&(d.click(),a=document.querySelector('.team_icon'))}if(!a)return!1;const{style:{backgroundImage:b}}=a,c=document.createEvent('MouseEvents');return c.initEvent('mousedown',!0,!0),document.querySelector('.client_channels_list_container').dispatchEvent(c),b.slice(5,-2)})();", webview.executeJavaScript(
"(()=>{let a=document.querySelector('.team_icon');if(!a){const d=document.querySelector('#team_menu');d&&(d.click(),a=document.querySelector('.team_icon'))}if(!a)return!1;const{style:{backgroundImage:b}}=a,c=document.createEvent('MouseEvents');return c.initEvent('mousedown',!0,!0),document.querySelector('.client_channels_list_container').dispatchEvent(c),b.slice(5,-2)})();",
false, false,
function (backgroundImage) { function (backgroundImage) {
if (backgroundImage) { if (backgroundImage) {
service.setTitle('<img src="'+service.icon+'" width="" style="background-color: white;border-radius: 50%;position: absolute;margin-left: -12px;margin-top: 17px;width: 12px;">'+service.title);
service.fireEvent('iconchange', service, backgroundImage, service.icon); service.fireEvent('iconchange', service, backgroundImage, service.icon);
} }
} }
); );
break; break;
default:
break;
} }
}; };
} }
}); });

34
app/ux/Auth0.js

@ -9,6 +9,9 @@ Ext.define('Rambox.ux.Auth0', {
,init: function() { ,init: function() {
var me = this; var me = this;
var Auth0Lock = require('auth0-lock')['default'];
var Auth0 = require('auth0-js');
// Auth0 Config // Auth0 Config
me.lock = new Auth0Lock(auth0Cfg.clientID, auth0Cfg.domain, { me.lock = new Auth0Lock(auth0Cfg.clientID, auth0Cfg.domain, {
autoclose: true autoclose: true
@ -30,7 +33,7 @@ Ext.define('Rambox.ux.Auth0', {
,language: localStorage.getItem('locale-auth0') === null ? 'en' : localStorage.getItem('locale-auth0') ,language: localStorage.getItem('locale-auth0') === null ? 'en' : localStorage.getItem('locale-auth0')
}); });
me.auth0 = new Auth0({ clientID: auth0Cfg.clientID, domain : auth0Cfg.domain }); me.auth0 = new Auth0.WebAuth({ clientID: auth0Cfg.clientID, domain : auth0Cfg.domain });
me.defineEvents(); me.defineEvents();
} }
@ -40,10 +43,15 @@ Ext.define('Rambox.ux.Auth0', {
me.lock.on("authenticated", function(authResult) { me.lock.on("authenticated", function(authResult) {
me.lock.getProfile(authResult.idToken, function(err, profile) { me.lock.getProfile(authResult.idToken, function(err, profile) {
if (err) { if ( err ) {
// Handle error if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration);
Ext.Msg.hide(); Ext.Msg.hide();
return; return Ext.Msg.show({
title: 'Error'
,message: 'There was an error getting the profile: ' + err.error_description
,icon: Ext.Msg.ERROR
,buttons: Ext.Msg.OK
});
} }
// Display a spinner while waiting // Display a spinner while waiting
@ -141,8 +149,13 @@ Ext.define('Rambox.ux.Auth0', {
me.lock.getProfile(localStorage.getItem('id_token'), function (err, profile) { me.lock.getProfile(localStorage.getItem('id_token'), function (err, profile) {
if ( err ) { if ( err ) {
if ( err.error === 401 ) return me.renewToken(me.restoreConfiguration); if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration);
return alert('There was an error getting the profile: ' + err.message); return Ext.Msg.show({
title: 'Error'
,message: 'There was an error getting the profile: ' + err.error_description
,icon: Ext.Msg.ERROR
,buttons: Ext.Msg.OK
});
} }
// First we remove all current services // First we remove all current services
@ -163,8 +176,13 @@ Ext.define('Rambox.ux.Auth0', {
me.lock.getProfile(localStorage.getItem('id_token'), function (err, profile) { me.lock.getProfile(localStorage.getItem('id_token'), function (err, profile) {
if ( err ) { if ( err ) {
if ( err.error === 401 ) return me.renewToken(me.checkConfiguration); if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration);
return alert('There was an error getting the profile: ' + err.message); return Ext.Msg.show({
title: 'Error'
,message: 'There was an error getting the profile: ' + err.error_description
,icon: Ext.Msg.ERROR
,buttons: Ext.Msg.OK
});
} }
if ( !profile.user_metadata ) { if ( !profile.user_metadata ) {

64
app/ux/WebView.js

@ -174,7 +174,7 @@ Ext.define('Rambox.ux.WebView',{
,plugins: 'true' ,plugins: 'true'
,allowtransparency: 'on' ,allowtransparency: 'on'
,autosize: 'on' ,autosize: 'on'
//,webpreferences: 'nodeIntegration=no' ,webpreferences: 'allowRunningInsecureContent=yes' //,nativeWindowOpen=yes
//,disablewebsecurity: 'on' // Disabled because some services (Like Google Drive) dont work with this enabled //,disablewebsecurity: 'on' // Disabled because some services (Like Google Drive) dont work with this enabled
,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent') ,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent')
,preload: './resources/js/rambox-service-api.js' ,preload: './resources/js/rambox-service-api.js'
@ -253,6 +253,7 @@ Ext.define('Rambox.ux.WebView',{
// Apply saved zoom level // Apply saved zoom level
webview.setZoomLevel(me.record.get('zoomLevel')); webview.setZoomLevel(me.record.get('zoomLevel'));
// Set special icon for some service (like Slack)
Rambox.util.IconLoader.loadServiceIconUrl(me, webview); Rambox.util.IconLoader.loadServiceIconUrl(me, webview);
}); });
@ -275,7 +276,7 @@ Ext.define('Rambox.ux.WebView',{
if ( e.url.indexOf('plus.google.com/u/0/photos/albums') >= 0 ) { if ( e.url.indexOf('plus.google.com/u/0/photos/albums') >= 0 ) {
ipc.send('image:popup', e.url, e.target.partition); ipc.send('image:popup', e.url, e.target.partition);
return; return;
} else if ( e.url.indexOf('https://hangouts.google.com/hangouts/_/CONVERSATION/') >= 0 ) { } else if ( e.url.indexOf('/el/CONVERSATION/') >= 0 ) {
me.add({ me.add({
xtype: 'window' xtype: 'window'
,title: 'Video Call' ,title: 'Video Call'
@ -294,7 +295,7 @@ Ext.define('Rambox.ux.WebView',{
tag: 'webview' tag: 'webview'
,src: e.url ,src: e.url
,style: 'width:100%;height:100%;' ,style: 'width:100%;height:100%;'
,partition: 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).user_id : '') ,partition: me.getWebView().partition
,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent') ,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent')
} }
} }
@ -322,8 +323,54 @@ Ext.define('Rambox.ux.WebView',{
tag: 'webview' tag: 'webview'
,src: e.url ,src: e.url
,style: 'width:100%;height:100%;' ,style: 'width:100%;height:100%;'
,partition: e.options.webPreferences.partition ,partition: me.getWebView().partition
,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent')
}
}
}).show();
e.preventDefault();
return;
}
break;
case 'icloud':
if ( e.url.indexOf('index.html#compose') >= 0 ) {
me.add({
xtype: 'window'
,title: 'iCloud - Compose'
,width: 700
,height: 500
,maximizable: true
,resizable: true
,draggable: true
,collapsible: true
,items: {
xtype: 'component'
,itemId: 'webview'
,hideMode: 'offsets'
,autoRender: true
,autoShow: true
,autoEl: {
tag: 'webview'
,src: e.url
,style: 'width:100%;height:100%;'
,partition: me.getWebView().partition
,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent') ,useragent: Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent')
,preload: './resources/js/rambox-modal-api.js'
}
}
,listeners: {
show: function(win) {
const webview = win.down('#webview').el.dom;
webview.addEventListener('ipc-message', function(event) {
var channel = event.channel;
switch (channel) {
case 'close':
win.close();
break;
default:
break;
}
});
} }
} }
}).show(); }).show();
@ -331,6 +378,13 @@ Ext.define('Rambox.ux.WebView',{
return; return;
} }
break; break;
case 'flowdock':
if ( e.disposition === 'new-window' ) {
e.preventDefault();
require('electron').shell.openExternal(e.url);
}
return;
break;
default: default:
break; break;
} }
@ -576,7 +630,7 @@ Ext.define('Rambox.ux.WebView',{
,setStatusBar: function(keep) { ,setStatusBar: function(keep) {
var me = this; var me = this;
me.down('statusbar').destroy(); me.removeDocked(me.down('statusbar'), true);
if ( keep ) { if ( keep ) {
me.addDocked(me.statusBarConstructor(false)); me.addDocked(me.statusBarConstructor(false));

2
app/view/main/Main.js

@ -39,7 +39,7 @@ Ext.define('Rambox.view.main.Main', {
xtype: 'panel' xtype: 'panel'
,title: locale['app.main[0]'] ,title: locale['app.main[0]']
,margin: '0 5 0 0' ,margin: '0 5 0 0'
,flex: 1 ,flex: 2
,header: { height: 50 } ,header: { height: 50 }
,tools: [ ,tools: [
{ {

10
app/view/main/MainController.js

@ -188,8 +188,10 @@ Ext.define('Rambox.view.main.MainController', {
} else { } else {
Ext.cq1('app-main').suspendEvent('remove'); Ext.cq1('app-main').suspendEvent('remove');
Ext.getStore('Services').load(); Ext.getStore('Services').load();
const count = Ext.getStore('Services').getCount();
var i = 1;
Ext.Array.each(Ext.getStore('Services').collect('id'), function(serviceId) { Ext.Array.each(Ext.getStore('Services').collect('id'), function(serviceId) {
me.removeServiceFn(serviceId, 1, 2); me.removeServiceFn(serviceId, count, i++);
}); });
if ( Ext.isFunction(callback) ) callback(); if ( Ext.isFunction(callback) ) callback();
Ext.cq1('app-main').resumeEvent('remove'); Ext.cq1('app-main').resumeEvent('remove');
@ -462,16 +464,12 @@ Ext.define('Rambox.view.main.MainController', {
Ext.cq1('app-main').getViewModel().set('avatar', ''); Ext.cq1('app-main').getViewModel().set('avatar', '');
if ( Ext.isFunction(callback) ) callback(); if ( Ext.isFunction(callback) ) callback();
Ext.Msg.hide();
} }
if ( btn ) { if ( btn ) {
Ext.Msg.confirm(locale['app.main[21]'], locale['app.window[38]'], function(btnId) { Ext.Msg.confirm(locale['app.main[21]'], locale['app.window[38]'], function(btnId) {
if ( btnId === 'yes' ) { if ( btnId === 'yes' ) {
logoutFn(function() { logoutFn(me.removeAllServices.bind(me));
me.removeAllServices();
});
} }
}); });
} else { } else {

4
app/view/preferences/Preferences.js

@ -122,7 +122,7 @@ Ext.define('Rambox.view.preferences.Preferences',{
,name: 'hide_menu_bar' ,name: 'hide_menu_bar'
,boxLabel: locale['preferences[1]']+' (<code>Alt</code> key to display)' ,boxLabel: locale['preferences[1]']+' (<code>Alt</code> key to display)'
,value: config.hide_menu_bar ,value: config.hide_menu_bar
,hidden: process.platform !== 'win32' ,hidden: process.platform === 'darwin'
} }
,{ ,{
xtype: 'combo' xtype: 'combo'
@ -176,7 +176,7 @@ Ext.define('Rambox.view.preferences.Preferences',{
fields: ['value', 'label'] fields: ['value', 'label']
,data: [ ,data: [
{ 'value': 'keep_in_tray', 'label': 'Keep in tray' } { 'value': 'keep_in_tray', 'label': 'Keep in tray' }
,{ 'value': 'keep_in_tray_and_taskbar', 'label': 'Keep in tray and taskbar' } ,{ 'value': 'keep_in_tray_and_taskbar', 'label': 'Keep in tray and/or taskbar' }
,{ 'value': 'quit', 'label': 'Quit' } ,{ 'value': 'quit', 'label': 'Quit' }
] ]
}) })

6
app/view/preferences/PreferencesController.js

@ -39,6 +39,12 @@ Ext.define('Rambox.view.preferences.PreferencesController', {
// Proxy // Proxy
if ( values.proxy && (Ext.isEmpty(values.proxyHost) || Ext.isEmpty(values.proxyPort)) ) return; if ( values.proxy && (Ext.isEmpty(values.proxyHost) || Ext.isEmpty(values.proxyPort)) ) return;
// Display behaviour
if ( values.window_display_behavior === 'show_taskbar' && values.window_close_behavior === 'keep_in_tray' ) {
Ext.Msg.alert('Action required', 'You need to change the window closing behaviour because "Keep in tray" is not possible.');
return;
}
// Locale // Locale
if ( values.locale !== ipc.sendSync('getConfig').locale ) { if ( values.locale !== ipc.sendSync('getConfig').locale ) {
localStorage.setItem('locale', values.locale); localStorage.setItem('locale', values.locale);

2
appveyor.yml

@ -1,4 +1,4 @@
version: 0.5.12 version: 0.5.13
pull_requests: pull_requests:
do_not_increment_build_number: true do_not_increment_build_number: true
branches: branches:

1
electron/main.js

@ -162,6 +162,7 @@ function createWindow () {
}); });
if ( !config.get('start_minimized') && config.get('maximized') ) mainWindow.maximize(); if ( !config.get('start_minimized') && config.get('maximized') ) mainWindow.maximize();
if ( config.get('window_display_behavior') !== 'show_trayIcon' && config.get('start_minimized') ) mainWindow.minimize();
// Check if the window its outside of the view (ex: multi monitor setup) // Check if the window its outside of the view (ex: multi monitor setup)
const { positionOnScreen } = require('./utils/positionOnScreen'); const { positionOnScreen } = require('./utils/positionOnScreen');

18
electron/tray.js

@ -34,9 +34,27 @@ exports.create = function(win, config) {
appIcon = new Tray(iconPath); appIcon = new Tray(iconPath);
appIcon.setToolTip('Rambox'); appIcon.setToolTip('Rambox');
appIcon.setContextMenu(contextMenu); appIcon.setContextMenu(contextMenu);
switch (process.platform) {
case 'darwin':
break;
case 'linux':
case 'freebsd':
case 'sunos':
// Double click is not supported and Click its only supported when app indicator is not used.
// Read more here (Platform limitations): https://github.com/electron/electron/blob/master/docs/api/tray.md
appIcon.on('click', function() {
win.webContents.executeJavaScript('ipc.send("toggleWin", true);');
});
break;
case 'win32':
appIcon.on('double-click', function() { appIcon.on('double-click', function() {
win.webContents.executeJavaScript('ipc.send("toggleWin", true);'); win.webContents.executeJavaScript('ipc.send("toggleWin", true);');
}); });
break;
default:
break;
}
}; };
exports.destroy = function() { exports.destroy = function() {

746
package-lock.json generated

File diff suppressed because it is too large Load Diff

4
package.json

@ -92,7 +92,7 @@
"chai": "3.5.0", "chai": "3.5.0",
"crowdin": "1.0.0", "crowdin": "1.0.0",
"csvjson": "4.3.3", "csvjson": "4.3.3",
"electron": "1.7.5", "electron": "^1.7.8",
"electron-builder": "^17.10.0", "electron-builder": "^17.10.0",
"electron-builder-squirrel-windows": "15.0.0", "electron-builder-squirrel-windows": "15.0.0",
"electron-squirrel-startup": "^1.0.0", "electron-squirrel-startup": "^1.0.0",
@ -101,6 +101,8 @@
}, },
"dependencies": { "dependencies": {
"@exponent/electron-cookies": "2.0.0", "@exponent/electron-cookies": "2.0.0",
"auth0-js": "^8.10.1",
"auth0-lock": "^10.22.0",
"auto-launch-patched": "5.0.2", "auto-launch-patched": "5.0.2",
"electron-config": "0.2.1", "electron-config": "0.2.1",
"electron-is-dev": "^0.1.2", "electron-is-dev": "^0.1.2",

BIN
resources/icons/gadugadu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
resources/icons/mailru.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
resources/icons/sandstorm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

2
resources/js/auth0-7.1.0.min.js vendored

File diff suppressed because one or more lines are too long

1
resources/js/lock-10.2.2/de.js

File diff suppressed because one or more lines are too long

1
resources/js/lock-10.2.2/en.js

@ -1 +0,0 @@
Auth0.registerLanguageDictionary("en", {"error":{"forgotPassword":{"too_many_requests":"You have reached the limit on password change attempts. Please wait before trying again.","lock.fallback":"We're sorry, something went wrong when requesting the password change."},"login":{"blocked_user":"The user is blocked.","invalid_user_password":"Wrong credentials.","lock.fallback":"We're sorry, something went wrong when attempting to log in.","lock.invalid_code":"Wrong code.","lock.invalid_email_password":"Wrong email or password.","lock.invalid_username_password":"Wrong username or password.","lock.network":"We could not reach the server. Please check your connection and try again.","lock.popup_closed":"Popup window closed. Try again.","lock.unauthorized":"Permissions were not granted. Try again.","password_change_required":"You need to update your password because this is the first time you are logging in, or because your password has expired.","password_leaked":"This login has been blocked because your password has been leaked in another website. We’ve sent you an email with instructions on how to unblock it.","too_many_attempts":"Your account has been blocked after multiple consecutive login attempts."},"passwordless":{"bad.email":"The email is invalid","bad.phone_number":"The phone number is invalid","lock.fallback":"We're sorry, something went wrong"},"signUp":{"invalid_password":"Password is invalid.","lock.fallback":"We're sorry, something went wrong when attempting to sign up.","password_dictionary_error":"Password is too common.","password_no_user_info_error":"Password is based on user information.","password_strength_error":"Password is too weak.","user_exists":"The user already exists.","username_exists":"The username already exists."}},"success":{"logIn":"Thanks for logging in.","forgotPassword":"We've just sent you an email to reset your password.","magicLink":"We sent you a link to log in<br />to %s.","signUp":"Thanks for signing up."},"blankErrorHint":"Can't be blank","codeInputPlaceholder":"your code","databaseEnterpriseLoginInstructions":"","databaseEnterpriseAlternativeLoginInstructions":"or","databaseSignUpInstructions":"","databaseAlternativeSignUpInstructions":"or","emailInputPlaceholder":"yours@example.com","enterpriseLoginIntructions":"Login with your corporate credentials.","enterpriseActiveLoginInstructions":"Please enter your coorporate credentials at %s.","failedLabel":"Failed!","forgotPasswordAction":"Don't remember your password?","forgotPasswordInstructions":"Please enter your email address. We will send you an email to reset your password.","forgotPasswordSubmitLabel":"Send email","invalidErrorHint":"Invalid","lastLoginInstructions":"Last time you logged in with","loginAtLabel":"Log in at %s","loginLabel":"Log In","loginSubmitLabel":"Log In","loginWithLabel":"Log in with %s","notYourAccountAction":"Not your account?","passwordInputPlaceholder":"your password","passwordStrength":{"containsAtLeast":"Contain at least %d of the following %d types of characters:","identicalChars":"No more than %d identical characters in a row (e.g., \"%s\" not allowed)","nonEmpty":"Non-empty password required","numbers":"Numbers (i.e. 0-9)","lengthAtLeast":"At least %d characters in length","lowerCase":"Lower case letters (a-z)","shouldContain":"Should contain:","specialCharacters":"Special characters (e.g. !@#$%^&*)","upperCase":"Upper case letters (A-Z)"},"passwordlessEmailAlternativeInstructions":"Otherwise, enter your email to sign in<br/>or create an account","passwordlessEmailCodeInstructions":"An email with the code has been sent to %s.","passwordlessEmailInstructions":"Enter your email to sign in<br/>or create an account","passwordlessSMSAlternativeInstructions":"Otherwise, enter your phone to sign in<br/>or create an account","passwordlessSMSCodeInstructions":"An SMS with the code has been sent<br/>to %s.","passwordlessSMSInstructions":"Enter your phone to sign in<br/>or create an account","phoneNumberInputPlaceholder":"your phone number","resendCodeAction":"Did not get the code?","resendLabel":"Resend","resendingLabel":"Resending...","retryLabel":"Retry","sentLabel":"Sent!","signUpLabel":"Sign Up","signUpSubmitLabel":"Sign Up","signUpTerms":"","signUpWithLabel":"Sign up with %s","socialLoginInstructions":"","socialSignUpInstructions":"","ssoEnabled":"Single Sign-On enabled","submitLabel":"Submit","unrecoverableError":"Something went wrong.<br />Please contact technical support.","usernameFormatErrorHint":"Use 1-15 letters, numbers and \"_\"","usernameInputPlaceholder":"your username","usernameOrEmailInputPlaceholder":"username/email","title":"Auth0","welcome":"Welcome %s!","windowsAuthInstructions":"You are connected from your corporate network&hellip;","windowsAuthLabel":"Windows Authentication"});

1
resources/js/lock-10.2.2/es.js

File diff suppressed because one or more lines are too long

1
resources/js/lock-10.2.2/it.js

File diff suppressed because one or more lines are too long

18
resources/js/lock-10.2.2/lock.min.js vendored

File diff suppressed because one or more lines are too long

1
resources/js/lock-10.2.2/nb.js

@ -1 +0,0 @@
Auth0.registerLanguageDictionary("nb", {"error":{"forgotPassword":{"too_many_requests":"Du er midlertidig blokkert på grunn av for mange passord-endringsforsøk. Vent litt før du prøver igjen.","lock.fallback":"Beklager, noe gikk galt med forespørselen om passord endring."},"login":{"blocked_user":"Brukeren er blokkert.","invalid_user_password":"Feil legitimasjon.","lock.fallback":"Beklager, noe gikk galt med innloggingsforsøket.","lock.invalid_code":"Feil kode.","lock.invalid_email_password":"Feil epost eller passord.","lock.invalid_username_password":"Feil brukernavn eller passord.","lock.network":"Kunne ikke kontakte serveren. Sjekk nettforbindelsen din og prøv igjen.","lock.popup_closed":"Popup vinduet ble lukket. Prøv igjen.","lock.unauthorized":"Fikk ikke adgang. Prøv igjen.","password_change_required":"Du må endre passord fordi dette er første gang du logger inn eller fordi passordet har utløpt.","password_leaked":"Denne påloggingen er blokkert fordi passordet har blitt lekket på et annet nettsted. Vi har sendt deg en epost med instruksjoner for hvordan du opphever blokkeringen.","too_many_attempts":"Din konto er blokkert på grunn av for mange påloggingsforsøk."},"passwordless":{"bad.email":"Epost-adressen er ugyldig","bad.phone_number":"Telefonnummeret er ugyldig","lock.fallback":"Beklager, noe gikk galt"},"signUp":{"invalid_password":"Passordet er ugyldig.","lock.fallback":"Beklager, noe gikk galt under registreringen.","password_dictionary_error":"Passordet er for vanlig.","password_no_user_info_error":"Passordet er basert på bruker-informasjon.","password_strength_error":"Passordet er for svakt.","user_exists":"Brukeren finnes fra før.","username_exists":"Brukernavnet finnes fra før."}},"success":{"logIn":"Takk for at du logget inn.","forgotPassword":"Vi sendte nettop en epost for å nullstille passordet ditt.","magicLink":"Vi sendte en lenke for å logge inn<br>på %s.","signUp":"Takk for at du registrerte deg."},"blankErrorHint":"Kan ikke være tom","codeInputPlaceholder":"din kode","databaseEnterpriseLoginInstructions":"","databaseEnterpriseAlternativeLoginInstructions":"eller","databaseSignUpInstructions":"","databaseAlternativeSignUpInstructions":"eller","emailInputPlaceholder":"din.epost@example.com","enterpriseLoginIntructions":"Logg inn med bedrifts-legitimasjon.","enterpriseActiveLoginInstructions":"Fyll inn bedrifts-legitimasjon ved %s.","failedLabel":"Mislyktes!","forgotPasswordAction":"Husker du ikke passordet?","forgotPasswordInstructions":"Skriv inn epost-adressen din. Vi sender deg en epost for å nullstille passordet.","forgotPasswordSubmitLabel":"Send epost","invalidErrorHint":"Ugyldig","lastLoginInstructions":"Forrige gang logget du inn med","loginAtLabel":"Logg inn påLog in at %s","loginLabel":"Logg inn","loginSubmitLabel":"Logg inn","loginWithLabel":"Logg inn med %s","notYourAccountAction":"Ikke din konto?","passwordInputPlaceholder":"ditt passord","passwordStrength":{"containsAtLeast":"Inneholder minst %d av følgende %d type tegn:","identicalChars":"Ikke mer enn %d like tegn etterhverandre (dvs. \"%s\" er ikke tillatt)","nonEmpty":"Passordet kan ikke være tomt","numbers":"Tall (dvs. 0-9)","lengthAtLeast":"Minst %d tegn langt","lowerCase":"Små bokstaver (a-å)","shouldContain":"Bør inneholde:","specialCharacters":"Spesialtegn (dvs. !@#$%^&*)","upperCase":"Store bokstaver (A-Å)"},"passwordlessEmailAlternativeInstructions":"Alternativt, skriv inn din epost-adresse for å logge inn<br>eller opprette en konto","passwordlessEmailCodeInstructions":"En epost med koden har blitt sendt til %s.","passwordlessEmailInstructions":"Skriv inn din epost-adresse for å logge inn<br>eller opprette en konto","passwordlessSMSAlternativeInstructions":"Alternativt, skriv inn ditt telefonnummer for å logge inn<br>eller opprette en konto","passwordlessSMSCodeInstructions":"En SMS med koden har blitt sendt til %s.","passwordlessSMSInstructions":"Skriv inn ditt telefonnummer for å logge inn<br>eller opprette en konto","phoneNumberInputPlaceholder":"ditt telefonnummer","resendCodeAction":"Fikk du ikke koden?","resendLabel":"Send på nytt","resendingLabel":"Sender på nytt...","retryLabel":"Prøv igjen","sentLabel":"Sendt!","signUpLabel":"Registrer deg","signUpSubmitLabel":"Registrer","signUpTerms":"","signUpWithLabel":"Registrer deg med %s","socialLoginInstructions":"","socialSignUpInstructions":"","ssoEnabled":"Single Sign-On aktivert","submitLabel":"Send","unrecoverableError":"Noe gikk galt.<br />Ta kontakt med teknisk support.","usernameFormatErrorHint":"Bruk 1-15 bokstaver, tall og \"_\"","usernameInputPlaceholder":"ditt brukernavn","usernameOrEmailInputPlaceholder":"brukernavn/epost","title":"Auth0","welcome":"Velkommen %s!","windowsAuthInstructions":"Du er tilkoblet via ditt bedrifts-nettverk&hellip;","windowsAuthLabel":"Windows-autentisering"});

1
resources/js/lock-10.2.2/pt-br.js

@ -1 +0,0 @@
Auth0.registerLanguageDictionary("pt-br", {"error":{"forgotPassword":{"too_many_requests":"Você atingiu o limite máximo de tentativas. Por favor aguarde antes de tentar novamente.","lock.fallback":"Sentimos muito, mas algo deu errado ao requisitar a mudança de senha."},"login":{"blocked_user":"O usuário está bloqueado.","invalid_user_password":"Credenciais inválidas.","lock.fallback":"Sentimos muito, mas algo deu errado ao tentar entrar.","lock.invalid_code":"Código inválido.","lock.invalid_email_password":"Email ou senha inválidos.","lock.invalid_username_password":"Usuário ou senha inválidos.","lock.network":"Não foi possível acessar o servidor. Por favor verifique sua conexão e tente novamente.","lock.popup_closed":"Popup fechada. Tente novamente.","lock.unauthorized":"Permissões não foram concedidas. Tente novamente.","password_change_required":"Você precisa atualizar sua senha porque é seu primeiro login, ou porque sua senha expirou.","password_leaked":"Esse login está bloqueado porque sua senha foi vazada em outro website. Nós lhe enviamos um email com instruções sobre como desbloqueá-lo.","too_many_attempts":"A sua conta foi bloqueada após várias tentativas de login consecutivas."},"passwordless":{"bad.email":"O email é inválido","bad.phone_number":"O número de telefone é inválido","lock.fallback":"Sentimos muito, algo deu errado"},"signUp":{"invalid_password":"A senha é inválida.","lock.fallback":"Sentimos muito, algo deu errado ao tentar se inscrever.","password_dictionary_error":"A senha é muito comum.","password_no_user_info_error":"A senha é baseado em informações do usuário.","password_strength_error":"A senha é muito fraca.","user_exists":"O usuário já existe.","username_exists":"O nome de usuário já existe."}},"success":{"logIn":"Obrigado por fazer login.","forgotPassword":"Acabamos de enviar um email para resetar sua senha.","magicLink":"Nós enviamos um link para fazer login<br />em %s.","signUp":"Obrigado por se inscrever."},"blankErrorHint":"Não pode ser em branco","codeInputPlaceholder":"seu código","databaseEnterpriseLoginInstructions":"","databaseEnterpriseAlternativeLoginInstructions":"ou","databaseSignUpInstructions":"","databaseAlternativeSignUpInstructions":"ou","emailInputPlaceholder":"seu@exemplo.com","enterpriseLoginIntructions":"Entre com suas credenciais corporativas.","enterpriseActiveLoginInstructions":"Por favor entre com suas credenciais corporativas em %s.","failedLabel":"Falha!","forgotPasswordAction":"Esqueceu sua senha?","forgotPasswordInstructions":"Por favor digite seu endereço de email. Enviarmos um email para resetar sua senha.","forgotPasswordSubmitLabel":"Enviar email","invalidErrorHint":"Inválido","lastLoginInstructions":"Na última vez você entrou com","loginAtLabel":"Login em %s","loginLabel":"Login","loginSubmitLabel":"Log in","loginWithLabel":"Login com %s","notYourAccountAction":"Não é sua conta?","passwordInputPlaceholder":"sua senha","passwordStrength":{"containsAtLeast":"Contenha no mínimo %d dos seguintes %d tipos de caracteres:","identicalChars":"Não mais de %d caracteres idênticos em sequência (ex: \"%s\" não é permitido)","nonEmpty":"Senha não pode ser em branco","numbers":"Números (0-9)","lengthAtLeast":"No mínimo %d caracteres","lowerCase":"Letras minúsculas (a-z)","shouldContain":"Deve conter:","specialCharacters":"Caracteres especiais (ex: !@#$%^&*)","upperCase":"Letras maiúsculas (A-Z)"},"passwordlessEmailAlternativeInstructions":"Senão, digite seu email para entrar<br/>ou criar uma conta","passwordlessEmailCodeInstructions":"Um email com o código foi enviado para %s.","passwordlessEmailInstructions":"Digite seu email para entrar<br/>ou criar uma conta","passwordlessSMSAlternativeInstructions":"Senão, digite seu telefone para entrar<br/>ou criar uma conta","passwordlessSMSCodeInstructions":"Um SMS com o código foi enviado<br/>para %s.","passwordlessSMSInstructions":"Digite seu telefone para entrar<br/>ou criar uma conta","phoneNumberInputPlaceholder":"seu número de telefone","resendCodeAction":"Não recebeu o código?","resendLabel":"Reenviar","resendingLabel":"Reenviando...","retryLabel":"Tentar novamente","sentLabel":"Enviado!","signUpLabel":"Inscrever","signUpSubmitLabel":"Inscrever","signUpTerms":"","signUpWithLabel":"Inscreva-se com %s","socialLoginInstructions":"","socialSignUpInstructions":"","ssoEnabled":"Single Sign-On habilitado","submitLabel":"Enviar","unrecoverableError":"Algo deu errado.<br />Por favor entre em contato com o suporte.","usernameFormatErrorHint":"Use 1-15 letras, números e \"_\"","usernameInputPlaceholder":"seu nome de usuário","usernameOrEmailInputPlaceholder":"usuário/email","title":"Auth0","welcome":"Bem-vindo a %s!","windowsAuthInstructions":"Você está conectado da sua rede corporativa&hellip;","windowsAuthLabel":"Autenticação Windows"});

1
resources/js/lock-10.2.2/ru.js

File diff suppressed because one or more lines are too long

1
resources/js/lock-10.2.2/zh.js

@ -1 +0,0 @@
Auth0.registerLanguageDictionary("zh", {"error":{"forgotPassword":{"too_many_requests":"您尝试登录次数过多 请稍后再试。","lock.fallback":"对不起,请求修改密码时出现错误。"},"login":{"blocked_user":"该账号已被锁定。","invalid_user_password":"密码错误","lock.fallback":"对不起,请求登陆时出现错误。","lock.invalid_code":"代码错误。","lock.invalid_email_password":"邮箱或密码错误。","lock.invalid_username_password":"账号或密码错误。","lock.network":"无法连接到服务器,请检查网络连接后重试。","lock.popup_closed":"弹出窗口被关闭,请重试","lock.unauthorized":"权限不足,请重试。","password_change_required":"由于这是第一次登录或者您的密码已过期,请更新密码。","password_leaked":"由于您的密码在其他网站已泄露,该账户已被锁定,请查看邮件解除锁定。","too_many_attempts":"由于登录操作太频繁,您的帐号已被锁定。"},"passwordless":{"bad.email":"邮箱错误","bad.phone_number":"手机号码格式不正确。","lock.fallback":"对不起,出现错误。"},"signUp":{"invalid_password":"密码错误","lock.fallback":"对不起,请求注册时出现错误。","password_dictionary_error":"密码过于常见。","password_no_user_info_error":"密码中出现账号信息。","password_strength_error":"密码过于简单。","user_exists":"该账号已存在。","username_exists":"该用户名已存在。"}},"success":{"logIn":"登录成功","forgotPassword":"重置密码的邮件已发送","magicLink":"已向您发送链接<br />到 %s 登录","signUp":"感谢您的注册。"},"blankErrorHint":"不能为空","codeInputPlaceholder":"您的代码","databaseEnterpriseLoginInstructions":"","databaseEnterpriseAlternativeLoginInstructions":"或","databaseSignUpInstructions":"","databaseAlternativeSignUpInstructions":"或","emailInputPlaceholder":"yours@example.com","enterpriseLoginIntructions":"请用您的企业账号登录","enterpriseActiveLoginInstructions":"请输入您的企业账号 %s。","failedLabel":"失败!","forgotPasswordAction":"忘记您的密码?","forgotPasswordInstructions":"请输入您的邮箱,我们将为你发送重置密码的邮件。","forgotPasswordSubmitLabel":"发电子邮件","invalidErrorHint":"错误","lastLoginInstructions":"上次登陆的信息为","loginAtLabel":"登录到 %s","loginLabel":"登录","loginSubmitLabel":"登录","loginWithLabel":"用 %s 登录","notYourAccountAction":"不是您的账号?","passwordInputPlaceholder":"您的密码","passwordStrength":{"containsAtLeast":"至少包含%d个以下%d种字符:","identicalChars":"不能多于%d个相同的字符在同一行(例如,不允许出现 \"%s\" )","nonEmpty":"密码不能为空","numbers":"数字 (如 0-9)","lengthAtLeast":"最少长度为%d个字符","lowerCase":"小写字母(a-z)","shouldContain":"应包含:","specialCharacters":"特殊字符 (如 !@#$%^&*)","upperCase":"大写字母(A-Z)"},"passwordlessEmailAlternativeInstructions":"您还可以通过邮箱登录<br>或者创建账号","passwordlessEmailCodeInstructions":"代码已通过邮件发送到 %s。","passwordlessEmailInstructions":"输入邮箱登录<br>或者创建账号。","passwordlessSMSAlternativeInstructions":"您还可以通过手机号码登录<br>或者创建账号。","passwordlessSMSCodeInstructions":"代码已通过短信发送到<br> %s。","passwordlessSMSInstructions":"输入手机号码登录<br>或者创建账号","phoneNumberInputPlaceholder":"您的手机号码","resendCodeAction":"没有收到号码?","resendLabel":"重新发送","resendingLabel":"重新发送中...","retryLabel":"重试","sentLabel":"发送!","signUpLabel":"注册","signUpSubmitLabel":"注册","signUpTerms":"","signUpWithLabel":"通过 %s 注册","socialLoginInstructions":"","socialSignUpInstructions":"","ssoEnabled":"单点登录已激活","submitLabel":"提交","unrecoverableError":"出现错误。<br />请联系技术人员。","usernameFormatErrorHint":"请使用1-15个字母, 数字或 \"_\"的组合","usernameInputPlaceholder":"您的用户名","usernameOrEmailInputPlaceholder":"用户名/邮箱","title":"Auth0","welcome":"欢迎 %s!","windowsAuthInstructions":"您已连接到组织网络&hellip;","windowsAuthLabel":"Windows认证"});

4
resources/js/rambox-modal-api.js

@ -0,0 +1,4 @@
document.addEventListener("DOMContentLoaded", function() {
window.WHAT_TYPE.isChildWindowAnIframe=function(){return false;}; // for iCloud
window.onbeforeunload=function(){return require("electron").ipcRenderer.sendToHost("close");};
});
Loading…
Cancel
Save