This repository has been archived by the owner on Mar 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
239 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import { setCoffeeScriptVersion } from '../../../actions/settings' | ||
import Selector from '../Selector' | ||
import { getAllVersions as getAllCoffeeScriptVersions } from '../../../coffeescript' | ||
|
||
const CoffeeScriptVersionSetting = ({ dispatch, version }) => { | ||
export default function ({ version, onChange }) { | ||
return ( | ||
<div className='Settings__setting'> | ||
<label className='Setting__label'>CoffeeScript Version</label> | ||
<select className='Setting__selector' value={version} onChange={e => { | ||
dispatch(setCoffeeScriptVersion(e.target.value)) | ||
}}> | ||
{getAllCoffeeScriptVersions().map(v => { | ||
return <option value={v} key={v}>{v}</option> | ||
})} | ||
</select> | ||
</div> | ||
<Selector | ||
label='CoffeeScript Version' | ||
initialValue={version} | ||
onChange={onChange} | ||
options={getAllCoffeeScriptVersions()} | ||
/> | ||
) | ||
} | ||
|
||
export default connect()(CoffeeScriptVersionSetting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import { setEditorTheme } from '../../../actions/settings' | ||
import Selector from '../Selector' | ||
import { getAllThemes as getAllEditorThemes } from '../../../editor' | ||
|
||
const EditorThemeSetting = ({ dispatch, theme }) => { | ||
export default function ({ theme, onChange }) { | ||
return ( | ||
<div className='Settings__setting'> | ||
<label className='Setting__label'>Editor Theme</label> | ||
<select className='Setting__selector' value={theme} onChange={e => { | ||
dispatch(setEditorTheme(e.target.value)) | ||
}}> | ||
{getAllEditorThemes().map(v => { | ||
return <option value={v} key={v}>{v}</option> | ||
})} | ||
</select> | ||
</div> | ||
<Selector | ||
label='Editor Theme' | ||
initialValue={theme} | ||
onChange={onChange} | ||
options={getAllEditorThemes()} | ||
/> | ||
) | ||
} | ||
|
||
export default connect()(EditorThemeSetting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import { setOutputTheme } from '../../../actions/settings' | ||
import Selector from '../Selector' | ||
import { getAllThemes as getAllEditorThemes } from '../../../editor' | ||
|
||
const OutputThemeSetting = ({ dispatch, theme }) => { | ||
export default function ({ theme, onChange }) { | ||
return ( | ||
<div className='Settings__setting'> | ||
<label className='Setting__label'>Output Theme</label> | ||
<select className='Setting__selector' value={theme} onChange={e => { | ||
dispatch(setOutputTheme(e.target.value)) | ||
}}> | ||
{getAllEditorThemes().map(v => { | ||
return <option value={v} key={v}>{v}</option> | ||
})} | ||
</select> | ||
</div> | ||
<Selector | ||
label='Output Theme' | ||
initialValue={theme} | ||
onChange={onChange} | ||
options={getAllEditorThemes()} | ||
/> | ||
) | ||
} | ||
|
||
export default connect()(OutputThemeSetting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
|
||
export default function ({ label, initialValue, options, onChange }) { | ||
return ( | ||
<div className='Settings__setting'> | ||
<label className='Setting__label'>{label}</label> | ||
<select className='Setting__selector' value={initialValue} onChange={onChange}> | ||
{options.map(v => { | ||
return <option value={v} key={v}>{v}</option> | ||
})} | ||
</select> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import SplitPane from 'react-split-pane' | ||
import Editor from '../Editor' | ||
import Status from '../../components/Status' | ||
import Output from '../../components/Output' | ||
import Settings from '../Settings' | ||
|
||
import './styles.css' | ||
|
||
const App = ({ outputTheme, output, status }) => { | ||
return ( | ||
<div className='App'> | ||
<div className='App__Settings'> | ||
<Settings /> | ||
</div> | ||
<div className='App__EditorOutput'> | ||
<SplitPane split='vertical' minSize={100} maxSize={-100} defaultSize='50%'> | ||
<Editor /> | ||
<Output theme={outputTheme}>{output}</Output> | ||
</SplitPane> | ||
</div> | ||
<div className='App__Status'> | ||
<Status status={status} /> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
outputTheme: state.app.outputTheme, | ||
output: state.app.output, | ||
status: state.app.status | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps)(App) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import { setCoffeeScriptVersion, setEditorTheme, setOutputTheme } from '../../actions/settings' | ||
import CoffeeScriptVersion from '../../components/Setting/CoffeeScriptVersion' | ||
import EditorTheme from '../../components/Setting/EditorTheme' | ||
import OutputTheme from '../../components/Setting/OutputTheme' | ||
|
||
import './styles.css' | ||
import '../../components/Setting/styles.css' | ||
|
||
export default function ({ coffeeScriptVersion, editorTheme, outputTheme }) { | ||
const Settings = ({ dispatch, coffeeScriptVersion, editorTheme, outputTheme }) => { | ||
return ( | ||
<div className='Settings'> | ||
<OutputTheme theme={outputTheme} /> | ||
<EditorTheme theme={editorTheme} /> | ||
<CoffeeScriptVersion version={coffeeScriptVersion} /> | ||
<OutputTheme theme={outputTheme} onChange={e => { | ||
dispatch(setOutputTheme(e.target.value)) | ||
}} /> | ||
<EditorTheme theme={editorTheme} onChange={e => { | ||
dispatch(setEditorTheme(e.target.value)) | ||
}} /> | ||
<CoffeeScriptVersion version={coffeeScriptVersion} onChange={e => { | ||
dispatch(setCoffeeScriptVersion(e.target.value)) | ||
}} /> | ||
</div> | ||
) | ||
} | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
coffeeScriptVersion: state.app.coffeeScriptVersion, | ||
editorTheme: state.app.editorTheme, | ||
outputTheme: state.app.outputTheme | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps)(Settings) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
body { | ||
font-size: 14px; | ||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | ||
} | ||
|
||
.CodeMirror { | ||
font-size: 15px; | ||
font-family: 'Source Code Pro', monospace; | ||
} | ||
|
||
*, *:before, *:after { | ||
position: relative; | ||
} |
Oops, something went wrong.