Hide support button if it is empty
authorChocobozzz <me@florianbigard.com>
Wed, 21 Feb 2018 07:49:05 +0000 (08:49 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 21 Feb 2018 07:49:05 +0000 (08:49 +0100)
client/src/app/shared/video/video.service.ts
client/src/app/videos/+video-watch/video-watch.component.html

index 99da147798d26c15e21b14984448646865234ee5..a151a2983170854ebb7863d89f8999a47bce7d26 100644 (file)
@@ -51,18 +51,19 @@ export class VideoService {
     const licence = video.licence || undefined
     const category = video.category || undefined
     const description = video.description || undefined
+    const support = video.support || undefined
 
     const body: VideoUpdate = {
       name: video.name,
       category,
       licence,
       language,
+      support,
       description,
       privacy: video.privacy,
       tags: video.tags,
       nsfw: video.nsfw,
       commentsEnabled: video.commentsEnabled,
-      support: video.support,
       thumbnailfile: video.thumbnailfile,
       previewfile: video.previewfile
     }
index b8ec048b25c870b99c2972499bf6a20790411524..2869d13ddf828b772aafda1032257b937fd21fb0 100644 (file)
@@ -44,7 +44,7 @@
               <span class="icon icon-dislike" title="Dislike this video"></span>
             </div>
 
-            <div (click)="showSupportModal()" class="action-button action-button-support">
+            <div *ngIf="video.support" (click)="showSupportModal()" class="action-button action-button-support">
               <span class="icon icon-support"></span>
               <span class="icon-text">Support</span>
             </div>