2019-03-06 05:37:58 +01:00
|
|
|
<form class="status-form" (ngSubmit)="onSubmit()">
|
2019-07-25 05:57:50 +02:00
|
|
|
<input [(ngModel)]="title" type="text" class="form-control form-control-sm status-editor__title" name="title"
|
|
|
|
autocomplete="off" placeholder="Title, Content Warning (optional)" title="title, content warning (optional)" />
|
2019-03-06 04:46:50 +01:00
|
|
|
|
2019-03-13 00:37:16 +01:00
|
|
|
<textarea #reply [(ngModel)]="status" name="status"
|
2019-07-27 04:21:16 +02:00
|
|
|
class="form-control form-control-sm status-form__status status-editor__content" rows="5" required
|
2019-07-26 01:44:03 +02:00
|
|
|
title="content" placeholder="What's in your mind?" (keydown.control.enter)="onCtrlEnter()"
|
2019-07-27 04:21:16 +02:00
|
|
|
(keydown)="handleKeyDown($event)"
|
|
|
|
(blur)="statusTextEditorLostFocus()"></textarea> <!-- flexcroll (keyup)="autoGrow($event)" -->
|
2019-07-25 05:57:50 +02:00
|
|
|
|
2019-07-26 02:15:33 +02:00
|
|
|
<app-autosuggest class="status-editor__autosuggest" *ngIf="autosuggestData"
|
|
|
|
[pattern]="autosuggestData"
|
2019-07-25 00:09:50 +02:00
|
|
|
[autoSuggestUserActionsStream]="autoSuggestUserActionsStream"
|
2019-07-25 05:57:50 +02:00
|
|
|
(suggestionSelectedEvent)="suggestionSelected($event)" (hasSuggestionsEvent)="suggestionsChanged($event)">
|
|
|
|
</app-autosuggest>
|
|
|
|
|
|
|
|
<div class="status-editor__footer">
|
2019-07-26 01:44:03 +02:00
|
|
|
<button type="submit" title="reply" class="status-editor__footer--send-button" *ngIf="statusReplyingToWrapper">
|
2019-07-26 02:25:18 +02:00
|
|
|
<span *ngIf="!isSending">REPLY!</span>
|
|
|
|
<app-waiting-animation class="waiting-icon" *ngIf="isSending"></app-waiting-animation>
|
2019-07-26 01:44:03 +02:00
|
|
|
</button>
|
|
|
|
<button type="submit" title="post" class="status-editor__footer--send-button" *ngIf="!statusReplyingToWrapper">
|
2019-07-26 02:25:18 +02:00
|
|
|
<span *ngIf="!isSending">POST!</span>
|
|
|
|
<app-waiting-animation class="waiting-icon" *ngIf="isSending"></app-waiting-animation>
|
2019-07-25 05:57:50 +02:00
|
|
|
</button>
|
|
|
|
<div class="status-editor__footer__counter">
|
2019-07-25 07:10:48 +02:00
|
|
|
<div class="status-editor__footer__counter--posts" title="number of statuses">
|
|
|
|
{{postCounts - 1}}/{{postCounts}}</div>
|
|
|
|
<div class="status-editor__footer__counter--count" title="chars left">{{charCountLeft}}</div>
|
2019-07-25 05:57:50 +02:00
|
|
|
</div>
|
|
|
|
|
2019-07-26 04:50:51 +02:00
|
|
|
<a href class="status-editor__footer--link" title="add media" (click)="addMedia()">
|
2019-07-25 05:57:50 +02:00
|
|
|
<fa-icon [icon]="faPaperclip"></fa-icon>
|
|
|
|
</a>
|
2019-07-26 04:50:51 +02:00
|
|
|
<input #fileInput type="file" id="file" style="display: none;" (change)="handleFileInput($event.target.files)">
|
|
|
|
|
2019-07-26 06:01:39 +02:00
|
|
|
<a href class="status-editor__footer--link" title="{{ selectedPrivacy }}" (click)="onContextMenu($event)">
|
2019-07-26 01:41:12 +02:00
|
|
|
<fa-icon [icon]="faGlobeAmericas" *ngIf="selectedPrivacy === 'Public'"></fa-icon>
|
|
|
|
<fa-icon [icon]="faLockOpen" *ngIf="selectedPrivacy === 'Unlisted'"></fa-icon>
|
|
|
|
<fa-icon [icon]="faLock" *ngIf="selectedPrivacy === 'Follows-only'"></fa-icon>
|
2019-07-26 01:44:03 +02:00
|
|
|
<fa-icon [icon]="faEnvelope" *ngIf="selectedPrivacy === 'DM'"></fa-icon>
|
2019-07-25 05:57:50 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2019-07-26 01:44:03 +02:00
|
|
|
<div class="status-form__mention-error" *ngIf="mentionTooFarAwayError">Error: mentions must be placed closer to the
|
|
|
|
start in order to use multiposting.</div>
|
2019-07-25 07:10:48 +02:00
|
|
|
|
|
|
|
<context-menu #contextMenu>
|
2019-07-26 06:01:39 +02:00
|
|
|
<ng-template contextMenuItem
|
|
|
|
(execute)="changePrivacy('Public')">
|
|
|
|
<fa-icon [icon]="faGlobeAmericas" class="context-menu-icon"></fa-icon> Public
|
2019-07-25 07:10:48 +02:00
|
|
|
</ng-template>
|
2019-07-26 06:01:39 +02:00
|
|
|
<ng-template contextMenuItem
|
|
|
|
(execute)="changePrivacy('Unlisted')">
|
|
|
|
<fa-icon [icon]="faLockOpen" class="context-menu-icon"></fa-icon> Unlisted
|
2019-07-26 01:44:03 +02:00
|
|
|
</ng-template>
|
2019-07-26 06:01:39 +02:00
|
|
|
<ng-template contextMenuItem
|
|
|
|
(execute)="changePrivacy('Follows-only')">
|
|
|
|
<fa-icon [icon]="faLock" class="context-menu-icon"></fa-icon> Followers-only
|
2019-07-25 07:10:48 +02:00
|
|
|
</ng-template>
|
2019-07-26 06:01:39 +02:00
|
|
|
<ng-template contextMenuItem
|
|
|
|
(execute)="changePrivacy('DM')">
|
|
|
|
<fa-icon [icon]="faEnvelope" class="context-menu-icon"></fa-icon> Direct
|
2019-07-26 01:44:03 +02:00
|
|
|
</ng-template>
|
2019-07-25 07:10:48 +02:00
|
|
|
</context-menu>
|
2019-03-08 05:50:33 +01:00
|
|
|
<app-media></app-media>
|
2019-03-06 04:46:50 +01:00
|
|
|
</form>
|