Seed Support #56
2 changed files with 12 additions and 8 deletions
|
@ -182,7 +182,7 @@ let FileActionsRow = React.createClass({
|
||||||
<Modal isOpen={this.state.modal == 'confirmRemove'} contentLabel="Not enough credits"
|
<Modal isOpen={this.state.modal == 'confirmRemove'} contentLabel="Not enough credits"
|
||||||
type="confirm" confirmButtonLabel="Remove" onConfirmed={this.handleRemoveConfirmed}
|
type="confirm" confirmButtonLabel="Remove" onConfirmed={this.handleRemoveConfirmed}
|
||||||
onAborted={this.closeModal}>
|
onAborted={this.closeModal}>
|
||||||
<p>Are you sure you'd like to remove <cite>{this.props.metadata.title}</cite> from LBRY?</p>
|
<p>Are you sure you'd like to remove <cite>{this.props.metadata ? this.props.metadata.title : this.props.uri}</cite> from LBRY?</p>
|
||||||
|
|
||||||
<label><FormField type="checkbox" checked={this.state.deleteChecked} onClick={this.handleDeleteCheckboxClicked} /> Delete this file from my computer</label>
|
<label><FormField type="checkbox" checked={this.state.deleteChecked} onClick={this.handleDeleteCheckboxClicked} /> Delete this file from my computer</label>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -11,7 +11,12 @@ const menu = remote.require('./menu/main-menu');
|
||||||
* needed to make a dummy claim or file info object.
|
* needed to make a dummy claim or file info object.
|
||||||
*/
|
*/
|
||||||
function savePendingPublish({name, channel_name}) {
|
function savePendingPublish({name, channel_name}) {
|
||||||
const lbryUri = uri.buildLbryUri({name, channel_name}, false);
|
let lbryUri;
|
||||||
|
if (channel_name) {
|
||||||
|
lbryUri = uri.buildLbryUri({name: channel_name, path: name}, false);
|
||||||
|
} else {
|
||||||
|
lbryUri = uri.buildLbryUri({name: name}, false);
|
||||||
|
}
|
||||||
const pendingPublishes = getLocal('pendingPublishes') || [];
|
const pendingPublishes = getLocal('pendingPublishes') || [];
|
||||||
const newPendingPublish = {
|
const newPendingPublish = {
|
||||||
name, channel_name,
|
name, channel_name,
|
||||||
|
@ -61,13 +66,13 @@ function getPendingPublish({name, channel_name, outpoint}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pendingPublishToDummyClaim({channel_name, name, outpoint, claim_id, txid, nout}) {
|
function pendingPublishToDummyClaim({channel_name, name, outpoint, claim_id, txid, nout}) {
|
||||||
return {name, outpoint, claim_id, txid, nout, ... channel_name ? {channel_name} : {}};
|
return {name, outpoint, claim_id, txid, nout, channel_name};
|
||||||
}
|
}
|
||||||
|
|
||||||
function pendingPublishToDummyFileInfo({name, outpoint, claim_id}) {
|
function pendingPublishToDummyFileInfo({name, outpoint, claim_id}) {
|
||||||
return {name, outpoint, claim_id, null};
|
return {name, outpoint, claim_id, metadata: null};
|
||||||
}
|
}
|
||||||
|
window.pptdfi = pendingPublishToDummyFileInfo;
|
||||||
|
|
||||||
let lbry = {
|
let lbry = {
|
||||||
isConnected: false,
|
isConnected: false,
|
||||||
|
@ -316,14 +321,13 @@ lbry.publish = function(params, fileListedCallback, publishedCallback, errorCall
|
||||||
returnedPending = true;
|
returnedPending = true;
|
||||||
|
|
||||||
if (publishedCallback) {
|
if (publishedCallback) {
|
||||||
const {name, channel_name} = params;
|
savePendingPublish({name: params.name, channel_name: params.channel_name});
|
||||||
savePendingPublish({name, ... channel_name ? {channel_name} : {}});
|
|
||||||
publishedCallback(true);
|
publishedCallback(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileListedCallback) {
|
if (fileListedCallback) {
|
||||||
const {name, channel_name} = params;
|
const {name, channel_name} = params;
|
||||||
savePendingPublish({name, ... channel_name ? {channel_name} : {}});
|
savePendingPublish({name: params.name, channel_name: params.channel_name});
|
||||||
fileListedCallback(true);
|
fileListedCallback(true);
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
Loading…
Reference in a new issue