]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/comment/video-comment-add.component.html
Improve prune script
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment-add.component.html
CommitLineData
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">
2d9fea16 6 <textarea i18n-placeholder placeholder="Add comment..." autosize
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
19 <div class="submit-comment">
0d16506c 20 <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n>
4635f59d
C
21 Post comment
22 </button>
23 </div>
24</form>
660d11e9
RK
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>
28da43cf 31 <div class="modal-body">
660d11e9
RK
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>