Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide close button on dynamic splash screen #21

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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