diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-29 17:57:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-29 18:01:02 +0200 |
commit | 06a555797929d4867264b096c8420cdedd50f496 (patch) | |
tree | e68b0038d3f3f8ccae43b3bd22509200888a699a /client/src/app/+videos/+video-watch/video-watch.component.html | |
parent | 6ebdd12f8806edd7076e89c8ea3bcfaf5658b2b6 (diff) | |
download | PeerTube-06a555797929d4867264b096c8420cdedd50f496.tar.gz PeerTube-06a555797929d4867264b096c8420cdedd50f496.tar.zst PeerTube-06a555797929d4867264b096c8420cdedd50f496.zip |
Move watch action buttons in a dedicated component
Diffstat (limited to 'client/src/app/+videos/+video-watch/video-watch.component.html')
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.html | 90 |
1 files changed, 4 insertions, 86 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html index 2380d5a98..a84bafa2a 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.html +++ b/client/src/app/+videos/+video-watch/video-watch.component.html | |||
@@ -74,90 +74,13 @@ | |||
74 | <my-video-views-counter [video]="video"></my-video-views-counter> | 74 | <my-video-views-counter [video]="video"></my-video-views-counter> |
75 | </div> | 75 | </div> |
76 | 76 | ||
77 | <div class="video-actions-rates"> | 77 | <my-action-buttons |
78 | <div class="video-actions full-width justify-content-end"> | 78 | [video]="video" [isUserLoggedIn]="isUserLoggedIn()" [videoCaptions]="videoCaptions" [playlist]="playlist" |
79 | <my-video-rate | 79 | [currentTime]="getCurrentTime()" [currentPlaylistPosition]="getCurrentPlaylistPosition()" |
80 | [video]="video" [isUserLoggedIn]="isUserLoggedIn()" | 80 | ></my-action-buttons> |
81 | (rateUpdated)="onRateUpdated($event)" (userRatingLoaded)="onRateUpdated($event)" | ||
82 | ></my-video-rate> | ||
83 | |||
84 | <button *ngIf="video.support" (click)="showSupportModal()" (keyup.enter)="showSupportModal()" class="action-button action-button-support" [attr.aria-label]="tooltipSupport" | ||
85 | [ngbTooltip]="tooltipSupport" | ||
86 | placement="bottom auto" | ||
87 | > | ||
88 | <my-global-icon iconName="support" aria-hidden="true"></my-global-icon> | ||
89 | <span class="icon-text" i18n>SUPPORT</span> | ||
90 | </button> | ||
91 | |||
92 | <button (click)="showShareModal()" (keyup.enter)="showShareModal()" class="action-button"> | ||
93 | <my-global-icon iconName="share" aria-hidden="true"></my-global-icon> | ||
94 | <span class="icon-text" i18n>SHARE</span> | ||
95 | </button> | ||
96 | |||
97 | <div | ||
98 | class="action-dropdown" ngbDropdown placement="top" role="button" autoClose="outside" | ||
99 | *ngIf="isUserLoggedIn()" (openChange)="addContent.openChange($event)" | ||
100 | [ngbTooltip]="tooltipSaveToPlaylist" | ||
101 | placement="bottom auto" | ||
102 | > | ||
103 | <button class="action-button action-button-save" ngbDropdownToggle> | ||
104 | <my-global-icon iconName="playlist-add" aria-hidden="true"></my-global-icon> | ||
105 | <span class="icon-text" i18n>SAVE</span> | ||
106 | </button> | ||
107 | |||
108 | <div ngbDropdownMenu> | ||
109 | <my-video-add-to-playlist #addContent [video]="video"></my-video-add-to-playlist> | ||
110 | </div> | ||
111 | </div> | ||
112 | |||
113 | <ng-container *ngIf="!isUserLoggedIn() && !isLive()"> | ||
114 | <button | ||
115 | *ngIf="isVideoDownloadable()" class="action-button action-button-save" | ||
116 | (click)="showDownloadModal()" (keydown.enter)="showDownloadModal()" | ||
117 | > | ||
118 | <my-global-icon iconName="download" aria-hidden="true"></my-global-icon> | ||
119 | <span class="icon-text d-none d-sm-inline" i18n>DOWNLOAD</span> | ||
120 | </button> | ||
121 | |||
122 | <my-video-download #videoDownloadModal></my-video-download> | ||
123 | </ng-container> | ||
124 | |||
125 | <ng-container *ngIf="isUserLoggedIn()"> | ||
126 | <my-video-actions-dropdown | ||
127 | placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions" | ||
128 | [displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()" | ||
129 | ></my-video-actions-dropdown> | ||
130 | </ng-container> | ||
131 | </div> | ||
132 | |||
133 | <div class="video-info-likes-dislikes-bar-outer-container"> | ||
134 | <div | ||
135 | class="video-info-likes-dislikes-bar-inner-container" | ||
136 | *ngIf="video.likes !== 0 || video.dislikes !== 0" | ||
137 | [ngbTooltip]="likesBarTooltipText" | ||
138 | placement="bottom" | ||
139 | > | ||
140 | <div | ||
141 | class="video-info-likes-dislikes-bar" | ||
142 | > | ||
143 | <div class="likes-bar" [ngClass]="{ 'liked': userRating !== 'none' }" [ngStyle]="{ 'width.%': video.likesPercent }"></div> | ||
144 | </div> | ||
145 | </div> | ||
146 | </div> | ||
147 | </div> | ||
148 | |||
149 | <div | ||
150 | class="video-info-likes-dislikes-bar" | ||
151 | *ngIf="video.likes !== 0 || video.dislikes !== 0" | ||
152 | [ngbTooltip]="likesBarTooltipText" | ||
153 | placement="bottom" | ||
154 | > | ||
155 | <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div> | ||
156 | </div> | ||
157 | </div> | 81 | </div> |
158 | </div> | 82 | </div> |
159 | 83 | ||
160 | |||
161 | <div class="pt-3 border-top video-info-channel d-flex"> | 84 | <div class="pt-3 border-top video-info-channel d-flex"> |
162 | <div class="video-info-channel-left d-flex"> | 85 | <div class="video-info-channel-left d-flex"> |
163 | <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel> | 86 | <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel> |
@@ -264,9 +187,4 @@ | |||
264 | <my-privacy-concerns></my-privacy-concerns> | 187 | <my-privacy-concerns></my-privacy-concerns> |
265 | </div> | 188 | </div> |
266 | 189 | ||
267 | <ng-container *ngIf="video !== null"> | ||
268 | <my-support-modal #supportModal [video]="video"></my-support-modal> | ||
269 | <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share> | ||
270 | </ng-container> | ||
271 | |||
272 | <my-player-styles></my-player-styles> | 190 | <my-player-styles></my-player-styles> |