mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo-client.git
synced 2026-09-21 16:52:02 -07:00
Merge pull request #18 from Permissionless-Software-Foundation/ct-unstable
fix(startup modal): Allowing dismissal if there is an error
This commit is contained in:
+11
-4
@@ -47,7 +47,8 @@ class App extends React.Component {
|
|||||||
asyncInitFinished: false, // Did startup finish?
|
asyncInitFinished: false, // Did startup finish?
|
||||||
asyncInitSucceeded: null, // Did startup finish successfully?
|
asyncInitSucceeded: null, // Did startup finish successfully?
|
||||||
modalBody: [], // Strings displayed in the modal
|
modalBody: [], // Strings displayed in the modal
|
||||||
hideSpinner: false // Spinner gif in modal
|
hideSpinner: false, // Spinner gif in modal
|
||||||
|
denyClose: false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cnt = 0
|
this.cnt = 0
|
||||||
@@ -59,6 +60,10 @@ class App extends React.Component {
|
|||||||
try {
|
try {
|
||||||
this.addToModal('Loading minimal-slp-wallet')
|
this.addToModal('Loading minimal-slp-wallet')
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
denyClose: true
|
||||||
|
})
|
||||||
|
|
||||||
await this.asyncLoad.loadWalletLib()
|
await this.asyncLoad.loadWalletLib()
|
||||||
|
|
||||||
this.addToModal('Getting alternative servers')
|
this.addToModal('Getting alternative servers')
|
||||||
@@ -77,7 +82,8 @@ class App extends React.Component {
|
|||||||
servers,
|
servers,
|
||||||
showStartModal: false,
|
showStartModal: false,
|
||||||
asyncInitFinished: true,
|
asyncInitFinished: true,
|
||||||
asyncInitSucceeded: true
|
asyncInitSucceeded: true,
|
||||||
|
denyClose: false
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.modalBody = [
|
this.modalBody = [
|
||||||
@@ -90,7 +96,8 @@ class App extends React.Component {
|
|||||||
hideSpinner: true,
|
hideSpinner: true,
|
||||||
showStartModal: true,
|
showStartModal: true,
|
||||||
asyncInitFinished: true,
|
asyncInitFinished: true,
|
||||||
asyncInitSucceeded: false
|
asyncInitSucceeded: false,
|
||||||
|
denyClose: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +126,7 @@ class App extends React.Component {
|
|||||||
modalBody={this.state.modalBody}
|
modalBody={this.state.modalBody}
|
||||||
hideSpinner={this.state.hideSpinner}
|
hideSpinner={this.state.hideSpinner}
|
||||||
appData={appData}
|
appData={appData}
|
||||||
denyClose={this.state.showStartModal}
|
denyClose={this.state.denyClose}
|
||||||
/>
|
/>
|
||||||
: <InitializedView wallet={this.state.wallet} menuState={this.state.menuState} appData={appData} />
|
: <InitializedView wallet={this.state.wallet} menuState={this.state.menuState} appData={appData} />
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user