fixed the get asset loop
This commit is contained in:
parent
9c753a405c
commit
a98d541450
2 changed files with 14 additions and 8 deletions
|
@ -40,6 +40,10 @@
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#showlite-body #asset-status {
|
||||||
|
padding: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div id="asset-display-component">
|
<div id="asset-display-component">
|
||||||
<div id="asset-status">
|
<div id="asset-status">
|
||||||
<p id="searching-message" hidden="true">We're currently combing the blockchain for your asset!</p>
|
<p id="searching-message" hidden="true">Sit tight, we're combing the LBRY blockchain for your asset!</p>
|
||||||
<p id="in-progress-message" hidden="true"></p>
|
<p id="in-progress-message" hidden="true">Hooray! We found peers with copies of your asset and we are downloading it from the blockchain now.</p>
|
||||||
<div id="failure-message" hidden="true">
|
<div id="failure-message" hidden="true">
|
||||||
<p>Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the <a class="link--primary" href="https://discord.gg/YjYbwhS" target="_blank">LBRY discord</a>.</p>
|
<p>Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the <a class="link--primary" href="https://discord.gg/YjYbwhS" target="_blank">LBRY discord</a>.</p>
|
||||||
<i><p id="error-message"></p></i>
|
<i><p id="error-message"></p></i>
|
||||||
|
@ -13,7 +13,10 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{> image}}
|
{{> image}}
|
||||||
{{/ifConditional}}
|
{{/ifConditional}}
|
||||||
<a id="asset-boilerpate" class="link--primary fine-print" href="/{{claimInfo.claimId}}/{{claimInfo.name}}">hosted via Spee<h</a>
|
<div>
|
||||||
|
<a id="asset-boilerpate" class="link--primary fine-print" href="/{{claimInfo.claimId}}/{{claimInfo.name}}">hosted via Spee<h</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -54,12 +57,11 @@
|
||||||
const searchMessage = document.getElementById('searching-message');
|
const searchMessage = document.getElementById('searching-message');
|
||||||
searchMessage.hidden = false;
|
searchMessage.hidden = false;
|
||||||
},
|
},
|
||||||
showInProgressMessage: function (msg) {
|
showInProgressMessage: function () {
|
||||||
const searchMessage = document.getElementById('searching-message');
|
const searchMessage = document.getElementById('searching-message');
|
||||||
const inProgressMessage = document.getElementById('in-progress-message');
|
const inProgressMessage = document.getElementById('in-progress-message');
|
||||||
searchMessage.hidden = true;
|
searchMessage.hidden = true;
|
||||||
inProgressMessage.hidden = false;
|
inProgressMessage.hidden = false;
|
||||||
inProgressMessage.innerText = msg;
|
|
||||||
},
|
},
|
||||||
showFailureMessage: function (msg) {
|
showFailureMessage: function (msg) {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
|
@ -113,9 +115,9 @@
|
||||||
console.log('lbrynet has finished downloading the asset');
|
console.log('lbrynet has finished downloading the asset');
|
||||||
that.showAsset();
|
that.showAsset();
|
||||||
} else {
|
} else {
|
||||||
console.log('lbrynet is still downloading the asset');
|
console.log('lbrynet has not finished downloading the asset');
|
||||||
that.showInProgressMessage(response.message);
|
that.showInProgressMessage();
|
||||||
setTimeout(that.getAsset, 5000);
|
setTimeout(that.getAsset.bind(that, claimName, claimId), 5000);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('get failed:', response);
|
console.log('get failed:', response);
|
||||||
|
|
Loading…
Reference in a new issue