File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
solutions/supervisor/www/src Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const App = () => {
33
33
) ;
34
34
const [ isNewVersionModalOpen , setIsNewVersionModalOpen ] = useState ( false ) ;
35
35
const [ newVersion , setNewVersion ] = useState ( "" ) ;
36
- const [ isDisableLayout , setIsDisableLayout ] = useState ( true ) ;
36
+ const [ isDisableLayout , setIsDisableLayout ] = useState ( false ) ;
37
37
38
38
useEffect ( ( ) => {
39
39
const param = parseUrlParam ( window . location . href ) ;
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ const refreshToken = async () => {
77
77
78
78
if ( ! refresh_token || refresh_token == null || ! token || token == null ) {
79
79
// 需要登录
80
- sensecraftAuthorize ( ) ;
80
+ // sensecraftAuthorize();
81
81
return Promise . reject ( ) ;
82
82
}
83
83
try {
Original file line number Diff line number Diff line change @@ -202,12 +202,12 @@ const Workspace = () => {
202
202
// 自动保存
203
203
useEffect ( ( ) => {
204
204
const intervalId = setInterval ( ( ) => {
205
- if ( ! loading && ! syncing ) {
205
+ if ( ! loading && ! syncing && token ) {
206
206
autoSaveApp ( ) ;
207
207
}
208
208
} , 15000 ) ;
209
209
return ( ) => clearInterval ( intervalId ) ;
210
- } , [ loading , syncing ] ) ;
210
+ } , [ loading , syncing , token ] ) ;
211
211
212
212
// 切换路由的时候做一次自动保存
213
213
useEffect ( ( ) => {
@@ -225,7 +225,7 @@ const Workspace = () => {
225
225
226
226
useEffect ( ( ) => {
227
227
const initAction = async ( ) => {
228
- if ( actionInfo ?. action ) {
228
+ if ( actionInfo ?. action && token ) {
229
229
const action = actionInfo . action ; //new / app / clone / model /normal action为空默认为normal
230
230
const app_id = actionInfo . app_id ; //type为app时才需要传
231
231
const model_id = actionInfo . model_id ; //type为model时才需要传
@@ -256,7 +256,7 @@ const Workspace = () => {
256
256
}
257
257
} ;
258
258
initAction ( ) ;
259
- } , [ actionInfo ?. action ] ) ;
259
+ } , [ actionInfo ?. action , token ] ) ;
260
260
261
261
const getSensecraftUserInfo = async ( ) => {
262
262
try {
You can’t perform that action at this time.
0 commit comments