From 8e31d667ef03cc0cc2a1fe43dd5e66531cad2998 Mon Sep 17 00:00:00 2001 From: avidit Date: Mon, 14 Nov 2022 12:13:48 -0500 Subject: [PATCH] Hide close button on dynamic splash screen --- package-lock.json | 4 ++-- package.json | 2 +- src/App.js | 8 ++++---- src/Static.js | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bda0df..bf3489e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dynamods/splash-screen", - "version": "1.0.2", + "version": "1.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dynamods/splash-screen", - "version": "1.0.2", + "version": "1.0.4", "license": "MIT", "dependencies": { "bootstrap": "^5.2.1", diff --git a/package.json b/package.json index c23b0a4..f966f7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dynamods/splash-screen", - "version": "1.0.3", + "version": "1.0.4", "description": "Splash Screen maintained by Dynamo Team@Autodesk", "author": "Autodesk Inc.", "license": "MIT", diff --git a/src/App.js b/src/App.js index edf5e22..cc68e5b 100644 --- a/src/App.js +++ b/src/App.js @@ -17,7 +17,7 @@ class App extends React.Component { this.state = { welcomeToDynamoTitle: 'Welcome to Dynamo!', loadingDone: false, - signInStatus:false + signInStatus: false }; //This is a reference to the DOM of the project that will be called in Dynamo to set the title of the splash screen (Defined by 'Welcome to Dynamo!' by default) @@ -71,7 +71,7 @@ class App extends React.Component { - + {this.state.loadingDone && } @@ -104,8 +104,8 @@ class App extends React.Component { loadingDone: true }); }; - - closeDynamo(){ + + closeDynamo() { if (chrome.webview !== undefined) { chrome.webview.hostObjects.scriptObject.CloseWindow(); } diff --git a/src/Static.js b/src/Static.js index 04b3947..f7f31df 100644 --- a/src/Static.js +++ b/src/Static.js @@ -112,19 +112,19 @@ class Static extends React.Component { signIn = async () => { if (chrome.webview !== undefined) { if (this.state.signInStatus) { - var ret = await chrome.webview.hostObjects.scriptObject.SignOut(); + let status = await chrome.webview.hostObjects.scriptObject.SignOut(); this.setState({ - signInStatus: !ret, + signInStatus: !status, signInTitle: 'Sign In' }); } else { - var btn = document.getElementById('btnSignIn'); + let btn = document.getElementById('btnSignIn'); btn.classList.add('disableButton'); btn.disabled = true; this.setState({ signInTitle: 'Signing In' }); - var status = await chrome.webview.hostObjects.scriptObject.SignIn(); + let status = await chrome.webview.hostObjects.scriptObject.SignIn(); this.setState({ signInStatus: status }); btn.classList.remove('disableButton'); @@ -151,7 +151,7 @@ class Static extends React.Component { readFile(event) { let file = event.target.files[0]; if (file) { - var fr = new FileReader(); + let fr = new FileReader(); fr.onload = function () { if (chrome.webview !== undefined) { chrome.webview.hostObjects.scriptObject.ImportSettings(fr.result);