diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comment-add.component.html')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comment-add.component.html | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/videos/+video-watch/comment/video-comment-add.component.html index f65a88d20..9441edfb1 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.html | |||
@@ -1,9 +1,11 @@ | |||
1 | <form novalidate [formGroup]="form" (ngSubmit)="formValidated()"> | 1 | <form novalidate [formGroup]="form" (ngSubmit)="formValidated()"> |
2 | <div class="avatar-and-textarea"> | 2 | <div class="avatar-and-textarea"> |
3 | <img [src]="user.accountAvatarUrl" alt="Avatar" /> | 3 | <img [src]="getAvatarUrl()" alt="Avatar" /> |
4 | 4 | ||
5 | <div class="form-group"> | 5 | <div class="form-group"> |
6 | <textarea i18n-placeholder placeholder="Add comment..." autosize | 6 | <textarea i18n-placeholder placeholder="Add comment..." autosize |
7 | [readonly]="(user === null) ? true : false" | ||
8 | (click)="openVisitorModal($event)" | ||
7 | formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" | 9 | formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" |
8 | (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea> | 10 | (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea> |
9 | 11 | ||
@@ -20,3 +22,25 @@ | |||
20 | </button> | 22 | </button> |
21 | </div> | 23 | </div> |
22 | </form> | 24 | </form> |
25 | |||
26 | <ng-template #visitorModal let-modal> | ||
27 | <div class="modal-header"> | ||
28 | <h4 class="modal-title" id="modal-basic-title" i18n>You are one step away from commenting</h4> | ||
29 | <button type="button" class="close" aria-label="Close" (click)="hideVisitorModal()"></button> | ||
30 | </div> | ||
31 | <div class="modal-body" i18n> | ||
32 | <span i18n> | ||
33 | If you have an account on this instance, you can login: | ||
34 | </span> | ||
35 | <span class="btn btn-sm mx-3" role="button" (click)="gotoLogin()" i18n>login to comment</span> | ||
36 | <span i18n> | ||
37 | Otherwise you can comment using an account on an ActivityPub-compatible instance: | ||
38 | </span> | ||
39 | <my-remote-subscribe [interact]="true" account="{{ uri }}"></my-remote-subscribe> | ||
40 | </div> | ||
41 | <div class="modal-footer inputs"> | ||
42 | <span i18n class="action-button action-button-cancel" role="button" (click)="hideVisitorModal()"> | ||
43 | Cancel | ||
44 | </span> | ||
45 | </div> | ||
46 | </ng-template> | ||