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

UI/settings#518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 2 commits intomasterfromui/settings
Oct 31, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsweb-app/src/containers/Tutorial/components/Reset.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,7 @@ const Reset = (props: Props) => {
disabled={props.disabled}
warning={props.warning}
style={props.style}
htmlType="reset"
>
Reset
</Button>
Expand Down
16 changes: 2 additions & 14 deletionsweb-app/src/containers/Tutorial/components/SideMenu.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,8 +25,8 @@ const styles = {
interfaceProps{
visible:boolean
toggleVisible(visible:boolean):void
page:'about'|'level'|'review'|'settings'
setPage(page:'about'|'level'|'review'|'settings'):void
page:'level'|'review'|'settings'
setPage(page:'level'|'review'|'settings'):void
}

constSideMenu=(props:Props)=>{
Expand DownExpand Up@@ -69,18 +69,6 @@ const SideMenu = (props: Props) => {
<spanstyle={styles.itemText}>Review</span>
</Item>
<Dividerkey="divider"/>
<Item
key="about"
disabled={props.page==='about'}
style={props.page==='about' ?styles.active(theme) :{}}
onClick={()=>{
onMenuClose()
props.setPage('about')
}}
>
<Icontype="prompt"size="xs"color="#EBEBEB"/>
<spanstyle={styles.itemText}>About</span>
</Item>
<Item
key="settings"
disabled={props.page==='settings'}
Expand Down
2 changes: 1 addition & 1 deletionweb-app/src/containers/Tutorial/containers/Review.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@ const styles = {
backgroundColor: theme['$color-fill1-2'],
fontSize: '1rem',
lineHeight: '1rem',
padding: '10px 0.4rem',
padding: '10px 0.4rem 10px 1rem',
}),
title: {
marginLeft: '0.5rem',
Expand Down
67 changes: 36 additions & 31 deletionsweb-app/src/containers/Tutorial/containers/Settings.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
importButton from 'components/Button'
importReact, { useState, useEffect} from 'react'
importReact from 'react'
import{ Card} from '@alifd/next'
import { Theme } from '../../../styles/theme'
import Reset from '../components/Reset'

import * as T from 'typings'

const styles = {
flexColumn: {
display: 'flex' as 'flex',
Expand All@@ -24,24 +22,14 @@ const styles = {
backgroundColor: theme['$color-fill1-2'],
fontSize: '1rem',
lineHeight: '1rem',
padding: '10px 0.4rem',
padding: '10px 0.4rem 10px 1rem',
marginBottom: '0.5rem',
}),
content: {
padding: '0.5rem',
},
menu: {},
menuItem: {
display: 'flex' as 'flex',
border: '1px solid rgb(173, 173, 173)',
borderRadius: '5px',
padding: '0.5rem',
},
menuItemHeader: {
fontWeight: 'bold' as 'bold',
},
menuItemContent: {},
menuItemButton: {
marginLeft: 'auto' as 'auto',
flexDirection: 'column' as 'column',
gap: '1rem',
},
}

Expand All@@ -56,20 +44,37 @@ const SettingsPage = (props: Props) => {
<div>Settings</div>
</div>
<div css={styles.content}>
<div css={styles.menu}>
<div css={styles.menuItem}>
<div css={styles.flexColumn}>
<div css={styles.menuItemHeader}>Reset Tutorial</div>
<div css={styles.menuItemContent}>
This will reset the whole tutorial and change the source files back to the first level and first task
checkpoint. This will reset the whole tutorial and change the source files back to the first level and
first task checkpoint. This will reset the whole tutorial and change the source files back to the first
level and first task checkpoint.
</div>
<Card free>
<Card.Header title="About" />
<Card.Divider />
<Card.Content>
<div>
CodeRoad is an open source VSCode extension that allows you to <strong>create</strong> and{' '}
<strong>play</strong> interactive coding tutorials inside VSCode.
</div>
<Reset style={styles.menuItemButton} warning onReset={props.onReset} />
</div>
</div>
</Card.Content>
<Card.Divider />
<Card.Actions>
<a href="https://github.com/coderoad/coderoad-vscode">GitHub</a>
<a href="mailto:coderoadapp@gmail.com" style={{ marginLeft: '0.5rem' }}>
Email
</a>
</Card.Actions>
</Card>
<Card free>
<Card.Header title="Reset Tutorial" />
<Card.Divider />
<Card.Content>
This will reset the whole tutorial and change the source files back to the first level and first task
checkpoint. This will reset the whole tutorial and change the source files back to the first level and first
task checkpoint. This will reset the whole tutorial and change the source files back to the first level and
first task checkpoint.
</Card.Content>
<Card.Divider />
<Card.Actions>
<Reset warning onReset={props.onReset} />
</Card.Actions>
</Card>
</div>
</div>
)
Expand Down
5 changes: 1 addition & 4 deletionsweb-app/src/containers/Tutorial/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@ import * as selectors from '../../services/selectors'
import SideMenu from './components/SideMenu'
import Level from './components/Level'
import Icon from '../../components/Icon'
import AboutPage from './containers/About'
import ReviewPage from './containers/Review'
import Button from '../../components/Button'
import ProcessMessages from '../../components/ProcessMessages'
Expand DownExpand Up@@ -126,7 +125,7 @@ const TutorialPage = (props: PageProps) => {

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

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

const onSettingsReset = () => {
//Reset to first level first step
Expand DownExpand Up@@ -159,8 +158,6 @@ const TutorialPage = (props: PageProps) => {
<span css={styles.title}>{tutorial.summary.title}</span>
</div>

{page === 'about' && <AboutPage />}

{page === 'level' && (
<ScrollContent item={level.id}>
<Level level={level} />
Expand Down
10 changes: 0 additions & 10 deletionsweb-app/stories/About.stories.tsx
View file
Open in desktop

This file was deleted.


[8]ページ先頭

©2009-2025 Movatter.jp