]>
Commit | Line | Data |
---|---|---|
4635f59d | 1 | <form novalidate [formGroup]="form" (ngSubmit)="formValidated()"> |
cf117aaa | 2 | <div class="avatar-and-textarea"> |
660d11e9 | 3 | <img [src]="getAvatarUrl()" alt="Avatar" /> |
cf117aaa C |
4 | |
5 | <div class="form-group"> | |
2fbe7f19 | 6 | <textarea i18n-placeholder placeholder="Add comment..." myAutoResize |
660d11e9 RK |
7 | [readonly]="(user === null) ? true : false" |
8 | (click)="openVisitorModal($event)" | |
2d9fea16 | 9 | formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" |
1263fc4e | 10 | (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea> |
d7e70384 | 11 | |
cf117aaa C |
12 | </textarea> |
13 | <div *ngIf="formErrors.text" class="form-error"> | |
14 | {{ formErrors.text }} | |
15 | </div> | |
4635f59d C |
16 | </div> |
17 | </div> | |
18 | ||
88adad2d RK |
19 | <div class="comment-buttons"> |
20 | <button *ngIf="isAddButtonDisplayed()" class="cancel-button" (click)="cancelCommentReply()" i18n> | |
21 | Cancel | |
22 | </button> | |
0d16506c | 23 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n> |
88adad2d | 24 | Reply |
4635f59d C |
25 | </button> |
26 | </div> | |
27 | </form> | |
660d11e9 RK |
28 | |
29 | <ng-template #visitorModal let-modal> | |
30 | <div class="modal-header"> | |
31 | <h4 class="modal-title" id="modal-basic-title" i18n>You are one step away from commenting</h4> | |
32 | <button type="button" class="close" aria-label="Close" (click)="hideVisitorModal()"></button> | |
33 | </div> | |
28da43cf | 34 | <div class="modal-body"> |
660d11e9 RK |
35 | <span i18n> |
36 | If you have an account on this instance, you can login: | |
37 | </span> | |
38 | <span class="btn btn-sm mx-3" role="button" (click)="gotoLogin()" i18n>login to comment</span> | |
39 | <span i18n> | |
32d7f2b7 | 40 | Otherwise, you can comment using an account on any ActivityPub-compatible instance. |
8be9f43a RK |
41 | On most platforms, you can find the video by typing its URL in the search bar and then comment it |
42 | from within the software's interface. | |
43 | </span> | |
44 | <span i18n> | |
45 | If you have an account on Mastodon or Pleroma, you can open it directly in their interface: | |
660d11e9 | 46 | </span> |
3ddb1ec5 | 47 | <my-remote-subscribe [interact]="true" [uri]="getUri()"></my-remote-subscribe> |
660d11e9 RK |
48 | </div> |
49 | <div class="modal-footer inputs"> | |
50 | <span i18n class="action-button action-button-cancel" role="button" (click)="hideVisitorModal()"> | |
51 | Cancel | |
52 | </span> | |
53 | </div> | |
54 | </ng-template> |