Skip to content

Commit

Permalink
Hide close button on dynamic splash screen (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
avidit authored Nov 14, 2022
1 parent 8e19291 commit 6763d62
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -71,7 +71,7 @@ class App extends React.Component {
</Row>
</Col>
<Col className='p-0' >
<span onClick={this.closeDynamo} className='close'/>
{this.state.loadingDone && <span onClick={this.closeDynamo} className='close' />}
<img className='screenBackground' alt='' src={base64DynamoBackground}></img>
</Col>
</Row>
Expand Down Expand Up @@ -104,8 +104,8 @@ class App extends React.Component {
loadingDone: true
});
};
closeDynamo(){

closeDynamo() {
if (chrome.webview !== undefined) {
chrome.webview.hostObjects.scriptObject.CloseWindow();
}
Expand Down
10 changes: 5 additions & 5 deletions src/Static.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
Expand Down

0 comments on commit 6763d62

Please sign in to comment.