]>
git.proxmox.com Git - proxmox-backup.git/blob - www/Application.js
1 Ext
.define('PBS.Application', {
2 extend
: 'Ext.app.Application',
13 realignWindows: function() {
14 var modalwindows
= Ext
.ComponentQuery
.query('window[modal]');
15 Ext
.Array
.forEach(modalwindows
, function(item
) {
22 Proxmox
.Utils
.authClear();
23 me
.changeView('loginview', true);
26 changeView: function(view
, skipCheck
) {
31 if (me
.currentView
!== undefined) {
32 me
.currentView
.destroy();
35 me
.currentView
= Ext
.create({
38 if (skipCheck
!== true) {
39 Proxmox
.Utils
.checked_command(Ext
.emptyFn
);
47 Ext
.on('resize', me
.realignWindows
);
49 var provider
= new Ext
.state
.LocalStorageProvider({ prefix
: 'ext-pbs-' });
50 Ext
.state
.Manager
.setProvider(provider
);
52 let isOpenIDLogin
= Proxmox
.Utils
.getOpenIDRedirectionAuthorization() !== undefined;
53 let alreadyLoggedIn
= Proxmox
.Utils
.authOK();
55 if (isOpenIDLogin
|| !alreadyLoggedIn
) {
56 me
.changeView('loginview', true); // show login window if not loggedin
58 me
.changeView('mainview', true);
63 Ext
.application('PBS.Application');