mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Add a retry button.
This commit is contained in:
@@ -91,6 +91,13 @@ function TaskTile({task}: {task: UploadingTask}) {
|
||||
<progress className="progress progress-primary my-2" value={100 * progress} max={100} />
|
||||
{error && <p className={"text-error p-1"}>{error}</p>}
|
||||
<div className={"my-2 flex flex-row-reverse"}>
|
||||
{
|
||||
error && <button className={"btn h-7 mr-1"} onClick={() => {
|
||||
task.start();
|
||||
}}>
|
||||
Retry
|
||||
</button>
|
||||
}
|
||||
<button className={"btn btn-error h-7"} onClick={() => {
|
||||
const dialog = document.getElementById(`cancel_task_${task.id}`) as HTMLDialogElement;
|
||||
dialog.showModal();
|
||||
|
@@ -124,6 +124,7 @@ export class UploadingTask extends Listenable {
|
||||
}
|
||||
|
||||
async start() {
|
||||
this.errorMessage = null;
|
||||
this.status = UploadingStatus.UPLOADING;
|
||||
this.notifyListeners();
|
||||
await Promise.all([
|
||||
|
Reference in New Issue
Block a user