Browse Source

Remove the last vestiges of Auth0 support.

pull/3202/head
TheGoddessInari 7 years ago
parent
commit
d7f70fd9c3
No known key found for this signature in database
GPG Key ID: 1209B1B7632D69A
  1. 7
      app/Application.js
  2. 10
      app/profile/Offline.js
  3. 10
      app/profile/Online.js
  4. 2
      app/ux/WebView.js
  5. 11
      app/view/main/Main.js
  6. 3
      app/view/main/MainModel.js

7
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);

10
app/profile/Offline.js

@ -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');
}
});

10
app/profile/Online.js

@ -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');
}
});

2
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

11
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'

3
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() : ''
}
});

Loading…
Cancel
Save