From d7f70fd9c3fa145f6c5cb0c36951b324df16aebc Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Tue, 28 Aug 2018 04:24:16 -0700 Subject: [PATCH] Remove the last vestiges of Auth0 support. --- app/Application.js | 7 +------ app/profile/Offline.js | 10 ---------- app/profile/Online.js | 10 ---------- app/ux/WebView.js | 2 +- app/view/main/Main.js | 11 ----------- app/view/main/MainModel.js | 3 --- 6 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 app/profile/Offline.js delete mode 100644 app/profile/Online.js diff --git a/app/Application.js b/app/Application.js index 9f5908f8..adcdc8f1 100644 --- a/app/Application.js +++ b/app/Application.js @@ -15,11 +15,6 @@ Ext.define('Rambox.Application', { ,'Services' ] - ,profiles: [ - 'Offline' - ,'Online' - ] - ,config: { totalServicesLoaded: 0 ,totalNotifications: 0 @@ -228,7 +223,7 @@ Ext.define('Rambox.Application', { url: 'https://api.github.com/repos/TheGoddessInari/rambox/releases/latest' ,method: 'GET' ,success: function(response) { - var json = Ext.decode(response.responseText); + var json = JSON.parse(response.responseText); var appVersion = new Ext.Version(require('electron').remote.app.getVersion()); if ( appVersion.isLessThan(json.version) ) { console.info('New version is available', json.version); diff --git a/app/profile/Offline.js b/app/profile/Offline.js deleted file mode 100644 index bffd9015..00000000 --- a/app/profile/Offline.js +++ /dev/null @@ -1,10 +0,0 @@ -Ext.define('Rambox.profile.Offline', { - extend: 'Ext.app.Profile' - ,isActive: function() { - return !localStorage.getItem('id_token'); - } - - ,launch: function() { - console.warn('USER NOT LOGGED IN'); - } -}); diff --git a/app/profile/Online.js b/app/profile/Online.js deleted file mode 100644 index cb320770..00000000 --- a/app/profile/Online.js +++ /dev/null @@ -1,10 +0,0 @@ -Ext.define('Rambox.profile.Online', { - extend: 'Ext.app.Profile' - ,isActive: function() { - return localStorage.getItem('id_token'); - } - - ,launch: function() { - console.info('USER LOGGED IN'); - } -}); diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 229cd403..091490f3 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -164,7 +164,7 @@ Ext.define('Rambox.ux.WebView',{ tag: 'webview' ,src: me.record.get('url') ,style: 'width:100%;height:100%;visibility:visible;' - ,partition: 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).user_id : '') + ,partition: 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') ,allowtransparency: 'on' ,autosize: 'on' ,webpreferences: '' //,nativeWindowOpen=true diff --git a/app/view/main/Main.js b/app/view/main/Main.js index 1df02524..45cbb331 100644 --- a/app/view/main/Main.js +++ b/app/view/main/Main.js @@ -253,17 +253,6 @@ Ext.define('Rambox.view.main.Main', { ,id: 'lockRamboxBtn' } ,'->' - ,{ - xtype: 'image' - ,id: 'avatar' - ,bind: { - src: '{avatar}' - ,hidden: '{!avatar}' - } - ,width: 30 - ,height: 30 - ,style: 'border-radius: 50%;border:2px solid #d8d8d8;' - } ,{ text: 'Backup' ,glyph: 'xf0c7@FontAwesome' diff --git a/app/view/main/MainModel.js b/app/view/main/MainModel.js index 32350ee6..845fcea6 100644 --- a/app/view/main/MainModel.js +++ b/app/view/main/MainModel.js @@ -6,8 +6,5 @@ Ext.define('Rambox.view.main.MainModel', { ,data: { name: 'Rambox' - ,username: localStorage.getItem('profile') ? JSON.parse(localStorage.getItem('profile')).name : '' - ,avatar: localStorage.getItem('profile') ? JSON.parse(localStorage.getItem('profile')).picture : '' - ,last_sync: localStorage.getItem('profile') && JSON.parse(localStorage.getItem('profile')).user_metadata && JSON.parse(localStorage.getItem('profile')).user_metadata.services_lastupdate ? new Date(JSON.parse(localStorage.getItem('profile')).user_metadata.services_lastupdate).toUTCString() : '' } });