From d2cb17038b8537a609be06be2ed7013dbe27117e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 8 Mar 2021 22:11:55 +0100 Subject: beginning the BIG refactor. moving editor stuff into per-episode hierarchy --- .../app/views/media/components/media.formFile.js | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 animism-align/frontend/app/views/media/components/media.formFile.js (limited to 'animism-align/frontend/app/views/media/components/media.formFile.js') diff --git a/animism-align/frontend/app/views/media/components/media.formFile.js b/animism-align/frontend/app/views/media/components/media.formFile.js deleted file mode 100644 index d3b1ae8..0000000 --- a/animism-align/frontend/app/views/media/components/media.formFile.js +++ /dev/null @@ -1,67 +0,0 @@ -import React, { Component } from 'react' -import { Link } from 'react-router-dom' - -import { session } from 'app/session' -import actions from 'app/actions' -import { capitalize } from 'app/utils' - -import { TextInput, LabelDescription, Select, TextArea, Checkbox, SubmitButton, Loader, FileInputField } from 'app/common' - -export default class MediaFileForm extends Component { - state = { - img: null, - } - - constructor(props) { - super(props) - this.handleSelect = this.handleSelect.bind(this) - this.handleChange = this.handleChange.bind(this) - this.handleSettingsChange = this.handleSettingsChange.bind(this) - this.handleUpload = this.handleUpload.bind(this) - } - - handleChange(e) { - const { name, value } = e.target - this.handleSelect(name, value) - } - - handleSelect(name, value) { - this.props.onSelect(name, value) - } - - handleSettingsChange(name, value) { - this.props.onSettingsChange(name, value) - } - - handleUpload(file) { - console.log('uploading file') - const uploadData = { - image: file, - tag: "file", - username: 'animism', - } - // uploadData['__image_filename'] = file.filename - return actions.upload.upload(uploadData).then(data => { - this.handleSettingsChange("file", data.res) - }) - } - - render() { - const { data } = this.props - console.log(data.settings) - return ( -
- - {data.settings.file && - - {data.settings.file.url} - - } -
- ) - } -} -- cgit v1.2.3-70-g09d2