Sengi-Windows-MacOS-Linux/src/app/components/create-status/create-status.component.html

72 lines
3.6 KiB
HTML
Raw Normal View History

2019-03-06 05:37:58 +01:00
<form class="status-form" (ngSubmit)="onSubmit()">
<div class="status-form__sending" *ngIf="isSending">
<app-waiting-animation class="waiting-icon"></app-waiting-animation>
2019-03-06 05:37:58 +01:00
</div>
<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)" />
<textarea #reply [(ngModel)]="status" name="status"
class="form-control form-control-sm status-form__status status-editor__content flexcroll" rows="5" required
2019-07-25 07:51:11 +02:00
title="content" placeholder="What's in your mind?"
(keydown.control.enter)="onCtrlEnter()"
(keydown)="handleKeyDown($event)"
(keyup)="autoGrowTextZone($event)"
(blur)="statusTextEditorLostFocus()"></textarea>
<app-autosuggest class="status-form__autosuggest" *ngIf="autosuggestData" [pattern]="autosuggestData"
2019-07-25 00:09:50 +02:00
[autoSuggestUserActionsStream]="autoSuggestUserActionsStream"
(suggestionSelectedEvent)="suggestionSelected($event)" (hasSuggestionsEvent)="suggestionsChanged($event)">
</app-autosuggest>
<div class="status-editor__footer">
<button type="submit" class="status-editor__footer--send-button">
<span *ngIf="statusReplyingToWrapper" title="reply">REPLY!</span>
<span *ngIf="!statusReplyingToWrapper" title="post">POST!</span>
</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>
</div>
<a href class="status-editor__footer--link" title="add media">
<fa-icon [icon]="faPaperclip"></fa-icon>
</a>
2019-07-25 07:10:48 +02:00
<a href class="status-editor__footer--link" title="adjust status privacy" (click)="onContextMenu($event)">
<fa-icon [icon]="faGlobeAmericas"></fa-icon>
</a>
</div>
2019-07-25 07:10:48 +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>
<context-menu #contextMenu>
<ng-template contextMenuItem (execute)="changePrivacy()">
<fa-icon [icon]="faGlobeAmericas"></fa-icon> Public
</ng-template>
<ng-template contextMenuItem (execute)="changePrivacy()">
<fa-icon [icon]="faLockOpen"></fa-icon> Unlisted
</ng-template>
<ng-template contextMenuItem (execute)="changePrivacy()">
<fa-icon [icon]="faLock"></fa-icon> Followers-only
</ng-template>
<ng-template contextMenuItem (execute)="changePrivacy()">
<fa-icon [icon]="faEnvelope"></fa-icon> Direct
</ng-template>
</context-menu>
2019-07-25 07:10:48 +02:00
<!--
<select class="form-control form-control-sm form-control--privacy" id="privacy" name="privacy"
[(ngModel)]="selectedPrivacy">
<option *ngFor="let p of privacyList" [ngValue]="p">{{p}}</option>
</select> -->
<!-- <div class="status-form__counter">
<span class="status-form__counter--count">{{charCountLeft}}</span> <span
class="status-form__counter--posts">{{postCounts - 1}}/{{postCounts}}</span>
</div> -->
<!-- <button type="submit" class="btn btn-sm btn-custom-primary" *ngIf="statusReplyingToWrapper">REPLY!</button>
<button type="submit" class="btn btn-sm btn-custom-primary" *ngIf="!statusReplyingToWrapper">POST!</button> -->
2019-03-08 05:50:33 +01:00
<app-media></app-media>
</form>