Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb148fa5

Browse files
committed
fix ui issue
1 parent8e8fa50 commitb148fa5

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

‎src/actions/utils/runCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const runCommands = async (commands: string[], send: (action: T.Action) => void)
88
for(constcommandofcommands){
99
constprocess={
1010
title:command,
11-
description:'Running process',
11+
description:'Running process...',
1212
}
1313
send({type:'COMMAND_START',payload:{process:{ ...process,status:'RUNNING'}}})
1414
letresult:{stdout:string;stderr:string}

‎web-app/src/components/ProcessEvents/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ import * as React from 'react'
22
import{MessageasAlifdMessage}from'@alifd/next'
33
import*asTfrom'typings'
44

5-
interfaceProcess{
6-
title:string
7-
description:string
8-
}
9-
105
interfaceProps{
116
processes:T.ProcessEvent[]
127
}
@@ -19,12 +14,15 @@ const styles = {
1914
}
2015

2116
// display a list of active processes
22-
constProcessEvents=(props:Props)=>{
17+
constProcessEvents=({ processes}:Props)=>{
18+
if(!processes.length){
19+
returnnull
20+
}
2321
return(
2422
<divstyle={styles.container}>
25-
{props.processes.map(process=>(
23+
{processes.map(process=>(
2624
<AlifdMessagekey={process.title}type="loading"size="medium"title={process.title}>
27-
{process.description}...
25+
{process.description}
2826
</AlifdMessage>
2927
))}
3028
</div>
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
import*asReactfrom'react'
22

33
interfaceProps{
4-
children:React.ReactElement
4+
children:React.ReactElement
55
}
66

77
constresize=()=>({
8-
minWidth:window.innerWidth-20,
9-
minHeight:window.innerHeight-20,
8+
width:window.innerWidth-20,
9+
height:window.innerHeight-20,
1010
})
1111

1212
constWorkspace=({ children}:Props)=>{
13-
const[dimensions,setDimensions]=React.useState(resize())
13+
const[dimensions,setDimensions]=React.useState(resize())
1414

15-
// solution for windows getting off size
16-
React.useEffect(()=>{
17-
setDimensions(resize())
18-
},[window.innerHeight,window.innerWidth])
15+
// solution for windows getting off size
16+
React.useEffect(()=>{
17+
setDimensions(resize())
18+
},[window.innerHeight,window.innerWidth])
1919

20-
conststyles={
21-
page:{
22-
display:'flex'as'flex',
23-
margin:0,
24-
backgroundColor:'white',
25-
},
26-
}
20+
conststyles={
21+
page:{
22+
display:'flex'as'flex',
23+
margin:0,
24+
backgroundColor:'white',
25+
},
26+
}
2727

28-
return<divstyle={{ ...styles.page, ...dimensions}}>{children}</div>
28+
return<divstyle={{ ...styles.page, ...dimensions}}>{children}</div>
2929
}
3030

3131
exportdefaultWorkspace

‎web-app/src/containers/Tutorial/LevelPage/Level.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const Level = ({ level, onContinue, onLoadSolution, processes }: Props) => {
104104
</div>
105105
)}
106106

107-
{processes.length&&(
107+
{processes.length>0&&(
108108
<divstyle={styles.processes}>
109109
<ProcessEventsprocesses={processes}/>
110110
</div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp