mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Fixed Previous Build (#2661)
This commit is contained in:
parent
e41795f9c2
commit
48aa8cacfd
@ -7,7 +7,7 @@ import { AgeRating } from './metadata/age-rating';
|
|||||||
export interface Chapter {
|
export interface Chapter {
|
||||||
id: number;
|
id: number;
|
||||||
range: string;
|
range: string;
|
||||||
minNumber: string;
|
number: string;
|
||||||
files: Array<MangaFile>;
|
files: Array<MangaFile>;
|
||||||
/**
|
/**
|
||||||
* This is used in the UI, it is not updated or sent to Backend
|
* This is used in the UI, it is not updated or sent to Backend
|
||||||
|
@ -282,7 +282,7 @@ export class EditSeriesModalComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.seriesVolumes.forEach(vol => {
|
this.seriesVolumes.forEach(vol => {
|
||||||
vol.volumeFiles = vol.chapters?.sort(this.utilityService.sortChapters).map((c: Chapter) => c.files.map((f: any) => {
|
vol.volumeFiles = vol.chapters?.sort(this.utilityService.sortChapters).map((c: Chapter) => c.files.map((f: any) => {
|
||||||
f.chapter = c.minNumber;
|
f.chapter = c.number;
|
||||||
return f;
|
return f;
|
||||||
})).flat();
|
})).flat();
|
||||||
});
|
});
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
<span>
|
<span>
|
||||||
<app-card-actionables (actionHandler)="performAction($event, chapter)" [actions]="chapterActions"
|
<app-card-actionables (actionHandler)="performAction($event, chapter)" [actions]="chapterActions"
|
||||||
[labelBy]="utilityService.formatChapterName(libraryType, true, true) + formatChapterNumber(chapter)"></app-card-actionables>
|
[labelBy]="utilityService.formatChapterName(libraryType, true, true) + formatChapterNumber(chapter)"></app-card-actionables>
|
||||||
<ng-container *ngIf="chapter.minNumber !== '0'; else specialHeader">
|
<ng-container *ngIf="chapter.number !== '0'; else specialHeader">
|
||||||
{{utilityService.formatChapterName(libraryType, true, false) }} {{formatChapterNumber(chapter)}}
|
{{utilityService.formatChapterName(libraryType, true, false) }} {{formatChapterNumber(chapter)}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</span>
|
</span>
|
||||||
|
@ -182,10 +182,10 @@ export class CardDetailDrawerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
formatChapterNumber(chapter: Chapter) {
|
formatChapterNumber(chapter: Chapter) {
|
||||||
if (chapter.minNumber === '0') {
|
if (chapter.number === '0') {
|
||||||
return '1';
|
return '1';
|
||||||
}
|
}
|
||||||
return chapter.minNumber;
|
return chapter.number;
|
||||||
}
|
}
|
||||||
|
|
||||||
performAction(action: ActionItem<any>, chapter: Chapter) {
|
performAction(action: ActionItem<any>, chapter: Chapter) {
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
<ng-template #fullComicTitle>
|
<ng-template #fullComicTitle>
|
||||||
{{seriesName.length > 0 ? seriesName + ' - ' : ''}}
|
{{seriesName.length > 0 ? seriesName + ' - ' : ''}}
|
||||||
<ng-container *ngIf="includeVolume && volumeTitle !== ''">
|
<ng-container *ngIf="includeVolume && volumeTitle !== ''">
|
||||||
{{entity.minNumber !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
|
{{Number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
{{entity.minNumber !== 0 ? (isChapter ? t('issue-num') + entity.minNumber : volumeTitle) : t('special')}}
|
{{Number !== 0 ? (isChapter ? t('issue-num') + Number : volumeTitle) : t('special')}}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngSwitchCase="LibraryType.Manga">
|
<ng-container *ngSwitchCase="LibraryType.Manga">
|
||||||
@ -19,9 +19,9 @@
|
|||||||
<ng-template #fullMangaTitle>
|
<ng-template #fullMangaTitle>
|
||||||
{{seriesName.length > 0 ? seriesName + ' - ' : ''}}
|
{{seriesName.length > 0 ? seriesName + ' - ' : ''}}
|
||||||
<ng-container *ngIf="includeVolume && volumeTitle !== ''">
|
<ng-container *ngIf="includeVolume && volumeTitle !== ''">
|
||||||
{{entity.minNumber !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
|
{{Number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
{{entity.minNumber !== 0 ? (isChapter ? (t('chapter') + ' ') + entity.minNumber : volumeTitle) : t('special')}}
|
{{Number !== 0 ? (isChapter ? (t('chapter') + ' ') + Number : volumeTitle) : t('special')}}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngSwitchCase="LibraryType.Book">
|
<ng-container *ngSwitchCase="LibraryType.Book">
|
||||||
|
@ -39,6 +39,10 @@ export class EntityTitleComponent implements OnInit {
|
|||||||
titleName: string = '';
|
titleName: string = '';
|
||||||
volumeTitle: string = '';
|
volumeTitle: string = '';
|
||||||
|
|
||||||
|
get Number() {
|
||||||
|
if (this.utilityService.isVolume(this.entity)) return (this.entity as Volume).minNumber;
|
||||||
|
return (this.entity as Chapter).number;
|
||||||
|
}
|
||||||
|
|
||||||
get LibraryType() {
|
get LibraryType() {
|
||||||
return LibraryType;
|
return LibraryType;
|
||||||
|
@ -226,7 +226,7 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||||||
/**
|
/**
|
||||||
* Track by function for Chapter to tell when to refresh card data
|
* Track by function for Chapter to tell when to refresh card data
|
||||||
*/
|
*/
|
||||||
trackByChapterIdentity = (index: number, item: Chapter) => `${item.title}_${item.minNumber}_${item.volumeId}_${item.pagesRead}`;
|
trackByChapterIdentity = (index: number, item: Chapter) => `${item.title}_${item.number}_${item.volumeId}_${item.pagesRead}`;
|
||||||
trackByRelatedSeriesIdentify = (index: number, item: RelatedSeriesPair) => `${item.series.name}_${item.series.libraryId}_${item.series.pagesRead}_${item.relation}`;
|
trackByRelatedSeriesIdentify = (index: number, item: RelatedSeriesPair) => `${item.series.name}_${item.series.libraryId}_${item.series.pagesRead}_${item.relation}`;
|
||||||
trackBySeriesIdentify = (index: number, item: Series) => `${item.name}_${item.libraryId}_${item.pagesRead}`;
|
trackBySeriesIdentify = (index: number, item: Series) => `${item.name}_${item.libraryId}_${item.pagesRead}`;
|
||||||
trackByStoryLineIdentity = (index: number, item: StoryLineItem) => {
|
trackByStoryLineIdentity = (index: number, item: StoryLineItem) => {
|
||||||
@ -341,13 +341,13 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||||||
|
|
||||||
// This is a lone chapter
|
// This is a lone chapter
|
||||||
if (vol.length === 0) {
|
if (vol.length === 0) {
|
||||||
return 'Ch ' + this.currentlyReadingChapter.minNumber;
|
return 'Ch ' + this.currentlyReadingChapter.number;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.currentlyReadingChapter.minNumber === "0") {
|
if (this.currentlyReadingChapter.number === "0") {
|
||||||
return 'Vol ' + vol[0].minNumber;
|
return 'Vol ' + vol[0].minNumber;
|
||||||
}
|
}
|
||||||
return 'Vol ' + vol[0].minNumber + ' Ch ' + this.currentlyReadingChapter.minNumber;
|
return 'Vol ' + vol[0].minNumber + ' Ch ' + this.currentlyReadingChapter.number;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.currentlyReadingChapter.title;
|
return this.currentlyReadingChapter.title;
|
||||||
|
@ -115,7 +115,7 @@ export class DownloadService {
|
|||||||
case 'volume':
|
case 'volume':
|
||||||
return (downloadEntity as Volume).minNumber + '';
|
return (downloadEntity as Volume).minNumber + '';
|
||||||
case 'chapter':
|
case 'chapter':
|
||||||
return (downloadEntity as Chapter).minNumber;
|
return (downloadEntity as Chapter).number;
|
||||||
case 'bookmark':
|
case 'bookmark':
|
||||||
return '';
|
return '';
|
||||||
case 'logs':
|
case 'logs':
|
||||||
|
@ -43,7 +43,7 @@ export class UtilityService {
|
|||||||
|
|
||||||
|
|
||||||
sortChapters = (a: Chapter, b: Chapter) => {
|
sortChapters = (a: Chapter, b: Chapter) => {
|
||||||
return parseFloat(a.minNumber) - parseFloat(b.minNumber);
|
return parseFloat(a.number) - parseFloat(b.number);
|
||||||
}
|
}
|
||||||
|
|
||||||
mangaFormatToText(format: MangaFormat): string {
|
mangaFormatToText(format: MangaFormat): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user