Release Shakeout Day 1 (#1591)
* Fixed an issue where reading list were not able to update their summary due to a duplicate title check. * Misc code smell cleanup * Updated .net dependencies and removed unneeded ones * Fixed an issue where removing a series from want to read list page wouldn't update the page correctly * Fixed age restriction not applied to Recommended page * Ensure that Genres and Tags are age restricted gated * Persons are now age gated as well * When you choose a cover, the new cover will properly be selected and will focus on it, in the cases there are many other covers available. * Fixed caching profiles * Added in a special hook when deleting a library to clear all series Relations before we delete
This commit is contained in:
parent
03bd2e9103
commit
b802e1e1b0
29 changed files with 404 additions and 153 deletions
|
|
@ -190,9 +190,12 @@ export class CoverImageChooserComponent implements OnInit, OnDestroy {
|
|||
|
||||
this.imageUrls.push(e.target.result); // This is base64 already
|
||||
this.imageUrlsChange.emit(this.imageUrls);
|
||||
this.selectedIndex += 1;
|
||||
this.selectedIndex = this.imageUrls.length - 1;
|
||||
this.imageSelected.emit(this.selectedIndex); // Auto select newly uploaded image
|
||||
this.selectedBase64Url.emit(e.target.result);
|
||||
setTimeout(() => {
|
||||
(this.document.querySelector('div.image-card[aria-label="Image ' + this.selectedIndex + '"]') as HTMLElement).focus();
|
||||
})
|
||||
this.cdRef.markForCheck();
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +212,7 @@ export class CoverImageChooserComponent implements OnInit, OnDestroy {
|
|||
|
||||
setTimeout(() => {
|
||||
// Auto select newly uploaded image and tell parent of new base64 url
|
||||
this.selectImage(this.selectedIndex + 1);
|
||||
this.selectImage(index >= 0 ? index : this.imageUrls.length - 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { Router } from '@angular/router';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { filter, take } from 'rxjs/operators';
|
||||
import { Series } from 'src/app/_models/series';
|
||||
import { AccountService } from 'src/app/_services/account.service';
|
||||
import { ImageService } from 'src/app/_services/image.service';
|
||||
import { ActionFactoryService, Action, ActionItem } from 'src/app/_services/action-factory.service';
|
||||
import { SeriesService } from 'src/app/_services/series.service';
|
||||
|
|
@ -37,7 +35,10 @@ export class SeriesCardComponent implements OnInit, OnChanges, OnDestroy {
|
|||
@Input() relation: RelationKind | undefined = undefined;
|
||||
|
||||
@Output() clicked = new EventEmitter<Series>();
|
||||
@Output() reload = new EventEmitter<boolean>();
|
||||
/**
|
||||
* Emits when a reload needs to occur and the id of the entity
|
||||
*/
|
||||
@Output() reload = new EventEmitter<number>();
|
||||
@Output() dataChanged = new EventEmitter<Series>();
|
||||
/**
|
||||
* When the card is selected.
|
||||
|
|
@ -103,7 +104,7 @@ export class SeriesCardComponent implements OnInit, OnChanges, OnDestroy {
|
|||
case Action.RemoveFromWantToReadList:
|
||||
this.actionService.removeMultipleSeriesFromWantToReadList([series.id]);
|
||||
if (this.router.url.startsWith('/want-to-read')) {
|
||||
this.reload.emit(true);
|
||||
this.reload.emit(series.id);
|
||||
}
|
||||
break;
|
||||
case(Action.AddToCollection):
|
||||
|
|
@ -125,7 +126,7 @@ export class SeriesCardComponent implements OnInit, OnChanges, OnDestroy {
|
|||
this.seriesService.getSeries(data.id).subscribe(series => {
|
||||
this.data = series;
|
||||
this.cdRef.markForCheck();
|
||||
this.reload.emit(true);
|
||||
this.reload.emit(series.id);
|
||||
this.dataChanged.emit(series);
|
||||
});
|
||||
}
|
||||
|
|
@ -145,7 +146,7 @@ export class SeriesCardComponent implements OnInit, OnChanges, OnDestroy {
|
|||
async deleteSeries(series: Series) {
|
||||
this.actionService.deleteSeries(series, (result: boolean) => {
|
||||
if (result) {
|
||||
this.reload.emit(true);
|
||||
this.reload.emit(series.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue