write-tweet.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. <!-- Form to write a tweet -->
  11. <form [formGroup]="tweet" (ngSubmit)="submitTweet()">
  12. <ion-item class="padding-0">
  13. <ion-label color="primary" stacked>Your tweet</ion-label>
  14. <ion-textarea type="text" formControlName="text" maxlength="140" [attr.rows]="4"></ion-textarea>
  15. </ion-item>
  16. <div class="actions">
  17. <span class="progress">
  18. <svg width="20" height="20" class="progress-circle">
  19. <circle class="background-stroke" cx="10" cy="10" r="8"></circle>
  20. <circle class="progress-stroke" cx="10" cy="10" r="8" transform="rotate(-90, 10, 10)"
  21. [style.strokeDashoffset]="tweetCharProgress"></circle>
  22. </svg>
  23. <span class="progress-stats">{{ (tweet.value.text).length }}/140</span>
  24. </span>
  25. <span class="network-switch">
  26. <ion-icon name="logo-twitter"></ion-icon>
  27. <ion-toggle checked="false" formControlName="p2p" color="dark"></ion-toggle>
  28. <ion-icon name="glasses"></ion-icon>
  29. </span>
  30. <button ion-button type="submit" [disabled]="!tweet.valid" class="submit-tweet">tweet!</button>
  31. </div>
  32. </form>
  33. </ion-content>