write-tweet.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <ion-header>
  2. <ion-navbar>
  3. <ion-title>Tweet something</ion-title>
  4. </ion-navbar>
  5. </ion-header>
  6. <ion-content padding>
  7. <!-- Show tweet to retweet or quote (if passed to the page) -->
  8. <ion-label *ngIf="retweet" color="primary">Retweet</ion-label>
  9. <quoted-status *ngIf="retweet" [data]="retweet.data"></quoted-status>
  10. <!-- Show tweet to reply to -->
  11. <ion-label *ngIf="replyTweet" color="primary">Reply to</ion-label>
  12. <quoted-status *ngIf="replyTweet" [data]="replyTweet.data"></quoted-status>
  13. <!-- Form to write a tweet -->
  14. <form [formGroup]="tweet" (ngSubmit)="submitTweet()">
  15. <ion-item class="padding-0">
  16. <ion-label color="primary" stacked>Your tweet</ion-label>
  17. <ion-textarea type="text" formControlName="text" maxlength="140" [attr.rows]="4"></ion-textarea>
  18. </ion-item>
  19. <div class="actions">
  20. <span class="progress">
  21. <svg width="20" height="20" class="progress-circle">
  22. <circle class="background-stroke" cx="10" cy="10" r="8"></circle>
  23. <circle class="progress-stroke" cx="10" cy="10" r="8" transform="rotate(-90, 10, 10)" [style.strokeDashoffset]="tweetCharProgress"></circle>
  24. </svg>
  25. <span class="progress-stats">{{ (tweet.value.text).length }}/140</span>
  26. </span>
  27. <span class="network-switch">
  28. <ion-icon name="logo-twitter"></ion-icon>
  29. <ion-toggle checked="false" formControlName="p2p" color="dark"></ion-toggle>
  30. <ion-icon name="glasses"></ion-icon>
  31. </span>
  32. <ion-icon name="warning" *ngIf="showTrigger" class="warning" (click)="showTriggerInfo()"></ion-icon>
  33. <button ion-button type="submit" class="submit-tweet">tweet!</button>
  34. </div>
  35. </form>
  36. </ion-content>