diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/UiObject.js b/Projects/Foundations/UI/Spaces/Floating-Space/UiObject.js index 1930c374d..ac32a5e08 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/UiObject.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/UiObject.js @@ -21,6 +21,7 @@ function newUiObject() { uiObjectTitle: undefined, uiObjectMessage: undefined, circularProgressBar: undefined, + isLoading: undefined, isRunning: undefined, isPlaying: undefined, shortcutKey: undefined, @@ -2420,6 +2421,14 @@ function newUiObject() { /* Image */ if (icon !== undefined) { if (icon.canDrawIcon === true) { + + // If this UiObject is being loaded then display at half opacity + if(thisObject.payload.isLoading === true) { + browserCanvasContext.globalAlpha = 0.5 + } else { + browserCanvasContext.globalAlpha = 1 + } + let additionalImageSize = 0 if (isRunningAtBackend === true || isReadyToReferenceAttach === true || isReadyToChainAttach === true) { additionalImageSize = 20 } let totalImageSize = additionalImageSize + thisObject.payload.floatingObject.currentImageSize @@ -2453,6 +2462,8 @@ function newUiObject() { position.y - totalImageSize / 2, totalImageSize, totalImageSize) + + browserCanvasContext.globalAlpha = 1 } } diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 6d130f1e6..8bf1391cf 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -55,6 +55,13 @@ function newGovernanceUserProfileSpace() { } } let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') + + // Initialise the isLoading parameter for each User Profile + for (let i = 0; i < userProfiles.length; i++) { + let userProfile = userProfiles[i] + + userProfile.payload.isLoading = true + } /* let pools = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Pools') let assets = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Assets') @@ -374,11 +381,13 @@ function newGovernanceUserProfileSpace() { if (userProfile.payload === undefined) { continue } if (userProfile.payload.bloackchainBalancesLoading === true) { + userProfile.payload.isLoading = true return } if (userProfile.payload.blockchainTokens === undefined) { userProfile.payload.bloackchainBalancesLoading = true + userProfile.payload.isLoading = true UI.projects.foundations.spaces.cockpitSpace.setStatus('Loading blockchain balances for User Profile # ' + (i + 1) + ' / ' + userProfiles.length, 1500, UI.projects.foundations.spaces.cockpitSpace.statusTypes.ALL_GOOD) getBlockchainAccount(userProfile) @@ -461,6 +470,7 @@ function newGovernanceUserProfileSpace() { return response.json(); }).then(function (data) { userProfile.payload.bloackchainBalancesLoading = false + userProfile.payload.isLoading = false if (data.result === "Max rate limit reached, please use API Key for higher rate limit") { userProfile.payload.blockchainTokens = undefined } else {