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