Commit f8de081 1 parent 76b9ba5 commit f8de081 Copy full SHA for f8de081
File tree 2 files changed +19
-0
lines changed
packages/desktop-gui/src/runs
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import BootstrapModal from 'react-bootstrap-modal'
6
6
import ipc from '../lib/ipc'
7
7
import { configFileFormatted } from '../lib/config-file-formatted'
8
8
import SetupProject from './setup-project-modal'
9
+ import authStore from '../auth/auth-store'
9
10
10
11
@observer
11
12
export default class ProjectNotSetup extends Component {
@@ -92,6 +93,22 @@ export default class ProjectNotSetup extends Component {
92
93
_projectSetup ( ) {
93
94
if ( ! this . state . setupProjectModalOpen ) return null
94
95
96
+ if ( ! this . props . isAuthenticated ) {
97
+ authStore . openLogin ( ( isAuthenticated ) => {
98
+ if ( ! isAuthenticated ) {
99
+ // auth was canceled, cancel project setup too
100
+ this . setState ( { setupProjectModalOpen : false } )
101
+ }
102
+ } )
103
+
104
+ return null
105
+ }
106
+
107
+ if ( this . props . isShowingLogin ) {
108
+ // login dialog still open, wait for it to close before proceeding
109
+ return null
110
+ }
111
+
95
112
return (
96
113
< SetupProject
97
114
project = { this . props . project }
Original file line number Diff line number Diff line change @@ -290,6 +290,8 @@ class RunsList extends Component {
290
290
_projectNotSetup ( isValid = true ) {
291
291
return (
292
292
< ProjectNotSetup
293
+ isAuthenticated = { authStore . isAuthenticated }
294
+ isShowingLogin = { authStore . isShowingLogin }
293
295
project = { this . props . project }
294
296
isValid = { isValid }
295
297
onSetup = { this . _setProjectDetails }
You can’t perform that action at this time.
0 commit comments