diff options
author | Chocobozzz <me@florianbigard.com> | 2020-10-28 10:49:20 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | d846d99c6c81028bb7bd3cb20abd433cbf396a22 (patch) | |
tree | 1090abd56e9b2df82dd92783f499ac9f10fbd501 /client/src/app/shared | |
parent | 31c82cd914e13dbf53280d0aad0740d70c414441 (diff) | |
download | PeerTube-d846d99c6c81028bb7bd3cb20abd433cbf396a22.tar.gz PeerTube-d846d99c6c81028bb7bd3cb20abd433cbf396a22.tar.zst PeerTube-d846d99c6c81028bb7bd3cb20abd433cbf396a22.zip |
Add modal to display live information
Diffstat (limited to 'client/src/app/shared')
4 files changed, 18 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-icons/global-icon.component.ts b/client/src/app/shared/shared-icons/global-icon.component.ts index 99efcd599..ab71bc3e7 100644 --- a/client/src/app/shared/shared-icons/global-icon.component.ts +++ b/client/src/app/shared/shared-icons/global-icon.component.ts | |||
@@ -66,6 +66,7 @@ const icons = { | |||
66 | 'cross': require('!!raw-loader?!../../../assets/images/feather/x.svg').default, | 66 | 'cross': require('!!raw-loader?!../../../assets/images/feather/x.svg').default, |
67 | 'tick': require('!!raw-loader?!../../../assets/images/feather/check.svg').default, | 67 | 'tick': require('!!raw-loader?!../../../assets/images/feather/check.svg').default, |
68 | 'columns': require('!!raw-loader?!../../../assets/images/feather/columns.svg').default, | 68 | 'columns': require('!!raw-loader?!../../../assets/images/feather/columns.svg').default, |
69 | 'live': require('!!raw-loader?!../../../assets/images/feather/live.svg').default, | ||
69 | 'repeat': require('!!raw-loader?!../../../assets/images/feather/repeat.svg').default, | 70 | 'repeat': require('!!raw-loader?!../../../assets/images/feather/repeat.svg').default, |
70 | 'message-circle': require('!!raw-loader?!../../../assets/images/feather/message-circle.svg').default | 71 | 'message-circle': require('!!raw-loader?!../../../assets/images/feather/message-circle.svg').default |
71 | } | 72 | } |
diff --git a/client/src/app/shared/shared-moderation/video-block.component.html b/client/src/app/shared/shared-moderation/video-block.component.html index 5e73d66c5..e982c4d77 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.html +++ b/client/src/app/shared/shared-moderation/video-block.component.html | |||
@@ -1,6 +1,7 @@ | |||
1 | <ng-template #modal> | 1 | <ng-template #modal> |
2 | <div class="modal-header"> | 2 | <div class="modal-header"> |
3 | <h4 i18n class="modal-title">Block video "{{ video.name }}"</h4> | 3 | <h4 i18n class="modal-title" *ngIf="!video.isLive">Block video "{{ video.name }}"</h4> |
4 | <h4 i18n class="modal-title" *ngIf="video.isLive">Block live "{{ video.name }}"</h4> | ||
4 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> | 5 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> |
5 | </div> | 6 | </div> |
6 | 7 | ||
@@ -28,6 +29,10 @@ | |||
28 | </my-peertube-checkbox> | 29 | </my-peertube-checkbox> |
29 | </div> | 30 | </div> |
30 | 31 | ||
32 | <strong class="live-info" *ngIf="video.isLive" i18n> | ||
33 | Blocking this live will automatically terminate the live stream. | ||
34 | </strong> | ||
35 | |||
31 | <div class="form-group inputs"> | 36 | <div class="form-group inputs"> |
32 | <input | 37 | <input |
33 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | 38 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" |
diff --git a/client/src/app/shared/shared-moderation/video-block.component.scss b/client/src/app/shared/shared-moderation/video-block.component.scss index afcdb9a16..afa0d96f7 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.scss +++ b/client/src/app/shared/shared-moderation/video-block.component.scss | |||
@@ -4,3 +4,8 @@ | |||
4 | textarea { | 4 | textarea { |
5 | @include peertube-textarea(100%, 100px); | 5 | @include peertube-textarea(100%, 100px); |
6 | } | 6 | } |
7 | |||
8 | .live-info { | ||
9 | font-size: 15px; | ||
10 | margin: 40px 0 20px 0; | ||
11 | } | ||
diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts index 4ef17bfe3..8f4c129a5 100644 --- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts | |||
@@ -186,7 +186,12 @@ export class VideoActionsDropdownComponent implements OnChanges { | |||
186 | async removeVideo () { | 186 | async removeVideo () { |
187 | this.modalOpened.emit() | 187 | this.modalOpened.emit() |
188 | 188 | ||
189 | const res = await this.confirmService.confirm($localize`Do you really want to delete this video?`, $localize`Delete`) | 189 | let message = $localize`Do you really want to delete this video?` |
190 | if (this.video.isLive) { | ||
191 | message += ' ' + $localize`The live stream will be automatically terminated.` | ||
192 | } | ||
193 | |||
194 | const res = await this.confirmService.confirm(message, $localize`Delete`) | ||
190 | if (res === false) return | 195 | if (res === false) return |
191 | 196 | ||
192 | this.videoService.removeVideo(this.video.id) | 197 | this.videoService.removeVideo(this.video.id) |