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

Commitce2534c

Browse files
authored
Merge pull request#518 from coderoad/ui/settings
UI/settings
2 parents268cd26 +25fb150 commitce2534c

File tree

6 files changed

+41
-60
lines changed

6 files changed

+41
-60
lines changed

‎web-app/src/containers/Tutorial/components/Reset.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const Reset = (props: Props) => {
3333
disabled={props.disabled}
3434
warning={props.warning}
3535
style={props.style}
36+
htmlType="reset"
3637
>
3738
Reset
3839
</Button>

‎web-app/src/containers/Tutorial/components/SideMenu.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const styles = {
2525
interfaceProps{
2626
visible:boolean
2727
toggleVisible(visible:boolean):void
28-
page:'about'|'level'|'review'|'settings'
29-
setPage(page:'about'|'level'|'review'|'settings'):void
28+
page:'level'|'review'|'settings'
29+
setPage(page:'level'|'review'|'settings'):void
3030
}
3131

3232
constSideMenu=(props:Props)=>{
@@ -69,18 +69,6 @@ const SideMenu = (props: Props) => {
6969
<spanstyle={styles.itemText}>Review</span>
7070
</Item>
7171
<Dividerkey="divider"/>
72-
<Item
73-
key="about"
74-
disabled={props.page==='about'}
75-
style={props.page==='about' ?styles.active(theme) :{}}
76-
onClick={()=>{
77-
onMenuClose()
78-
props.setPage('about')
79-
}}
80-
>
81-
<Icontype="prompt"size="xs"color="#EBEBEB"/>
82-
<spanstyle={styles.itemText}>About</span>
83-
</Item>
8472
<Item
8573
key="settings"
8674
disabled={props.page==='settings'}

‎web-app/src/containers/Tutorial/containers/Review.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const styles = {
2828
backgroundColor:theme['$color-fill1-2'],
2929
fontSize:'1rem',
3030
lineHeight:'1rem',
31-
padding:'10px 0.4rem',
31+
padding:'10px 0.4rem 10px 1rem',
3232
}),
3333
title:{
3434
marginLeft:'0.5rem',

‎web-app/src/containers/Tutorial/containers/Settings.tsx

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
importButtonfrom'components/Button'
2-
importReact,{useState,useEffect}from'react'
1+
importReactfrom'react'
2+
import{Card}from'@alifd/next'
33
import{Theme}from'../../../styles/theme'
44
importResetfrom'../components/Reset'
55

6-
import*asTfrom'typings'
7-
86
conststyles={
97
flexColumn:{
108
display:'flex'as'flex',
@@ -24,24 +22,14 @@ const styles = {
2422
backgroundColor:theme['$color-fill1-2'],
2523
fontSize:'1rem',
2624
lineHeight:'1rem',
27-
padding:'10px 0.4rem',
25+
padding:'10px 0.4rem 10px 1rem',
26+
marginBottom:'0.5rem',
2827
}),
2928
content:{
3029
padding:'0.5rem',
31-
},
32-
menu:{},
33-
menuItem:{
3430
display:'flex'as'flex',
35-
border:'1px solid rgb(173, 173, 173)',
36-
borderRadius:'5px',
37-
padding:'0.5rem',
38-
},
39-
menuItemHeader:{
40-
fontWeight:'bold'as'bold',
41-
},
42-
menuItemContent:{},
43-
menuItemButton:{
44-
marginLeft:'auto'as'auto',
31+
flexDirection:'column'as'column',
32+
gap:'1rem',
4533
},
4634
}
4735

@@ -56,20 +44,37 @@ const SettingsPage = (props: Props) => {
5644
<div>Settings</div>
5745
</div>
5846
<divcss={styles.content}>
59-
<divcss={styles.menu}>
60-
<divcss={styles.menuItem}>
61-
<divcss={styles.flexColumn}>
62-
<divcss={styles.menuItemHeader}>Reset Tutorial</div>
63-
<divcss={styles.menuItemContent}>
64-
This will reset the whole tutorial and change the source files back to the first level and first task
65-
checkpoint. This will reset the whole tutorial and change the source files back to the first level and
66-
first task checkpoint. This will reset the whole tutorial and change the source files back to the first
67-
level and first task checkpoint.
68-
</div>
47+
<Cardfree>
48+
<Card.Headertitle="About"/>
49+
<Card.Divider/>
50+
<Card.Content>
51+
<div>
52+
CodeRoad is an open source VSCode extension that allows you to<strong>create</strong> and{' '}
53+
<strong>play</strong> interactive coding tutorials inside VSCode.
6954
</div>
70-
<Resetstyle={styles.menuItemButton}warningonReset={props.onReset}/>
71-
</div>
72-
</div>
55+
</Card.Content>
56+
<Card.Divider/>
57+
<Card.Actions>
58+
<ahref="https://github.com/coderoad/coderoad-vscode">GitHub</a>
59+
<ahref="mailto:coderoadapp@gmail.com"style={{marginLeft:'0.5rem'}}>
60+
Email
61+
</a>
62+
</Card.Actions>
63+
</Card>
64+
<Cardfree>
65+
<Card.Headertitle="Reset Tutorial"/>
66+
<Card.Divider/>
67+
<Card.Content>
68+
This will reset the whole tutorial and change the source files back to the first level and first task
69+
checkpoint. This will reset the whole tutorial and change the source files back to the first level and first
70+
task checkpoint. This will reset the whole tutorial and change the source files back to the first level and
71+
first task checkpoint.
72+
</Card.Content>
73+
<Card.Divider/>
74+
<Card.Actions>
75+
<ResetwarningonReset={props.onReset}/>
76+
</Card.Actions>
77+
</Card>
7378
</div>
7479
</div>
7580
)

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as selectors from '../../services/selectors'
44
importSideMenufrom'./components/SideMenu'
55
importLevelfrom'./components/Level'
66
importIconfrom'../../components/Icon'
7-
importAboutPagefrom'./containers/About'
87
importReviewPagefrom'./containers/Review'
98
importButtonfrom'../../components/Button'
109
importProcessMessagesfrom'../../components/ProcessMessages'
@@ -126,7 +125,7 @@ const TutorialPage = (props: PageProps) => {
126125

127126
const[menuVisible,setMenuVisible]=React.useState(false)
128127

129-
const[page,setPage]=React.useState<'about'|'level'|'review'|'settings'>('level')
128+
const[page,setPage]=React.useState<'level'|'review'|'settings'>('level')
130129

131130
constonSettingsReset=()=>{
132131
//Reset to first level first step
@@ -159,8 +158,6 @@ const TutorialPage = (props: PageProps) => {
159158
<spancss={styles.title}>{tutorial.summary.title}</span>
160159
</div>
161160

162-
{page==='about'&&<AboutPage/>}
163-
164161
{page==='level'&&(
165162
<ScrollContentitem={level.id}>
166163
<Levellevel={level}/>

‎web-app/stories/About.stories.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp