Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
EOL: Thank you, thank you, thank you, thank you
Browse files Browse the repository at this point in the history
❤❤❤❤
  • Loading branch information
saenzramiro committed Apr 21, 2022
1 parent 78acfee commit 0669daf
Show file tree
Hide file tree
Showing 139 changed files with 2,106 additions and 957 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,5 @@ npm-debug.log
# Vagrant
.vagrant/

env.js
rambox_cfg.json
languages.js
electron/dev-app-update.yml
16 changes: 0 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,6 @@ Once you have rambox cloned, before you start the application, you first need to
npm install
```

Then you need to add the private environment variables (API Keys):

```bash
# Copy `env-sample.js` with a name of env.js
# Populate it with Auth0 clientid and domain e.g. test.auth0.com
# You can get these details from one of your "apps" here https://manage.auth0.com/#/clients/

# macOS / Linux
cp env-sample.js env.js

# Windows
copy env-sample.js env.js
```

Then edit the `env.js` file and modify the API keys only for services that you will use.

```bash
# Compile the files...
sencha app watch
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ Fork and work!
```shell
git clone https://github.com/saenzramiro/rambox.git
cd rambox
cp env-sample.js env.js
# update env.js with your auth0 details.
npm install
sencha app watch
npm start
Expand Down
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ ipc.on('autoUpdater:update-downloaded', function(e, info) {
'->'
,{
xtype: 'label'
,html: '<b>New version ready to install ('+info.version+')!</b> It will be installed the next time Rambox is relaunched.'
,html: '<b>New version is ready to be installed ('+info.version+')!</b> Click the following button to install it now.'
}
,{
xtype: 'button'
,text: 'Relaunch Now'
,text: 'Install now'
,handler: function(btn) { ipc.send('autoUpdater:quit-and-install'); }
}
,{
xtype: 'button'
,text: 'Changelog'
,ui: 'decline'
,href: 'https://github.com/ramboxapp/community-edition/releases/tag/'+info.version
,href: 'https://github.com/ramboxapp/download/releases/latest'
}
,'->'
,{
Expand Down
8 changes: 2 additions & 6 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@
{
"path": "resources/js/loadscreen.js"
},
{
"path": "env.js",
"remote": true
},
{
"path": "app.js",
"bundle": true
Expand Down Expand Up @@ -291,10 +287,10 @@
*/
"resources": [
"electron",
"env.js",
"package.json",
"package-lock.json",
"masterpassword.html"
"masterpassword.html",
"screenselector.html"
],

/**
Expand Down
110 changes: 14 additions & 96 deletions app/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Ext.define('Rambox.Application', {
,name: 'Rambox'

,requires: [
'Rambox.ux.Auth0'
,'Rambox.util.MD5'
'Rambox.util.MD5'
,'Ext.window.Toast'
,'Ext.util.Cookies'
]
Expand Down Expand Up @@ -134,47 +133,20 @@ Ext.define('Rambox.Application', {
]
});
}
// Prevent track if the user have disabled this option (default: false)
if ( !ipc.sendSync('sendStatistics') ) {
ga_storage = {
_enableSSL: Ext.emptyFn
,_disableSSL: Ext.emptyFn
,_setAccount: Ext.emptyFn
,_setDomain: Ext.emptyFn
,_setLocale: Ext.emptyFn
,_setCustomVar: Ext.emptyFn
,_deleteCustomVar: Ext.emptyFn
,_trackPageview: Ext.emptyFn
,_trackEvent: Ext.emptyFn
}
}

// Set Google Analytics events
ga_storage._setAccount('UA-80680424-1');
ga_storage._trackPageview('/index.html', 'main');
ga_storage._trackEvent('Versions', require('electron').remote.app.getVersion());

// Load language for Ext JS library
Ext.Loader.loadScript({url: Ext.util.Format.format("ext/packages/ext-locale/build/ext-locale-{0}.js", localStorage.getItem('locale-auth0') || 'en')});

// Initialize Auth0
if ( auth0Cfg.clientID !== '' && auth0Cfg.domain !== '' ) Rambox.ux.Auth0.init();

// Set cookies to help Tooltip.io messages segmentation
Ext.util.Cookies.set('version', require('electron').remote.app.getVersion());
if ( Ext.util.Cookies.get('auth0') === null ) Ext.util.Cookies.set('auth0', false);

// Check for updates
if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 ) Rambox.app.checkUpdate(true);

// Get Google URLs
Ext.Ajax.request({
url: 'https://raw.githubusercontent.com/ramboxapp/community-edition/gh-pages/api/google.json'
,method: 'GET'
,success: function(response) {
Rambox.app.config.googleURLs = Ext.decode(response.responseText);
}
});
Ext.Loader.loadScript({url: Ext.util.Format.format("ext/packages/ext-locale/build/ext-locale-{0}.js", localStorage.getItem('locale-extjs') || 'en')});

// Set Google URLs
Rambox.app.config.googleURLs = [
"accounts.google.com/ServiceLogin",
"accounts.google.com/signin",
"accounts.google.com/_/lookup/accountlookup",
"accounts.google.com/o/oauth2",
"accounts.google.com/_/signin",
"accounts.google.com/AddSession?",
"accounts.google.com/_/"
];

// Shortcuts
const platform = require('electron').remote.process.platform;
Expand Down Expand Up @@ -275,60 +247,6 @@ Ext.define('Rambox.Application', {
}

,checkUpdate: function(silence) {
console.info('Checking for updates...');
Ext.Ajax.request({
url: 'https://api.github.com/repos/ramboxapp/community-edition/releases/latest'
,method: 'GET'
,success: function(response) {
var json = Ext.decode(response.responseText);
var appVersion = new Ext.Version(require('electron').remote.app.getVersion());
if ( appVersion.isLessThan(json.name) && !json.draft && !json.prerelease ) {
console.info('New version is available', json.version);
Ext.cq1('app-main').addDocked({
xtype: 'toolbar'
,dock: 'top'
,ui: 'newversion'
,items: [
'->'
,{
xtype: 'label'
,html: '<b>'+locale['app.update[0]']+'</b> ('+json.version+')' + ( process.platform === 'win32' ? ' is downloading in the background and you will be notified when it is ready to be installed.' : '' )
}
,{
xtype: 'button'
,text: locale['app.update[1]']
,href: process.platform === 'darwin' ? 'https://getrambox.herokuapp.com/download/'+process.platform+'_'+process.arch : 'https://github.com/ramboxapp/community-edition/releases/latest'
,hidden: process.platform === 'win32'
}
,{
xtype: 'button'
,text: locale['app.update[2]']
,ui: 'decline'
,tooltip: 'Click here to see more information about the new version.'
,href: 'https://github.com/ramboxapp/community-edition/releases/tag/'+json.version
}
,'->'
,{
glyph: 'xf00d@FontAwesome'
,baseCls: ''
,style: 'cursor:pointer;'
,handler: function(btn) { Ext.cq1('app-main').removeDocked(btn.up('toolbar'), true); }
}
]
});
ipc.send('autoUpdater:check-for-updates');
return;
} else if ( !silence ) {
Ext.Msg.show({
title: locale['app.update[3]']
,message: locale['app.update[4]']
,icon: Ext.Msg.INFO
,buttons: Ext.Msg.OK
});
}

console.info('Your version is the latest. No need to update.');
}
});
ipc.send('autoUpdater:check-for-updates');
}
});
2 changes: 1 addition & 1 deletion app/store/ServicesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Ext.define('Rambox.store.ServicesList', {

,proxy: {
type: 'ajax',
url: 'https://raw.githubusercontent.com/ramboxapp/community-edition/gh-pages/api/services.json',
url: 'resources/services.json',
reader: {
type: 'json',
rootProperty: 'responseText'
Expand Down
Loading

0 comments on commit 0669daf

Please sign in to comment.