aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-28 11:19:45 +0200
committerChocobozzz <me@florianbigard.com>2022-10-28 11:19:45 +0200
commit672e185bf3004b46552c227483ffd2802ebf6844 (patch)
tree1774ecd89adad283b1942dcdfbba705517766fde /client
parent37ff5005b47b9df2933a0b8812609a6c41faa170 (diff)
downloadPeerTube-672e185bf3004b46552c227483ffd2802ebf6844.tar.gz
PeerTube-672e185bf3004b46552c227483ffd2802ebf6844.tar.zst
PeerTube-672e185bf3004b46552c227483ffd2802ebf6844.zip
Fix upload error handling
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html6
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.scss6
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts2
3 files changed, 3 insertions, 11 deletions
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 8541868c5..779d42e0c 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
@@ -76,10 +76,8 @@
76 </div> 76 </div>
77 </div> 77 </div>
78 78
79 <div class="btn-group" role="group"> 79 <input type="button" class="peertube-button grey-button ms-1" i18n-value="Retry failed upload of a video" value="Retry" (click)="retryUpload()" />
80 <input type="button" class="btn" i18n-value="Retry failed upload of a video" value="Retry" (click)="retryUpload()" /> 80 <input type="button" class="peertube-button grey-button ms-1" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" />
81 <input type="button" class="btn" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" />
82 </div>
83</div> 81</div>
84 82
85<div *ngIf="error && !enableRetryAfterError" class="alert alert-danger"> 83<div *ngIf="error && !enableRetryAfterError" class="alert alert-danger">
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.scss b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.scss
index 35c626ec2..52a77f83f 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.scss
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.scss
@@ -42,10 +42,4 @@
42 } 42 }
43 } 43 }
44 } 44 }
45
46 input {
47 @include peertube-button;
48 @include grey-button;
49 @include margin-left(10px);
50 }
51} 45}
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 b0d846664..967fa9ed1 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
@@ -136,7 +136,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
136 onUploadVideoOngoing (state: UploadState) { 136 onUploadVideoOngoing (state: UploadState) {
137 switch (state.status) { 137 switch (state.status) {
138 case 'error': { 138 case 'error': {
139 if (!this.alreadyRefreshedToken && state.response.status === HttpStatusCode.UNAUTHORIZED_401) { 139 if (!this.alreadyRefreshedToken && state.responseStatus === HttpStatusCode.UNAUTHORIZED_401) {
140 this.alreadyRefreshedToken = true 140 this.alreadyRefreshedToken = true
141 141
142 return this.refereshTokenAndRetryUpload() 142 return this.refereshTokenAndRetryUpload()