Browse Source

Allowing partition sharing between integrated tabs

pull/2102/head
mxb 6 years ago
parent
commit
4c09c10332
  1. 4
      app/ux/WebView.js

4
app/ux/WebView.js

@ -171,7 +171,7 @@ Ext.define('Rambox.ux.WebView',{
tag: 'webview' tag: 'webview'
,src: me.record.get('url') ,src: me.record.get('url')
,style: 'width:100%;height:100%;visibility:visible;' ,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')).sub : '') ,partition: me.isExternal ? me.originalPartition : 'persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).sub : '')
,plugins: 'true' ,plugins: 'true'
,allowtransparency: 'on' ,allowtransparency: 'on'
,autosize: 'on' ,autosize: 'on'
@ -415,9 +415,11 @@ Ext.define('Rambox.ux.WebView',{
xtype: 'webview' xtype: 'webview'
,closable: true // usefull, allow us to close the tab, with the DEL key ,closable: true // usefull, allow us to close the tab, with the DEL key
,record: map ,record: map
,originalPartition: me.getWebView().partition
,isExternal: true // used for the condition ,isExternal: true // used for the condition
,closeText: locale['app.window[40]'] ,closeText: locale['app.window[40]']
}; };
Ext.cq1('app-main').add(cfg); Ext.cq1('app-main').add(cfg);
// get the last tab and activate it // get the last tab and activate it
var last = Ext.cq1('app-main').items.length -1; var last = Ext.cq1('app-main').items.length -1;

Loading…
Cancel
Save