Skip to content

Commit

Permalink
1st Prod build, Wget and Soundcloud-dl fully integrated and working
Browse files Browse the repository at this point in the history
Created the redux settings for wget and global settings such as server_ip and port that liquid_dl is running on. Made WgetForm reactive to it different status changes.

Signed-off-by: Kthulu120 <[email protected]>
  • Loading branch information
Kthulu120 authored and Kthulu120 committed Sep 5, 2017
1 parent f769edc commit 82fdaae
Show file tree
Hide file tree
Showing 48 changed files with 544 additions and 401 deletions.
61 changes: 61 additions & 0 deletions assets/distro/newest_prod_build.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions assets/js/App.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// this component will be rendered by our <___Router>
import React from 'react';
import React from "react";
import Main from "./Components/Main";
import Header from "./Components/Header";
import '../css/materialize.css'
import '../css/main.css'


import "../css/materialize.css";
import "../css/main.css";


const App = () => (
Expand Down
64 changes: 0 additions & 64 deletions assets/js/Components/Api.js

This file was deleted.

3 changes: 1 addition & 2 deletions assets/js/Components/AppContainers/FfmpegConverter/FF.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import React from "react";
import FfmpegForm from "./FfmpegForm";
const FF = ({ffmpeg, fileFormats, inputFormat, inputFormatCategory, conversionOptions, onChangeValue, onChangeInputFormat, onChangeOutputFormat}) =>
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/**
* Created by Troy on 7/15/2017.
*/
import {connect} from 'react-redux'
import {connect} from "react-redux";
import FfmpegForm from "./FfmpegForm";
import {FFMPEGExportList} from "./FfmpegValidation";
import {
updateFileStructure, updateInputCat, updateInputFormat, updateOutputCat,
updateOutputFormat, updateInputPath, updateDeleteOldFiles
updateDeleteOldFiles,
updateFileStructure,
updateInputCat,
updateInputFormat,
updateInputPath,
updateOutputCat,
updateOutputFormat
} from "../../../actions/ffmpeg/ffmpeg";


Expand Down
11 changes: 4 additions & 7 deletions assets/js/Components/AppContainers/FfmpegConverter/FfmpegForm.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/**
* Created by Troy on 8/12/2017.
*/
import React, {Component} from 'react'
import {Row, Input, Card, Col, Button} from 'react-materialize'
import 'react-select/dist/react-select.css';
import {FFMPEGSubmisison} from './FfmpegValidation'
import React from "react";
import {Button, Input} from "react-materialize";
import "react-select/dist/react-select.css";
import {FFMPEGSubmisison} from "./FfmpegValidation";


const FfmpegForm = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
/**
* Created by Troy on 8/13/2017.
*/
import React from 'react';
import store from '../../../store/globalstore'
import {addNotification as notify} from 'reapop';
import {ErrorNotificationFactory, SucessNotificationFactory} from '../../../utility/NotificationFactories'
import $ from 'jquery'
import {getOS} from '../../../utility/util'
import React from "react";
import store from "../../../store/globalstore";
import {addNotification as notify} from "reapop";
import {ErrorNotificationFactory, SucessNotificationFactory} from "../../../utility/NotificationFactories";
import $ from "jquery";
import {getOS} from "../../../utility/util";


const getValidFormatTypes = (formatType) => {
Expand Down Expand Up @@ -37,7 +34,7 @@ export const FFMPEGExportList = (list, formatChoice) => {

const validateFFMPEG = (state) => {
console.log(((state.ffmpeg.inputFormat || state.ffmpeg.input_path) === ('' || '/')));
if ((['','/'].indexOf(state.ffmpeg.input_path) > -1)) {
if ((['', '/'].indexOf(state.ffmpeg.input_path) > -1)) {
ErrorNotificationFactory("Can't use root ( aka '/' ) or empty string as input path");
throw new EvalError("Can't use root ( aka '/' ) or empty string as input path")
}
Expand Down
20 changes: 7 additions & 13 deletions assets/js/Components/AppContainers/Home/HomeComponent.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/**
* Created by Troy on 8/12/2017.
*/
import React from 'react'
import {
Row, Input, Card, Col, Button, CollectionItem, Collapsible, CollapsibleItem,
Collection
} from 'react-materialize'
import {NavLink} from "react-router-dom";
import {QuestionAndAnswers} from '../../../utility/QuestionsAndAnswers'
import React from "react";
import {Button, Collapsible, CollapsibleItem, Collection, CollectionItem, Input, Row} from "react-materialize";
import {QuestionAndAnswers} from "../../../utility/QuestionsAndAnswers";

const HomeComponent = ({server_os, server_port, server_ip, updateOperatingSystem, updateServerPort, updateServerIP}) =>
(
Expand All @@ -16,9 +9,10 @@ const HomeComponent = ({server_os, server_port, server_ip, updateOperatingSystem
<div className="row">
<div className="col-md-6">
<Collection>
<CollectionItem><NavLink to='/help'>Tips and Help</NavLink></CollectionItem>
<CollectionItem>Star On GitHub</CollectionItem>
<CollectionItem>Suggest Features (I'll get back to you in a day or two)</CollectionItem>
<CollectionItem><a target="_blank" href="https://github.com/Kthulu120/liquid_dl/">Star On
GitHub</a></CollectionItem>
<CollectionItem><a target="_blank" href="https://github.com/Kthulu120/liquid_dl/issues">Suggest
Features (I'll get back to you in a day or two)</a></CollectionItem>
</Collection>
</div>
<div className="col-md-6">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/**
* Created by Troy on 8/12/2017.
*/
import React, {Component} from 'react'
import {Row, Input, Card, Col, Button} from 'react-materialize'
import Select from 'react-select';
import CreatableDemo from './CreateableDemo';
import 'react-select/dist/react-select.css';
import React from "react";
import CreatableDemo from "./CreateableDemo";
import "react-select/dist/react-select.css";

const ImgurScraperForm = ({imgurscraper, onChangeValue}) =>
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
/**
* Created by Troy on 9/2/2017.
*/
import React from 'react';
import store from '../../../store/globalstore'
import {addNotification as notify} from 'reapop';
import {ErrorNotificationFactory, SucessNotificationFactory} from '../../../utility/NotificationFactories'
import $ from 'jquery'
import {getOS} from '../../../utility/util'
import React from "react";
import store from "../../../store/globalstore";
import {ErrorNotificationFactory, SucessNotificationFactory} from "../../../utility/NotificationFactories";
import $ from "jquery";
import {getOS} from "../../../utility/util";


const testUrlPath = (url) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/**
* Created by Troy on 7/15/2017.
*/
import {connect} from 'react-redux'
import {connect} from "react-redux";
import SoundcloudForm from "./SoundcloudForm";
import {updateConfigOptions, updateDownloadOption, updateLinkPath, updateOutputPath} from "../../../actions/soundcloud/soundcloud";
import {
updateConfigOptions,
updateDownloadOption,
updateLinkPath,
updateOutputPath
} from "../../../actions/soundcloud/soundcloud";


const mapStateToProps = state => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/**
* Created by Troy on 8/12/2017.
*/
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {Row, Input, Card, Col, Button} from 'react-materialize'
import React from "react";
import {Button, Card, Col, Input, Row} from "react-materialize";
import {SoundcloudSubmission} from "./SoundCloudValidation";

const SoundcloudForm = ({soundcloud, updateDownloadOption, updateConfigurationOptions, updateLinkPath, updateOutputPath}) =>
Expand Down
44 changes: 44 additions & 0 deletions assets/js/Components/AppContainers/Wget/AcceptValueForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from "react";
import createClass from "create-react-class";
import Select from "react-select";
import {makeValueArray} from "./WgetFormValidation";

const AcceptValueForm = createClass({
displayName: 'AcceptValueForm',
getInitialState () {
return {
multi: true,
multiValue: [],
options: [],
value: undefined
};
},

handleOnChange (value) {
const {multi} = this.state;
if (multi) {
this.setState({multiValue: value});
} else {
this.setState({value});
}
this.props.onChangeValue(makeValueArray(value))
},

render () {
const {multi, multiValue, options, value} = this.state;
return (
<div className="section">
<p className="section-heading">{this.props.label}</p>
<Select.Creatable
multi={multi}
options={options}
onChange={this.handleOnChange}
value={multi ? multiValue : value}
/>

</div>
);
}
});

export default AcceptValueForm
42 changes: 42 additions & 0 deletions assets/js/Components/AppContainers/Wget/RejectValueForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from "react";
import createClass from "create-react-class";
import Select from "react-select";
import {makeValueArray} from "./WgetFormValidation";

const RejectValueForm = createClass({
displayName: 'RejectValueForm',
getInitialState () {
return {
multi: true,
multiValue: [],
options: [],
value: undefined
};
},
handleOnChange (value) {
const {multi} = this.state;
if (multi) {
this.setState({multiValue: value});
} else {
this.setState({value});
}
this.props.onChangeValue(makeValueArray(value))
},
render () {
const {multi, multiValue, options, value} = this.state;
return (
<div className="section">
<p className="section-heading">{this.props.label}</p>
<Select.Creatable
multi={multi}
options={options}
onChange={this.handleOnChange}
value={multi ? multiValue : value}
/>

</div>
);
}
});

export default RejectValueForm
23 changes: 18 additions & 5 deletions assets/js/Components/AppContainers/Wget/WgetContainer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/**
* Created by Troy on 7/15/2017.
*/
import {connect} from 'react-redux'
import {connect} from "react-redux";
import WgetForm from "./WgetForm";
import {updateWgetDownloadOption, updateWgetLinkPath, updateWgetOutputPath} from "../../../actions/wget/wget";
import {
updateWgetAcceptValues,
updateWgetDepthLevel,
updateWgetDownloadOption,
updateWgetLinkPath,
updateWgetOutputPath,
updateWgetRejectValues
} from "../../../actions/wget/wget";


const mapStateToProps = state => {
Expand All @@ -23,6 +27,15 @@ const mapDispatchToProps = dispatch => {
},
updateWgetDownloadOption: (download_option) => {
dispatch(updateWgetDownloadOption(download_option))
},
updateWgetDepthLevel: (value) => {
dispatch(updateWgetDepthLevel(value))
},
updateWgetRejectValues: (value) => {
dispatch(updateWgetRejectValues(value))
},
updateWgetAcceptValues: (value) => {
dispatch(updateWgetAcceptValues(value))
}
}
};
Expand Down
Loading

0 comments on commit 82fdaae

Please sign in to comment.