aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-07 15:04:41 +0200
committerChocobozzz <me@florianbigard.com>2019-06-07 15:04:41 +0200
commitb91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62 (patch)
tree754bb49026d4df8086030e28a8a7c16e3f0338b6 /client/src/app/shared/video
parent851f5daa1eec66e1faa3c45238ec9ab91be05b00 (diff)
parent03371ad9d049bab79445a1b35da44cb1272f6c28 (diff)
downloadPeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.tar.gz
PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.tar.zst
PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.zip
Merge branch 'release/v1.3.0' into develop
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/video-actions-dropdown.component.ts32
1 files changed, 14 insertions, 18 deletions
diff --git a/client/src/app/shared/video/video-actions-dropdown.component.ts b/client/src/app/shared/video/video-actions-dropdown.component.ts
index 0bbc783c1..8d4e33697 100644
--- a/client/src/app/shared/video/video-actions-dropdown.component.ts
+++ b/client/src/app/shared/video/video-actions-dropdown.component.ts
@@ -188,19 +188,16 @@ export class VideoActionsDropdownComponent implements OnChanges {
188 } 188 }
189 189
190 private buildActions () { 190 private buildActions () {
191 this.videoActions = [] 191 this.videoActions = [
192 192 [
193 if (this.authService.isLoggedIn()) {
194 this.videoActions.push([
195 { 193 {
196 label: this.i18n('Save to playlist'), 194 label: this.i18n('Save to playlist'),
197 handler: () => this.playlistDropdown.toggle(), 195 handler: () => this.playlistDropdown.toggle(),
198 isDisplayed: () => this.displayOptions.playlist, 196 isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.playlist,
199 iconName: 'playlist-add' 197 iconName: 'playlist-add'
200 } 198 }
201 ]) 199 ],
202 200 [
203 this.videoActions.push([
204 { 201 {
205 label: this.i18n('Download'), 202 label: this.i18n('Download'),
206 handler: () => this.showDownloadModal(), 203 handler: () => this.showDownloadModal(),
@@ -211,36 +208,35 @@ export class VideoActionsDropdownComponent implements OnChanges {
211 label: this.i18n('Update'), 208 label: this.i18n('Update'),
212 linkBuilder: ({ video }) => [ '/videos/update', video.uuid ], 209 linkBuilder: ({ video }) => [ '/videos/update', video.uuid ],
213 iconName: 'edit', 210 iconName: 'edit',
214 isDisplayed: () => this.displayOptions.update && this.isVideoUpdatable() 211 isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.update && this.isVideoUpdatable()
215 }, 212 },
216 { 213 {
217 label: this.i18n('Blacklist'), 214 label: this.i18n('Blacklist'),
218 handler: () => this.showBlacklistModal(), 215 handler: () => this.showBlacklistModal(),
219 iconName: 'no', 216 iconName: 'no',
220 isDisplayed: () => this.displayOptions.blacklist && this.isVideoBlacklistable() 217 isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.blacklist && this.isVideoBlacklistable()
221 }, 218 },
222 { 219 {
223 label: this.i18n('Unblacklist'), 220 label: this.i18n('Unblacklist'),
224 handler: () => this.unblacklistVideo(), 221 handler: () => this.unblacklistVideo(),
225 iconName: 'undo', 222 iconName: 'undo',
226 isDisplayed: () => this.displayOptions.blacklist && this.isVideoUnblacklistable() 223 isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.blacklist && this.isVideoUnblacklistable()
227 }, 224 },
228 { 225 {
229 label: this.i18n('Delete'), 226 label: this.i18n('Delete'),
230 handler: () => this.removeVideo(), 227 handler: () => this.removeVideo(),
231 isDisplayed: () => this.displayOptions.delete && this.isVideoRemovable(), 228 isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.delete && this.isVideoRemovable(),
232 iconName: 'delete' 229 iconName: 'delete'
233 } 230 }
234 ]) 231 ],
235 232 [
236 this.videoActions.push([
237 { 233 {
238 label: this.i18n('Report'), 234 label: this.i18n('Report'),
239 handler: () => this.showReportModal(), 235 handler: () => this.showReportModal(),
240 isDisplayed: () => this.displayOptions.report, 236 isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.report,
241 iconName: 'alert' 237 iconName: 'alert'
242 } 238 }
243 ]) 239 ]
244 } 240 ]
245 } 241 }
246} 242}