DEV: Experimental changes to user page notifications nav (#18466)

No tests as the changes are experimental and unconfirmed

Internal Ref: /t/67780/58
This commit is contained in:
Alan Guo Xiang Tan 2022-10-04 15:18:54 +08:00 committed by GitHub
parent fe12817cb7
commit c654bdbfa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 80 additions and 32 deletions

View File

@ -1,41 +1,89 @@
<DSection @pageClass="user-notifications" @class="user-secondary-navigation">
<MobileNav @class="notifications-nav" @desktopClass="notification-list action-list nav-stacked">
<li>
<LinkTo @route="userNotifications.index">
{{i18n "user.filters.all"}}
</LinkTo>
</li>
<li>
<LinkTo @route="userNotifications.responses">
{{i18n "user_action_groups.6"}}
</LinkTo>
</li>
<li>
<LinkTo @route="userNotifications.likesReceived">
{{i18n "user_action_groups.2"}}
</LinkTo>
</li>
{{#if this.siteSettings.enable_mentions}}
{{#if this.currentUser.redesigned_user_page_nav_enabled}}
<DSection @pageClass="user-notifications" />
<div class="user-navigation-container">
<ul id="navigation-bar" class="messages-nav nav-pills action-list">
<li>
<LinkTo @route="userNotifications.mentions">
{{i18n "user_action_groups.7"}}
<LinkTo @route="userNotifications.index">
{{i18n "user.filters.all"}}
</LinkTo>
</li>
<li>
<LinkTo @route="userNotifications.responses">
{{i18n "user_action_groups.6"}}
</LinkTo>
</li>
<li>
<LinkTo @route="userNotifications.likesReceived">
{{i18n "user_action_groups.2"}}
</LinkTo>
</li>
{{#if this.siteSettings.enable_mentions}}
<li>
<LinkTo @route="userNotifications.mentions">
{{i18n "user_action_groups.7"}}
</LinkTo>
</li>
{{/if}}
<li>
<LinkTo @route="userNotifications.edits">
{{i18n "user_action_groups.11"}}
</LinkTo>
</li>
<PluginOutlet @name="user-notifications-bottom" @tagName="span" @connectorTagName="li" @args={{hash model=this.model}} />
</ul>
{{#if this.model}}
<div class="navigation-controls">
<DButton @title="user.dismiss_notifications_tooltip" @class="btn btn-default dismiss-notifications" @action={{action "resetNew"}} @label="user.dismiss_notifications" @icon="check" @disabled={{this.allNotificationsRead}} />
</div>
{{/if}}
<li>
<LinkTo @route="userNotifications.edits">
{{i18n "user_action_groups.11"}}
</LinkTo>
</li>
<PluginOutlet @name="user-notifications-bottom" @tagName="span" @connectorTagName="li" @args={{hash model=this.model}} />
</MobileNav>
</div>
{{else}}
<DSection @pageClass="user-notifications" @class="user-secondary-navigation">
<MobileNav @class="notifications-nav" @desktopClass="notification-list action-list nav-stacked">
<li>
<LinkTo @route="userNotifications.index">
{{i18n "user.filters.all"}}
</LinkTo>
</li>
<li>
<LinkTo @route="userNotifications.responses">
{{i18n "user_action_groups.6"}}
</LinkTo>
</li>
<li>
<LinkTo @route="userNotifications.likesReceived">
{{i18n "user_action_groups.2"}}
</LinkTo>
</li>
{{#if this.siteSettings.enable_mentions}}
<li>
<LinkTo @route="userNotifications.mentions">
{{i18n "user_action_groups.7"}}
</LinkTo>
</li>
{{/if}}
<li>
<LinkTo @route="userNotifications.edits">
{{i18n "user_action_groups.11"}}
</LinkTo>
</li>
<PluginOutlet @name="user-notifications-bottom" @tagName="span" @connectorTagName="li" @args={{hash model=this.model}} />
</MobileNav>
</DSection>
</DSection>
{{#if this.model}}
<section class="user-additional-controls">
<DButton @title="user.dismiss_notifications_tooltip" @class="btn btn-default dismiss-notifications" @action={{action "resetNew"}} @label="user.dismiss_notifications" @icon="check" @disabled={{this.allNotificationsRead}} />
</section>
{{#if this.model}}
<section class="user-additional-controls">
<DButton @title="user.dismiss_notifications_tooltip" @class="btn btn-default dismiss-notifications" @action={{action "resetNew"}} @label="user.dismiss_notifications" @icon="check" @disabled={{this.allNotificationsRead}} />
</section>
{{/if}}
{{/if}}
<section class="user-content">