embed loading: for loading errors, show 'Try Again' instead of 'Back', addreses issues in (esmero/format_strawberry#81)

This commit is contained in:
Ilya Kreymer
2020-06-29 19:49:57 -07:00
parent 98409a7efb
commit 7066b32e95
5 changed files with 40 additions and 33 deletions
+5 -1
View File
@@ -37,6 +37,7 @@ class Loader extends LitElement
total: { type: Number },
status: { type: String },
coll: { type: String },
embed: { type: String }
}
}
@@ -224,7 +225,10 @@ You can select a file to upload from the main page by clicking the \'Choose File
return html`
<div class="has-text-left">
<div class="error has-text-danger">${this.error}</div>
<div><a href="/" class="button is-warning">Back</a></div>
<div>
${this.embed ? html`
<a class="button is-warning" @click=${(e) => window.parent.location.reload()}>Try Again</a>` : html`
<a href="/" class="button is-warning">Back</a>`}
</div>`;
case "waiting":