* Make the positioning of "Library | Recommended" consistent

* Fix reading lists not navigating back to their library after deletion
This commit is contained in:
TheIceCreamTroll 2022-10-21 15:54:59 -07:00 committed by GitHub
parent 038addf88c
commit 507fffcaa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 31 deletions

View File

@ -3,45 +3,43 @@
<app-card-actionables [actions]="actions" (actionHandler)="performAction($event)"></app-card-actionables> <app-card-actionables [actions]="actions" (actionHandler)="performAction($event)"></app-card-actionables>
<span>{{libraryName}}</span> <span>{{libraryName}}</span>
</h2> </h2>
<h6 subtitle class="subtitle-with-actionables" *ngIf="active.fragment === ''">{{pagination.totalItems}} Series</h6>
<div main> <div main>
<ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav nav-pills" style="flex-wrap: nowrap;"> <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav nav-pills" style="flex-wrap: nowrap;">
<li *ngFor="let tab of tabs" [ngbNavItem]="tab"> <li *ngFor="let tab of tabs" [ngbNavItem]="tab">
<a ngbNavLink> <a ngbNavLink>
<span class="d-none d-sm-flex align-items-center"><i class="fa {{tab.icon}} me-1" style="padding-right: 5px;" aria-hidden="true"></i> {{tab.title | sentenceCase}}</span> <span class="d-none d-sm-flex align-items-center"><i class="fa {{tab.icon}} me-1" style="padding-right: 5px;" aria-hidden="true"></i> {{tab.title | sentenceCase}}</span>
<span class="d-flex d-sm-none"> <span class="d-flex d-sm-none">
<i class="fa {{tab.icon}}" aria-hidden="true"></i> <i class="fa {{tab.icon}}" aria-hidden="true"></i>
</span> </span>
</a> </a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<ng-container *ngIf="tab.title === 'Recommended'"> <ng-container *ngIf="tab.title === 'Recommended'">
<app-library-recommended [libraryId]="libraryId"></app-library-recommended> <app-library-recommended [libraryId]="libraryId"></app-library-recommended>
</ng-container> </ng-container>
<ng-container *ngIf="tab.title === 'Library'"> <ng-container *ngIf="tab.title === 'Library'">
<app-card-detail-layout <app-card-detail-layout
[isLoading]="loadingSeries" [isLoading]="loadingSeries"
[items]="series" [items]="series"
[pagination]="pagination" [pagination]="pagination"
[filterSettings]="filterSettings" [filterSettings]="filterSettings"
[trackByIdentity]="trackByIdentity" [trackByIdentity]="trackByIdentity"
[filterOpen]="filterOpen" [filterOpen]="filterOpen"
[jumpBarKeys]="jumpKeys" [jumpBarKeys]="jumpKeys"
[refresh]="refresh" [refresh]="refresh"
(applyFilter)="updateFilter($event)" (applyFilter)="updateFilter($event)"
> >
<ng-template #cardItem let-item let-position="idx"> <ng-template #cardItem let-item let-position="idx">
<app-series-card [data]="item" [libraryId]="libraryId" [suppressLibraryLink]="true" (reload)="loadPage()" <app-series-card [data]="item" [libraryId]="libraryId" [suppressLibraryLink]="true" (reload)="loadPage()"
(selection)="bulkSelectionService.handleCardSelection('series', position, series.length, $event)" (selection)="bulkSelectionService.handleCardSelection('series', position, series.length, $event)"
[selected]="bulkSelectionService.isCardSelected('series', position)" [allowSelection]="true"></app-series-card> [selected]="bulkSelectionService.isCardSelected('series', position)" [allowSelection]="true"></app-series-card>
</ng-template> </ng-template>
</app-card-detail-layout> </app-card-detail-layout>
</ng-container> </ng-container>
</ng-template> </ng-template>
</li> </li>
</ul> </ul>
</div> </div>
</app-side-nav-companion-bar> </app-side-nav-companion-bar>
<h6 subtitle class="subtitle-with-actionables" *ngIf="active.fragment === ''">{{pagination.totalItems}} Series</h6>
<app-bulk-operations [actionCallback]="bulkActionCallback"></app-bulk-operations> <app-bulk-operations [actionCallback]="bulkActionCallback"></app-bulk-operations>
<div [ngbNavOutlet]="nav"></div> <div [ngbNavOutlet]="nav"></div>

View File

@ -144,7 +144,7 @@ export class ReadingListDetailComponent implements OnInit {
this.readingListService.delete(readingList.id).subscribe(() => { this.readingListService.delete(readingList.id).subscribe(() => {
this.toastr.success('Reading list deleted'); this.toastr.success('Reading list deleted');
this.router.navigateByUrl('library#lists'); this.router.navigateByUrl('/lists');
}); });
} }