diff --git a/CHANGELOG.md b/CHANGELOG.md index 93bb7ba21..5c165de4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to the Zlux App Manager will be documented in this file. +## `2.8.0` +- Bugfix: Fixed the iframe-adapter not properly recognizing standalone mode +- Bugfix: Fixed Iframes from unintentionally loading their sources multiple times during refocus & multi-app situations +- Enhancement: Added new isSingleAppModeSimple() to iframe-adapter to differentiate between standalone mode and simple standalone mode +- Enhancement: Replace existing snapshot preview with lighter UI to magnitudes increase multi-app Desktop performance + ## `2.0.0` - Enhancement: New desktop library versions: Angular 6->12, Corejs 2->3, Typescript 2->4 etc. For more information, visit https://www.zowe.org/vnext diff --git a/bootstrap/src/main.ts b/bootstrap/src/main.ts index df5f0652f..917afc829 100644 --- a/bootstrap/src/main.ts +++ b/bootstrap/src/main.ts @@ -36,7 +36,6 @@ function processApp2AppArgs(url?: string): void { switch (key) { case "pluginId": window['GIZA_PLUGIN_TO_BE_LOADED'] = value; - window['GIZA_SIMPLE_CONTAINER_REQUESTED'] = true; window['GIZA_ENVIRONMENT'] = 'MVD'; pluginId = value; break; @@ -49,16 +48,17 @@ function processApp2AppArgs(url?: string): void { break; case "windowManager": windowManager = value; + if (!windowManager || windowManager.toUpperCase() !== 'MVD') { + window['GIZA_SIMPLE_CONTAINER_REQUESTED'] = true; + } break; } }); if (window['GIZA_SIMPLE_CONTAINER_REQUESTED']) { - if (windowManager && windowManager.toUpperCase() === 'MVD') { - console.log(`ZWED5043I - MVD standalone container requested with pluginId ${pluginId}`); - } else { - console.log(`ZWED5003I - Simple container requested with pluginId ${pluginId}`); - } + console.log(`ZWED5003I - Simple container requested with pluginId ${pluginId}`); + } else { + console.log(`ZWED5043I - MVD standalone container requested with pluginId ${pluginId}`); } } diff --git a/bootstrap/web/iframe-adapter.js b/bootstrap/web/iframe-adapter.js index 0f6cfa2c3..fbc791c05 100644 --- a/bootstrap/web/iframe-adapter.js +++ b/bootstrap/web/iframe-adapter.js @@ -72,7 +72,8 @@ let messageHandler = function(message) { window.dispatchEvent(restored) return; case 'windowEvents.resized': - //console.log('resized') + let resized = new CustomEvent('ZoweZLUX.windowEvents', {detail: {event:'resized'}}); + window.dispatchEvent(resized); return; case 'windowEvents.titleChanged': let titleChanged = new CustomEvent('ZoweZLUX.windowEvents', {detail: {event:'titleChange'}}); @@ -183,27 +184,24 @@ var ZoweZLUX = { pluginDef: undefined, launchMetadata: undefined, - //True - Standalone, False - We are in regular desktop mode + //True - Single app mode, False - We are in regular desktop mode isSingleAppMode() { return new Promise(function(resolve, reject) { - if (window.GIZA_SIMPLE_CONTAINER_REQUESTED) { //Ancient edgecase + if (window.top.GIZA_PLUGIN_TO_BE_LOADED) { //Ancient edgecase resolve(true); //Standalone mode - } else { - let intervalId = setInterval(checkForStandaloneMode, 100); - function checkForStandaloneMode() { - if (ZoweZLUX.iframe.pluginDef) { //If we have the plugin definition - clearInterval(intervalId); - resolve(false); - } + } else { + resolve(false); } - setTimeout(() => { - clearInterval(intervalId); - if (ZoweZLUX.iframe.pluginDef === undefined || null) { - resolve(true); - } else { - resolve(false); - } - }, 1000); + }); + }, + + //True - Standalone + using simple window manager, False - We are in regular desktop or using the MVD window manager for single app mode + isSingleAppModeSimple() { + return new Promise(function(resolve, reject) { + if (window.top.GIZA_SIMPLE_CONTAINER_REQUESTED) { //Ancient edgecase + resolve(true); //Standalone mode + } else { + resolve(false); } }); } diff --git a/virtual-desktop/src/app/authentication-manager/login/login.component.ts b/virtual-desktop/src/app/authentication-manager/login/login.component.ts index fd14699ac..03466977e 100644 --- a/virtual-desktop/src/app/authentication-manager/login/login.component.ts +++ b/virtual-desktop/src/app/authentication-manager/login/login.component.ts @@ -194,7 +194,7 @@ export class LoginComponent implements OnInit { } } this.isLoading = false; - if (!this.showLogin && window['GIZA_SIMPLE_CONTAINER_REQUESTED']) { + if (!this.showLogin && window['GIZA_PLUGIN_TO_BE_LOADED']) { this.authenticationService.spawnApplicationsWithNoUsername(); this.enableExpirationPrompt = false; this.needLogin = false; diff --git a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.css b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.css index 1698242a0..9c52fb47d 100644 --- a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.css +++ b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.css @@ -12,9 +12,8 @@ .instance-item { width: 200px; - height: 120px; - margin-left: 3px; - margin-right: 3px; + height: 140px; + margin: 3px; } .instance-viewer { @@ -51,6 +50,11 @@ margin-top: -10px; } +.instance-preview-caption { + font-size: large; + padding-top: 1rem; +} + .instance-snapshot:hover .instance-preview { opacity: 0.5; } diff --git a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.html b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.html index 4d692e658..bb0329fcf 100644 --- a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.html +++ b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-instance-view/launchbar-instance-view.component.html @@ -11,12 +11,15 @@ [style.background]="color.launchbarMenuColor" [style.color]="color.launchbarMenuText">