mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Add cooldown to upload modal publish button
This commit is contained in:
1 parent
2474d8b9cf
commit
189ea22fb9
2 files changed
+108
-1
No files matched your search
@@ -2777,7 +2777,7 @@ class Application {
|
||||
const payload = event?.detail?.payload || {};
|
||||
|
||||
try {
|
||||
await this.authService.handleUploadSubmit(payload, {
|
||||
const publishResult = await this.authService.handleUploadSubmit(payload, {
|
||||
publish: (data) =>
|
||||
this.publishVideoNote(data, {
|
||||
onSuccess: () => {
|
||||
@@ -2787,7 +2787,13 @@ class Application {
|
||||
},
|
||||
}),
|
||||
});
|
||||
if (!publishResult && this.uploadModal?.cancelCustomSubmitCooldown) {
|
||||
this.uploadModal.cancelCustomSubmitCooldown();
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.uploadModal?.cancelCustomSubmitCooldown) {
|
||||
this.uploadModal.cancelCustomSubmitCooldown();
|
||||
}
|
||||
const message =
|
||||
error && typeof error.message === "string" && error.message.trim()
|
||||
? error.message.trim()
|
||||
|
||||
Reference in new issue
Block a user