Revert "Updated Author & Contributor views"

This reverts commit 8bcb534feb.
This commit is contained in:
Sanne de Vries 2022-01-21 13:01:52 +00:00
parent 0ddca821d6
commit 4404dc179f
2 changed files with 16 additions and 40 deletions

View File

@ -32,8 +32,11 @@
<li class="gh-nav-list-new relative">
<GhLinkToCustomViewsIndex @route="posts" @query={{reset-query-params "posts"}} data-test-nav="posts">{{svg-jar "posts"}}Posts</GhLinkToCustomViewsIndex>
<LinkTo @route="editor.new" @model="post" @classNames="gh-secondary-action gh-nav-new-post" @alt="New post" @title="New post" data-test-nav="new-story"><span>{{svg-jar "add-stroke"}}</span></LinkTo>
{{#if this.session.user.isAuthorOrContributor}}
{{#if this.customViews.forPosts}}
{{#if this.customViews.forPosts}}
<button type="button" class="gh-nav-button-expand {{if this.navigation.settings.expanded.posts "expanded"}}" {{on "click" (fn this.navigation.toggleExpansion "posts")}} aria-label="{{if this.navigation.settings.expanded.posts "Collapse custom post types" "Expand custom post types"}}">
{{svg-jar (if this.navigation.settings.expanded.posts "arrow-down-stroke" "arrow-right-stroke")}}
</button>
{{#liquid-if this.navigation.settings.expanded.posts}}
<ul class="gh-nav-view-list">
{{#each this.customViews.forPosts as |view|}}
<li>
@ -48,29 +51,7 @@
</li>
{{/each}}
</ul>
{{/if}}
{{else}}
{{#if this.customViews.forPosts}}
<button type="button" class="gh-nav-button-expand {{if this.navigation.settings.expanded.posts "expanded"}}" {{on "click" (fn this.navigation.toggleExpansion "posts")}} aria-label="{{if this.navigation.settings.expanded.posts "Collapse custom post types" "Expand custom post types"}}">
{{svg-jar (if this.navigation.settings.expanded.posts "arrow-down-stroke" "arrow-right-stroke")}}
</button>
{{#liquid-if this.navigation.settings.expanded.posts}}
<ul class="gh-nav-view-list">
{{#each this.customViews.forPosts as |view|}}
<li>
<LinkTo @route="posts" @query={{reset-query-params "posts" view.filter}} data-test-nav-custom="{{view.route}}-{{view.name}}" title="{{view.name}}">
<span class="gh-nav-viewname">{{view.name}}</span>
<span class="flex items-center svg-{{view.color}}">
{{#unless view.icon}}
<span class="absolute circle"></span>
{{/unless}}
</span>
</LinkTo>
</li>
{{/each}}
</ul>
{{/liquid-if}}
{{/if}}
{{/liquid-if}}
{{/if}}
</li>
<li>

View File

@ -1,21 +1,16 @@
<section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header">
{{!-- Remove breadcrumbs for Authors and Contributors --}}
{{#if this.currentUser.isAuthorOrContributor}}
<h2 class="gh-canvas-title" data-test-screen-title>Your profile</h2>
{{else}}
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
<LinkTo @route="settings.staff" data-test-staff-link={{true}}>Staff</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{this.user.name}}
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
<LinkTo @route="settings.staff" data-test-staff-link={{true}}>Staff</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{this.user.name}}
{{#if this.user.isSuspended}}
<span class="gh-badge suspended" data-test-suspended-badge>Suspended</span>
{{/if}}
</h2>
{{/if}}
{{#if this.user.isSuspended}}
<span class="gh-badge suspended" data-test-suspended-badge>Suspended</span>
{{/if}}
</h2>
{{#if this.showLeaveSettingsModal}}
<GhFullscreenModal @modal="leave-settings"