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

Commit526f5c9

Browse files
committed
setup loading component processes
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parente96a2cd commit526f5c9

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

‎web-app/src/Routes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ const Routes = () => {
2525
<Router>
2626
{/* Setup */}
2727
<Routepath={['Setup.Startup','Setup.ValidateSetup']}>
28-
<LoadingPagetext="Launching..."/>
28+
<LoadingPagetext="Launching..."processes={context.processes}/>
2929
</Route>
3030
<Routepath="Setup.Start">
3131
<StartPagesend={send}context={context}/>
3232
</Route>
3333
<Routepath={['Setup.LoadTutorialSummary','Setup.LoadTutorialData','Setup.SetupNewTutorial']}>
34-
<LoadingPagetext="Loading Tutorial..."/>
34+
<LoadingPagetext="Loading Tutorial..."processes={context.processes}/>]
3535
</Route>
3636
<Routepath="Setup.SelectTutorial">
3737
<SelectTutorialPagesend={send}context={context}/>
@@ -41,7 +41,7 @@ const Routes = () => {
4141
</Route>
4242
{/* Tutorial */}
4343
<Routepath={['Tutorial.LoadNext','Tutorial.Level.Load']}>
44-
<LoadingPagetext="Loading Level..."/>
44+
<LoadingPagetext="Loading Level..."processes={context.processes}/>
4545
</Route>
4646
<Routepath="Tutorial.Level">
4747
<LevelSummaryPagesend={send}context={context}/>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { Loading } from '@alifd/next'
22
import*asReactfrom'react'
33

44
interfaceProps{
5-
text:string
5+
message:string
66
}
77

8-
constLoadingComponent=({text}:Props)=>{
9-
return<Loadingtip={text}/>
8+
constLoadingComponent=({message}:Props)=>{
9+
return<Loadingtip={message}/>
1010
}
1111

1212
exportdefaultLoadingComponent

‎web-app/src/containers/Loading/LoadingPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const styles = {
2222
constLoadingPage=({ text}:Props)=>{
2323
return(
2424
<divcss={styles.page}>
25-
<Loadingtext={text}/>
25+
<Loadingmessage={text}/>
2626
</div>
2727
)
2828
}

‎web-app/src/containers/Loading/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import * as React from 'react'
22
import*asTfrom'typings'
33
import{css,jsx}from'@emotion/core'
44
importLoadingfrom'../../components/Loading'
5-
importMessagefrom'../../components/Message'
65

76
interfaceProps{
87
text:string
9-
context?:T.MachineContext
8+
processes?:T.ProcessEvent[]
109
}
1110

1211
conststyles={
@@ -20,7 +19,7 @@ const styles = {
2019
},
2120
}
2221

23-
constLoadingPage=({ text}:Props)=>{
22+
constLoadingPage=({ text, processes}:Props)=>{
2423
const[showLoading,setShowHiding]=React.useState(false)
2524

2625
React.useEffect(()=>{
@@ -38,9 +37,11 @@ const LoadingPage = ({ text }: Props) => {
3837
returnnull
3938
}
4039

40+
constmessage:string=processes&&processes.length ?processes[0].title :text
41+
4142
return(
4243
<divcss={styles.page}>
43-
<Loadingtext={text}/>
44+
<Loadingmessage={message}/>
4445
</div>
4546
)
4647
}

‎web-app/src/containers/SelectTutorial/LoadTutorialSummary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import*asReactfrom'react'
22
importuseFetchfrom'../../services/hooks/useFetch'
33
import*asTTfrom'typings/tutorial'
4-
importLoadingfrom'../Loading'
4+
importLoadingPagefrom'../Loading'
55

66
interfaceProps{
77
url:string
@@ -11,7 +11,7 @@ interface Props {
1111
constLoadTutorialSummary=(props:Props)=>{
1212
const{ data, error, loading}=useFetch<TT.Tutorial>(props.url)
1313
if(loading){
14-
return<Loadingtext="Loading tutorial summary..."/>
14+
return<LoadingPagetext="Loading tutorial summary..."/>
1515
}
1616
if(error){
1717
console.log(`Failed to load tutorial summary:${error}`)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp