Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix error when clicking on the disabled publish button

Chocobozzz59c9c5d9bb38
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
index ff0e45413f..fa57c8cb58 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
+++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
@@ -49,10 +49,10 @@
<div class="submit-button"
(click)="updateSecondStep()"
- [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true || videoUploaded !== true }"
+ [ngClass]="{ disabled: isPublishingButtonDisabled() }"
>
<span class="icon icon-validate"></span>
- <input type="button" i18n-value value="Publish" />
+ <input [disabled]="isPublishingButtonDisabled()" type="button" i18n-value value="Publish" />
</div>
</div>
</form>
\ No newline at end of file
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
index 5844418171..941dc5441e 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
@@ -206,6 +206,12 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
)
}
+ isPublishingButtonDisabled () {
+ return !this.form.valid ||
+ this.isUpdatingVideo === true ||
+ this.videoUploaded !== true
+ }
+
updateSecondStep () {
if (this.checkForm() === false) {
return