]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: openVNCViewer: mobile has no Ext.state.Manager
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 1 Oct 2019 12:58:54 +0000 (14:58 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 1 Oct 2019 14:01:29 +0000 (16:01 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/Utils.js

index 6a489e7ecd4bd9a98a86967316a5e50432e7f067..5cc6b674e645fa23d4fde57886dd67f830ad5476 100644 (file)
@@ -960,14 +960,18 @@ Ext.define('PVE.Utils', { utilities: {
     },
 
     openVNCViewer: function(vmtype, vmid, nodename, vmname, cmd) {
-       var sp = Ext.state.Manager.getProvider();
+       let scaling = 'off';
+       if (Proxmox.Utils.toolkit !== 'touch') {
+           var sp = Ext.state.Manager.getProvider();
+           scaling = sp.get('novnc-scaling', 'off');
+       }
        var url = Ext.Object.toQueryString({
            console: vmtype, // kvm, lxc, upgrade or shell
            novnc: 1,
            vmid: vmid,
            vmname: vmname,
            node: nodename,
-           resize: sp.get('novnc-scaling', 'off'),
+           resize: scaling,
            cmd: cmd
        });
        var nw = window.open("?" + url, '_blank', "innerWidth=745,innerheight=427");