File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { Server } from "./services/server";
10
10
11
11
function App ( ) {
12
12
const { status, launch, kill } = useServer ( ) ;
13
- const { isSwapping, output, swapFace } = useSwapFace ( ) ;
13
+ const { isSwapping, output, swapFace, cancel } = useSwapFace ( ) ;
14
14
15
15
const [ rootDir , setRootDir ] = useState ( "" ) ;
16
16
@@ -38,8 +38,9 @@ function App() {
38
38
{ status === "idle" && < button onClick = { launch } > Launch</ button > }
39
39
{ status === "launching" && < button onClick = { kill } > Launching...</ button > }
40
40
{ status === "running" && < button onClick = { startSwap } > Swap</ button > }
41
+ { isSwapping && < button onClick = { cancel } > Swapping...</ button > }
41
42
42
- { status === "launching" && < p > 首次加载比较缓慢 ,请耐心等待...</ p > }
43
+ { status === "launching" && < p > 首次加载较慢 ,请耐心等待...</ p > }
43
44
44
45
< button onClick = { ( ) => download ( ) } > 下载测试</ button >
45
46
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class _Server {
37
37
] ) . execute ( ) ;
38
38
return output . code === 0 ;
39
39
}
40
- return true ;
40
+ return exists ;
41
41
} catch ( error ) {
42
42
return false ;
43
43
}
You can’t perform that action at this time.
0 commit comments