0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed members loading spinner alignment

refs https://github.com/TryGhost/Ghost/issues/11755

Loading spinner on members screen was not vertically centered, this updates the spinner position.
This commit is contained in:
Rish 2020-04-21 13:42:17 +05:30
parent 4d23d0f0ca
commit cd832a15bb
2 changed files with 27 additions and 27 deletions

View file

@ -28,6 +28,10 @@ export default Controller.extend({
this._availableLabels = this.store.peekAll('label');
},
showLoader: computed('filteredMembers.length', 'fetchMembers.isRunning', function () {
return (!this.get('filteredMembers.length') && this.get('fetchMembers.isRunning'));
}),
listHeader: computed('selectedLabel', 'searchText', function () {
let {searchText, selectedLabel, filteredMembers} = this;
if (searchText) {

View file

@ -43,35 +43,31 @@
<LinkTo @route="member.new" class="gh-btn gh-btn-green" data-test-new-member-button="true"><span>New member</span></LinkTo>
</section>
</GhCanvasHeader>
<section class="view-container">
{{#if filteredMembers}}
{{#if this.showingAll}}
<section>
<GhMembersChart @members={{members}} />
</section>
{{#if this.showLoader}}
<div class="gh-content">
<GhLoadingSpinner />
</div>
{{else}}
<section class="view-container">
{{#if this.filteredMembers}}
{{#if this.showingAll}}
<section>
<GhMembersChart @members={{members}} />
</section>
{{/if}}
{{/if}}
{{/if}}
<section class="content-list">
<ol class="members-list gh-list {{unless this.filteredMembers "no-posts"}}">
{{#if this.filteredMembers}}
<li class="gh-list-row header">
<div class="gh-list-header">{{listHeader}}</div>
<div class="gh-list-header gh-list-cellwidth-20 nowrap">Location</div>
<div class="gh-list-header gh-list-cellwidth-20 nowrap">Created</div>
<div class="gh-list-header gh-list-cellwidth-chevron"></div>
</li>
<section class="content-list">
<ol class="members-list gh-list {{unless this.filteredMembers "no-posts"}}">
{{#if this.filteredMembers}}
<li class="gh-list-row header">
<div class="gh-list-header">{{listHeader}}</div>
<div class="gh-list-header gh-list-cellwidth-20 nowrap">Location</div>
<div class="gh-list-header gh-list-cellwidth-20 nowrap">Created</div>
<div class="gh-list-header gh-list-cellwidth-chevron"></div>
</li>
<VerticalCollection @items={{this.filteredMembers}} @key="id" @containerSelector=".gh-main" @estimateHeight=60 @bufferSize=20 as |member|>
<GhMembersListItem @member={{member}} @data-test-member-id={{member.id}} />
</VerticalCollection>
{{/if}}
{{else}}
{{#if this.fetchMembers.isRunning}}
<div class="gh-content">
<GhLoadingSpinner />
</div>
{{else}}
<li class="no-posts-box">
<div class="no-posts">
@ -85,10 +81,10 @@
</div>
</li>
{{/if}}
{{/if}}
</ol>
</ol>
</section>
</section>
</section>
{{/if}}
</section>
{{outlet}}