diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-16 16:38:07 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-16 16:38:07 +0100 |
| commit | a9d86650f40a82a64d1fd8e0525c26422d314d3a (patch) | |
| tree | 6afbd4a520f557b377096e6bb8a0838c0b725f7e /frontend/app/views/graph/components/page.form.js | |
| parent | 6e18c6e4ef6344f92fed99dad9c83484487c32d7 (diff) | |
make uploads like animism. start audio stuff
Diffstat (limited to 'frontend/app/views/graph/components/page.form.js')
| -rw-r--r-- | frontend/app/views/graph/components/page.form.js | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/frontend/app/views/graph/components/page.form.js b/frontend/app/views/graph/components/page.form.js index 8fc00b0..2c283aa 100644 --- a/frontend/app/views/graph/components/page.form.js +++ b/frontend/app/views/graph/components/page.form.js @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom' import { session } from 'app/session' -import { TextInput, ColorInput, LabelDescription, TextArea, Checkbox, SubmitButton, Loader } from 'app/common' +import { TextInput, ColorInput, Checkbox, LabelDescription, TextArea, SubmitButton, Loader } from 'app/common' const newPage = (data) => ({ path: '', @@ -14,6 +14,8 @@ const newPage = (data) => ({ x: 0.05, y: 0.05, background_color: '#000000', + audio: "", + restartAudio: false, }, ...data, }) @@ -76,6 +78,10 @@ export default class PageForm extends Component { handleSettingsChange(e) { const { name, value } = e.target + this.handleSettingsSelect(name, value) + } + + handleSettingsSelect(name, value) { this.setState({ data: { ...this.state.data, @@ -147,7 +153,7 @@ export default class PageForm extends Component { autoComplete="off" /> <ColorInput - title='BG' + title='BG Color' name='background_color' data={data.settings} onChange={this.handleSettingsChange.bind(this)} @@ -159,6 +165,23 @@ export default class PageForm extends Component { data={data} onChange={this.handleChange.bind(this)} /> + + <TextInput + title="Background Audio URL" + name="audio" + required + data={data.settings} + onChange={this.handleSettingsChange.bind(this)} + autoComplete="off" + /> + <Checkbox + label="Restart audio on load" + name="restartAudio" + checked={data.settings.restartAudio} + onChange={this.handleSettingsSelect.bind(this)} + autoComplete="off" + /> + <div className='row buttons'> <SubmitButton title={submitTitle} |
