Release Testing Day 3 (#1951)
* Code cleanup. Fixed OPDS images missing api key. Fixed theme color on site manifest not being black. * Removed a console.log from timeago pipe * Reading list page is now alphabetical and the modal for adding to a reading list is ordered by most recent. * Fixed a bug where remove read from reading list failed due to Calculating Start and End date assuming chapter would always be there. * Fixed a bug where reading list cover would get reset when editing the reading list. * Fixed a bug where reading list item didn't have not read badge. It's on old style. * Fixed a bug where user-preferences was hitting an admin only api when there was a better alternative * Slight memory improvement on a common db call * Fixed a bug where resetting to default theme when a theme was deleted was throwing an exception and failing. * All Login dtos now have the active KavitaVersion to make external apps able to handle what version of the API they are connecting with. * Fixed up a case where getVolume repo method always assumed there was a volume by that Id.
This commit is contained in:
parent
875931b162
commit
faf58e6985
37 changed files with 139 additions and 158 deletions
|
@ -24,11 +24,12 @@ export class ReadingListService {
|
|||
return this.httpClient.get<ReadingList>(this.baseUrl + 'readinglist?readingListId=' + readingListId);
|
||||
}
|
||||
|
||||
getReadingLists(includePromoted: boolean = true, pageNum?: number, itemsPerPage?: number) {
|
||||
getReadingLists(includePromoted: boolean = true, sortByLastModified: boolean = false, pageNum?: number, itemsPerPage?: number) {
|
||||
let params = new HttpParams();
|
||||
params = this.utilityService.addPaginationIfExists(params, pageNum, itemsPerPage);
|
||||
|
||||
return this.httpClient.post<PaginatedResult<ReadingList[]>>(this.baseUrl + 'readinglist/lists?includePromoted=' + includePromoted, {}, {observe: 'response', params}).pipe(
|
||||
return this.httpClient.post<PaginatedResult<ReadingList[]>>(this.baseUrl + 'readinglist/lists?includePromoted=' + includePromoted
|
||||
+ '&sortByLastModified=' + sortByLastModified, {}, {observe: 'response', params}).pipe(
|
||||
map((response: any) => {
|
||||
return this.utilityService.createPaginatedResult(response, new PaginatedResult<ReadingList[]>());
|
||||
})
|
||||
|
|
|
@ -67,10 +67,6 @@ export class SeriesService {
|
|||
return this.httpClient.get<Volume[]>(this.baseUrl + 'series/volumes?seriesId=' + seriesId);
|
||||
}
|
||||
|
||||
getVolume(volumeId: number) {
|
||||
return this.httpClient.get<Volume>(this.baseUrl + 'series/volume?volumeId=' + volumeId);
|
||||
}
|
||||
|
||||
getChapter(chapterId: number) {
|
||||
return this.httpClient.get<Chapter>(this.baseUrl + 'series/chapter?chapterId=' + chapterId);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,10 @@ export class SettingsService {
|
|||
return this.http.get<ServerSettings>(this.baseUrl + 'settings');
|
||||
}
|
||||
|
||||
getBaseUrl() {
|
||||
return this.http.get<string>(this.baseUrl + 'settings/base-url', TextResonse);
|
||||
}
|
||||
|
||||
updateServerSettings(model: ServerSettings) {
|
||||
return this.http.post<ServerSettings>(this.baseUrl + 'settings', model);
|
||||
}
|
||||
|
|
|
@ -34,11 +34,10 @@ and modified
|
|||
export class TimeAgoPipe implements PipeTransform, OnDestroy {
|
||||
|
||||
private timer: number | null = null;
|
||||
constructor(private changeDetectorRef: ChangeDetectorRef, private ngZone: NgZone) {}
|
||||
constructor(private readonly changeDetectorRef: ChangeDetectorRef, private ngZone: NgZone) {}
|
||||
transform(value: string) {
|
||||
this.removeTimer();
|
||||
const d = new Date(value);
|
||||
console.log('date: ', d);
|
||||
const now = new Date();
|
||||
const seconds = Math.round(Math.abs((now.getTime() - d.getTime()) / 1000));
|
||||
const timeToUpdate = (Number.isNaN(seconds)) ? 1000 : this.getSecondsUntilUpdate(seconds) * 1000;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
<div class="d-flex flex-row g-0 mb-2">
|
||||
<div class="pe-2">
|
||||
<app-image width="106px" maxHeight="125px" class="img-top me-3" [imageUrl]="imageService.getChapterCoverImage(item.chapterId)"></app-image>
|
||||
<div class="not-read-badge" *ngIf="item.pagesRead === 0 && item.pagesTotal > 0"></div>
|
||||
<div class="progress-banner" *ngIf="item.pagesRead < item.pagesTotal && item.pagesTotal > 0 && item.pagesRead !== item.pagesTotal">
|
||||
<p><ngb-progressbar type="primary" height="5px" [value]="item.pagesRead" [max]="item.pagesTotal"></ngb-progressbar></p>
|
||||
</div>
|
||||
<ng-container *ngIf="item.pagesRead === 0 && item.pagesTotal > 0">
|
||||
<div class="not-read-badge" ></div>
|
||||
</ng-container>
|
||||
<div class="progress-banner" *ngIf="item.pagesRead < item.pagesTotal && item.pagesTotal > 0 && item.pagesRead !== item.pagesTotal">
|
||||
<p><ngb-progressbar type="primary" height="5px" [value]="item.pagesRead" [max]="item.pagesTotal"></ngb-progressbar></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-grow-1">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
$image-height: 125px;
|
||||
|
||||
.progress-banner {
|
||||
height: 5px;
|
||||
|
||||
|
@ -13,10 +15,20 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.not-read-badge {
|
||||
.badge-container {
|
||||
border-radius: 4px;
|
||||
display: block;
|
||||
height: $image-height;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 108px;
|
||||
width: 106px;
|
||||
}
|
||||
|
||||
.not-read-badge {
|
||||
position: relative;
|
||||
top: -125px;
|
||||
left: 78px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<app-card-actionables [actions]="globalActions" (actionHandler)="performGlobalAction($event)"></app-card-actionables>
|
||||
<span>Reading Lists</span>
|
||||
</h2>
|
||||
<h6 subtitle *ngIf="pagination">{{pagination.totalItems | number}} Items</h6>
|
||||
<h6 subtitle class="subtitle-with-actionables" *ngIf="pagination">{{pagination.totalItems | number}} Items</h6>
|
||||
</app-side-nav-companion-bar>
|
||||
|
||||
<app-card-detail-layout
|
||||
|
|
|
@ -97,7 +97,7 @@ export class ReadingListsComponent implements OnInit {
|
|||
this.loadingLists = true;
|
||||
this.cdRef.markForCheck();
|
||||
|
||||
this.readingListService.getReadingLists(true).pipe(take(1)).subscribe((readingLists: PaginatedResult<ReadingList[]>) => {
|
||||
this.readingListService.getReadingLists(true, false).pipe(take(1)).subscribe((readingLists: PaginatedResult<ReadingList[]>) => {
|
||||
this.lists = readingLists.result;
|
||||
this.pagination = readingLists.pagination;
|
||||
this.jumpbarKeys = this.jumpbarService.getJumpKeys(readingLists.result, (rl: ReadingList) => rl.title);
|
||||
|
|
|
@ -73,7 +73,7 @@ export class AddToListModalComponent implements OnInit, AfterViewInit {
|
|||
this.listForm.addControl('filterQuery', new FormControl('', []));
|
||||
|
||||
this.loading = true;
|
||||
this.readingListService.getReadingLists(false).subscribe(lists => {
|
||||
this.readingListService.getReadingLists(false, true).subscribe(lists => {
|
||||
this.lists = lists.result;
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
|
@ -55,6 +55,8 @@ export class EditReadingListModalComponent implements OnInit, OnDestroy {
|
|||
endingYear: new FormControl(this.readingList.endingYear, { nonNullable: true, validators: [Validators.min(1000)] }),
|
||||
});
|
||||
|
||||
this.coverImageLocked = this.readingList.coverImageLocked;
|
||||
|
||||
this.reviewGroup.get('title')?.valueChanges.pipe(
|
||||
debounceTime(100),
|
||||
distinctUntilChanged(),
|
||||
|
|
|
@ -107,7 +107,7 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
|
|||
this.cdRef.markForCheck();
|
||||
});
|
||||
|
||||
this.settingsService.getServerSettings().subscribe(settings => this.baseUrl = settings.baseUrl);
|
||||
this.settingsService.getBaseUrl().subscribe(url => this.baseUrl = url);
|
||||
|
||||
this.settingsService.getOpdsEnabled().subscribe(res => {
|
||||
this.opdsEnabled = res;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#000000",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue