Merge pull request #229 from lbryio/redesign-polish
Fixed handling of case where incorrect claim name is given
This commit is contained in:
commit
033fff923c
9 changed files with 6 additions and 4 deletions
|
@ -12,6 +12,7 @@ const NO_CHANNEL = 'NO_CHANNEL';
|
|||
const NO_CLAIM = 'NO_CLAIM';
|
||||
|
||||
function checkForLocalAssetByClaimId (claimId, name) {
|
||||
logger.debug(`checkForLocalAssetsByClaimId(${claimId}, ${name}`);
|
||||
return new Promise((resolve, reject) => {
|
||||
db.File
|
||||
.findOne({where: { name, claimId }})
|
||||
|
@ -69,7 +70,8 @@ function getAssetByLongClaimId (fullClaimId, name) {
|
|||
logger.debug('resolve result >> ', resolveResult);
|
||||
// if no result, return early (claim doesn't exist or isn't free)
|
||||
if (!resolveResult) {
|
||||
return resolve(null);
|
||||
resolve(NO_CLAIM);
|
||||
return;
|
||||
}
|
||||
let fileRecord = {};
|
||||
// get the claim
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
Binary file not shown.
Before Width: | Height: | Size: 184 B |
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB |
|
@ -35,7 +35,7 @@ function previewAndStageFile(selectedFile){
|
|||
thumbnailSelectionInput.value = '';
|
||||
thumbnailSelectionTool.hidden = true;
|
||||
} else {
|
||||
assetPreview.innerHTML = `<img id="asset-preview" src="/assets/img/black_video_play.jpg"/>`;
|
||||
assetPreview.innerHTML = `<img id="asset-preview" src="/assets/img/video_thumb_default.png"/>`;
|
||||
// clear & show the thumbnail selection input
|
||||
thumbnailSelectionInput.value = '';
|
||||
thumbnailSelectionTool.hidden = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="row">
|
||||
<div class="row row--padded">
|
||||
<h3>No Channel</h3>
|
||||
<p>There are no published channels matching your url</p>
|
||||
<p>If you think this message is an error, contact us in the <a class="link--primary" href="https://discord.gg/YjYbwhS" target="_blank">LBRY Discord!</a></p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="row">
|
||||
<div class="row row--padded">
|
||||
<h3>No Claims</h3>
|
||||
<p>There are no free assets at that claim. You should publish one at <a class="link--primary" href="/">spee.ch</a>.</p>
|
||||
<p>NOTE: it is possible your claim was published, but it is still being processed by the blockchain</p>
|
||||
|
|
Loading…
Reference in a new issue