DEV: Simplifying rendering of secondary nav links for group inbox (#19164)

Also run user private messages page tests against redesign user page nav
This commit is contained in:
Alan Guo Xiang Tan 2022-11-24 05:07:41 +08:00 committed by GitHub
parent 01aa42c4b4
commit 470b8b8984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 587 additions and 588 deletions

View File

@ -7,7 +7,7 @@
</ol> </ol>
{{/if}} {{/if}}
<HorizontalOverflowNav> <HorizontalOverflowNav @className="messages-nav">
{{#if @isPersonal}} {{#if @isPersonal}}
<li class="messages-latest"> <li class="messages-latest">
<LinkTo @route="userPrivateMessages.index" @model={{@user}}> <LinkTo @route="userPrivateMessages.index" @model={{@user}}>
@ -47,39 +47,37 @@
</li> </li>
{{/if}} {{/if}}
{{#each @user.groups as |group|}} {{#if @isGroup}}
{{#if (and @isGroup (eq @groupFilter group.name))}} <li class="messages-group-latest">
{{#if @viewingSelf}} <LinkTo @route="userPrivateMessages.group" @model={{@group.name}}>
<li class="messages-group-latest"> {{d-icon "envelope"}}
<LinkTo @route="userPrivateMessages.group" @model={{group.name}}> <span>{{i18n "categories.latest"}}</span>
{{d-icon "envelope"}} </LinkTo>
<span>{{i18n "categories.latest"}}</span> </li>
</LinkTo>
</li>
<li class="messages-group-new"> {{#if @viewingSelf}}
<LinkTo @route="userPrivateMessages.groupNew" @model={{group.name}} class="new"> <li class="messages-group-new">
{{d-icon "exclamation-circle"}} <LinkTo @route="userPrivateMessages.groupNew" @model={{@group.name}} class="new">
<span>{{@newLinkText}}</span> {{d-icon "exclamation-circle"}}
</LinkTo> <span>{{@newLinkText}}</span>
</li> </LinkTo>
</li>
<li class="messages-group-unread"> <li class="messages-group-unread">
<LinkTo @route="userPrivateMessages.groupUnread" @model={{group.name}} class="unread"> <LinkTo @route="userPrivateMessages.groupUnread" @model={{@group.name}} class="unread">
{{d-icon "plus-circle"}} {{d-icon "plus-circle"}}
<span>{{@unreadLinkText}}</span> <span>{{@unreadLinkText}}</span>
</LinkTo> </LinkTo>
</li> </li>
{{/if}}
<li class="messages-group-archive"> <li class="messages-group-archive">
<LinkTo @route="userPrivateMessages.groupArchive" @model={{group.name}}> <LinkTo @route="userPrivateMessages.groupArchive" @model={{@group.name}}>
{{d-icon "archive"}} {{d-icon "archive"}}
<span>{{i18n "user.messages.archive"}}</span> <span>{{i18n "user.messages.archive"}}</span>
</LinkTo> </LinkTo>
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/if}}
{{#if this.displayTags}} {{#if this.displayTags}}
<li class="tags"> <li class="tags">