Adding logic to change torrent storage path

This commit is contained in:
2018-01-25 23:08:10 -05:00
parent f58ca5bb09
commit 6af49b317d
15 changed files with 279 additions and 60 deletions

View File

@@ -87004,7 +87004,8 @@ var addTorrentPopup = function (_React$Component) {
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = addTorrentPopup.__proto__ || Object.getPrototypeOf(addTorrentPopup)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
open: false,
magnetLinkValue: "",
storageValue: ''
storageValue: '',
torrentLabel: ""
}, _this.handleClickOpen = function () {
_this.setState({ open: true });
@@ -87015,7 +87016,8 @@ var addTorrentPopup = function (_React$Component) {
//let magnetLinkSubmit = this.state.textValue;
var magnetLinkMessage = {
messageType: "magnetLinkSubmit",
messageDetail: _this.state.storageValue,
storageValue: _this.state.storageValue,
torrentLabel: _this.state.torrentLabel,
Payload: [_this.state.magnetLinkValue]
};
console.log("Sending magnet link: ", magnetLinkMessage);
@@ -87027,6 +87029,8 @@ var addTorrentPopup = function (_React$Component) {
_this.setState({ magnetLinkValue: event.target.value });
}, _this.setStorageValue = function (event) {
_this.setState({ storageValue: event.target.value });
}, _this.setLabelValue = function (event) {
_this.setState({ torrentLabel: event.target.value });
}, _temp), _possibleConstructorReturn(_this, _ret);
}
@@ -87074,7 +87078,8 @@ var addTorrentPopup = function (_React$Component) {
fullWidth: true,
onChange: this.setMagnetLinkValue
}),
_react2.default.createElement(_TextField2.default, { id: 'storagePath', type: 'text', label: 'Storage Path', placeholder: 'Empty will be default torrent storage path', fullWidth: true, onChange: this.setStorageValue })
_react2.default.createElement(_TextField2.default, { id: 'storagePath', type: 'text', label: 'Storage Path', placeholder: 'Empty will be default torrent storage path', fullWidth: true, onChange: this.setStorageValue }),
_react2.default.createElement(_TextField2.default, { id: 'labelValue', type: 'text', label: 'Label Value', placeholder: 'Empty will be no label', fullWidth: true, onChange: this.setLabelValue })
),
_react2.default.createElement(
_Dialog.DialogActions,
@@ -95273,7 +95278,8 @@ var addTorrentFilePopup = function (_React$Component) {
torrentFileName: "",
torrentFileValue: [],
storageValue: '', //raw string for possible windows filepath
showDrop: true
showDrop: true,
torrentLabel: ""
}, _this.handleClickOpen = function () {
_this.setState({ open: true });
}, _this.handleRequestClose = function () {
@@ -95290,8 +95296,9 @@ var addTorrentFilePopup = function (_React$Component) {
var torrentFileMessage = {
messageType: "torrentFileSubmit",
messageDetail: _this.state.torrentFileName,
messageDetailTwo: _this.state.storageValue,
torrentFileName: _this.state.torrentFileName,
torrentStorageValue: _this.state.storageValue,
torrentLabelValue: _this.state.torrentLabel,
Payload: [base64data]
};
console.log("Sending magnet link: ", torrentFileMessage);
@@ -95303,6 +95310,8 @@ var addTorrentFilePopup = function (_React$Component) {
_this.setState({ showDrop: false });
_this.setState({ torrentFileValue: file });
console.log("File Name", file[0].name);
}, _this.setLabelValue = function (event) {
_this.setState({ torrentLabel: event.target.value });
}, _this.setStorageValue = function (event) {
_this.setState({ storageValue: event.target.value });
}, _temp), _possibleConstructorReturn(_this, _ret);
@@ -95344,7 +95353,8 @@ var addTorrentFilePopup = function (_React$Component) {
'Upload Torrent Here and Add Storage Path'
),
this.state.torrentFileName != "" && this.state.torrentFileName,
_react2.default.createElement(_TextField2.default, { id: 'storagePath', type: 'text', label: 'Storage Path', placeholder: 'Empty will be default torrent storage path', fullWidth: true, onChange: this.setStorageValue })
_react2.default.createElement(_TextField2.default, { id: 'storagePath', type: 'text', label: 'Storage Path', placeholder: 'Empty will be default torrent storage path', fullWidth: true, onChange: this.setStorageValue }),
_react2.default.createElement(_TextField2.default, { id: 'labelValue', type: 'text', label: 'Label Value', placeholder: 'Empty will be no label', fullWidth: true, onChange: this.setLabelValue })
),
_react2.default.createElement(
_Dialog.DialogActions,
@@ -129840,13 +129850,11 @@ var mapStateToProps = function mapStateToProps(state) {
return {
selectionHashes: state.selectionHashes,
fileList: state.fileList
//fileSelectionNames: state.fileSelectionNames,
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
//changeFileSelection: (fileSelection) => dispatch({type: actionTypes.CHANGE_FILE_SELECTION, fileSelection}),
sendSelectionHashes: function sendSelectionHashes(selectionHashes) {
return dispatch({ type: actionTypes.SELECTION_HASHES, selectionHashes: selectionHashes });
}