|
8 | 8 |
|
9 | 9 | <div class="conversations">
|
10 | 10 | <aside>
|
11 |
| - {{#each (sort-by "updatedAt:desc" conversations) as |conversation|}} |
12 |
| - {{conversations/conversation-list-item-with-user |
13 |
| - conversation=conversation |
14 |
| - close=(action 'close') |
15 |
| - reopen=(action 'reopen') |
| 11 | + <div class="conversations__list-actions"> |
| 12 | + {{conversations/status-select |
| 13 | + status=status |
16 | 14 | }}
|
| 15 | + </div> |
| 16 | + {{#if currentlyLoading}} |
| 17 | + {{loading-spinner}} |
17 | 18 | {{else}}
|
18 |
| - <div class="conversations__empty"> |
19 |
| - <p class="conversations__empty__icon"> |
20 |
| - {{fa-icon "comment"}} |
21 |
| - </p> |
22 |
| - <p><strong>You haven't had any conversations yet.</strong></p> |
23 |
| - <p>Go start one with someone in your project!</p> |
24 |
| - <p> |
25 |
| - {{link-to 'See your users' 'project.people' class="button default"}} |
26 |
| - </p> |
27 |
| - </div> |
28 |
| - {{/each}} |
| 19 | + {{#each (sort-by "updatedAt:desc" (filter-by "status" status conversations)) as |conversation|}} |
| 20 | + {{conversations/conversation-list-item-with-user |
| 21 | + conversation=conversation |
| 22 | + close=(action 'close') |
| 23 | + reopen=(action 'reopen') |
| 24 | + }} |
| 25 | + {{else}} |
| 26 | + <div class="conversations__empty"> |
| 27 | + <p class="conversations__empty__icon"> |
| 28 | + {{fa-icon "comment"}} |
| 29 | + </p> |
| 30 | + {{#if (eq status "open")}} |
| 31 | + <p><strong>You don't have any open conversations.</strong></p> |
| 32 | + <p>Go start one with someone in your project!</p> |
| 33 | + <p> |
| 34 | + {{link-to 'See your users' 'project.people' class="button default"}} |
| 35 | + </p> |
| 36 | + {{else if (eq status "closed")}} |
| 37 | + <p><strong>You don't have any closed conversations.</strong></p> |
| 38 | + {{/if}} |
| 39 | + </div> |
| 40 | + {{/each}} |
| 41 | + {{/if}} |
29 | 42 | </aside>
|
30 | 43 | <section>
|
31 | 44 | <div class="conversation">
|
32 |
| - {{outlet}} |
| 45 | + {{#if currentlyLoading}} |
| 46 | + <div class="conversation__loading"> |
| 47 | + </div> |
| 48 | + {{else}} |
| 49 | + {{outlet}} |
| 50 | + {{/if}} |
33 | 51 | </div>
|
34 | 52 | </section>
|
35 | 53 | </div>
|
0 commit comments