mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fixed MeshCentral Router login token and remote desktop aspect ratio mode bug.
This commit is contained in:
		
							parent
							
								
									8a45dd185d
								
							
						
					
					
						commit
						be93a87e72
					
				
					 5 changed files with 19 additions and 15 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -290,8 +290,10 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            case 'logincookie':
 | 
					            case 'logincookie':
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    // Return a login cookie
 | 
					                    // If allowed, return a login cookie
 | 
				
			||||||
                    try { ws.send(JSON.stringify({ action: 'logincookie', cookie: parent.parent.encodeCookie({ u: user._id, a: 3 }, parent.parent.loginCookieEncryptionKey) })); } catch (ex) { }
 | 
					                    if (parent.parent.config.settings.allowlogintoken === true) {
 | 
				
			||||||
 | 
					                        try { ws.send(JSON.stringify({ action: 'logincookie', cookie: parent.parent.encodeCookie({ u: user._id, a: 3 }, parent.parent.loginCookieEncryptionKey) })); } catch (ex) { }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            case 'servertimelinestats':
 | 
					            case 'servertimelinestats':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "name": "meshcentral",
 | 
					  "name": "meshcentral",
 | 
				
			||||||
  "version": "0.3.3-c",
 | 
					  "version": "0.3.3-d",
 | 
				
			||||||
  "keywords": [
 | 
					  "keywords": [
 | 
				
			||||||
    "Remote Management",
 | 
					    "Remote Management",
 | 
				
			||||||
    "Intel AMT",
 | 
					    "Intel AMT",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -4566,7 +4566,7 @@
 | 
				
			||||||
            fullscreen = !fullscreen;
 | 
					            fullscreen = !fullscreen;
 | 
				
			||||||
            if (fullscreen) {
 | 
					            if (fullscreen) {
 | 
				
			||||||
                QC('body').add("fulldesk");
 | 
					                QC('body').add("fulldesk");
 | 
				
			||||||
                QS('deskarea3x').height = null;
 | 
					                //QS('deskarea3x').height = null;
 | 
				
			||||||
                // If shift is pressed, enter browser full screen.
 | 
					                // If shift is pressed, enter browser full screen.
 | 
				
			||||||
                if (e.shiftKey == true) { enterBrowserFullscreen(Q('deskarea0')); browserfullscreen = true; }
 | 
					                if (e.shiftKey == true) { enterBrowserFullscreen(Q('deskarea0')); browserfullscreen = true; }
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
| 
						 | 
					@ -4591,9 +4591,10 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (deskAspectRatio == 2) {
 | 
					            if (deskAspectRatio == 2) {
 | 
				
			||||||
                // Scale mode
 | 
					                // Scale mode
 | 
				
			||||||
                QS('Desk').width = '100%';
 | 
					                QS('Desk')['margin-top'] = null;
 | 
				
			||||||
                QS('Desk').height = '100%';
 | 
					                QS('Desk').height = '100%';
 | 
				
			||||||
                QS('deskarea3x').height = null;
 | 
					                QS('Desk').width = '100%';
 | 
				
			||||||
 | 
					                //QS('deskarea3x').height = null;
 | 
				
			||||||
                QS('DeskParent').overflow = 'hidden';
 | 
					                QS('DeskParent').overflow = 'hidden';
 | 
				
			||||||
            } else if (deskAspectRatio == 1) {
 | 
					            } else if (deskAspectRatio == 1) {
 | 
				
			||||||
                // Zoomed mode
 | 
					                // Zoomed mode
 | 
				
			||||||
| 
						 | 
					@ -4603,18 +4604,18 @@
 | 
				
			||||||
                QS('DeskParent').overflow = 'scroll';
 | 
					                QS('DeskParent').overflow = 'scroll';
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                // Fixed aspect ratio
 | 
					                // Fixed aspect ratio
 | 
				
			||||||
                if (parentH / parentW > deskH / deskW) {
 | 
					                if ((parentH / parentW) > (deskH / deskW)) {
 | 
				
			||||||
                    var hNew = (deskH * parentW / deskW) + 'px';
 | 
					                    var hNew = ((deskH * parentW) / deskW) + 'px';
 | 
				
			||||||
                    if (webPageFullScreen || fullscreen) {
 | 
					                    //if (webPageFullScreen || fullscreen) {
 | 
				
			||||||
                        QS('deskarea3x').height = null;
 | 
					                        //QS('deskarea3x').height = null;
 | 
				
			||||||
                    } else {
 | 
					                    //} else {
 | 
				
			||||||
                        // QS('deskarea3x').height = hNew;
 | 
					                        // QS('deskarea3x').height = hNew;
 | 
				
			||||||
                        QS('deskarea3x').height = null;
 | 
					                        //QS('deskarea3x').height = null;
 | 
				
			||||||
                    }
 | 
					                    //}
 | 
				
			||||||
                    QS('Desk').height = hNew;
 | 
					                    QS('Desk').height = hNew;
 | 
				
			||||||
                    QS('Desk').width = '100%';
 | 
					                    QS('Desk').width = '100%';
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    var wNew = (deskW * parentH / deskH) + 'px';
 | 
					                    var wNew = ((deskW * parentH) / deskH) + 'px';
 | 
				
			||||||
                    if (webPageFullScreen || fullscreen) {
 | 
					                    if (webPageFullScreen || fullscreen) {
 | 
				
			||||||
                        QS('Desk').height = null;
 | 
					                        QS('Desk').height = null;
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
| 
						 | 
					@ -4622,6 +4623,7 @@
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    QS('Desk').width = wNew;
 | 
					                    QS('Desk').width = wNew;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                QS('Desk')['margin-top'] = null;
 | 
				
			||||||
                QS('DeskParent').overflow = 'hidden';
 | 
					                QS('DeskParent').overflow = 'hidden';
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue