v0.8.3.2 - A Small Hotfix (#3194)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: Havokdan <havokdan@yahoo.com.br>
Co-authored-by: daydreamrabbit <devrabbit90@gmail.com>
Co-authored-by: 無情天 <kofzhanganguo@126.com>
This commit is contained in:
Joe Milazzo 2024-09-20 16:18:42 -05:00 committed by GitHub
parent 77de5ccce3
commit 894b49bb76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 307 additions and 241 deletions

View file

@ -80,7 +80,7 @@
@if (chapter.isSpecial) {
{{chapter.title || chapter.range}}
} @else {
<app-entity-title [entity]="chapter" [prioritizeTitleName]="false"></app-entity-title>
<app-entity-title [entity]="chapter" [prioritizeTitleName]="false" [libraryType]="libraryType"></app-entity-title>
}
</a>
</span>

View file

@ -33,31 +33,50 @@
@case (LibraryType.Manga) {
@if (titleName !== '' && prioritizeTitleName) {
@if (isChapter && includeChapter) {
{{t('chapter') + ' ' + number + ' - ' }}
@if (number === LooseLeafOrSpecial) {
{{t('chapter') + ' - ' }}
} @else {
{{t('chapter') + ' ' + number + ' - ' }}
}
}
{{titleName}}
} @else {
@if (includeVolume && volumeTitle !== '') {
{{number !== LooseLeafOrSpecial ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
@if (number !== LooseLeafOrSpecial && isChapter && includeVolume) {
{{volumeTitle}}
}
}
{{number !== LooseLeafOrSpecial ? (isChapter ? (t('chapter') + ' ') + number : volumeTitle) : t('special')}}
@if (number !== LooseLeafOrSpecial) {
@if (isChapter) {
{{t('chapter') + ' ' + number}}
} @else {
{{volumeTitle}}
}
} @else {
{{t('special')}}
}
}
}
@case (LibraryType.Book) {
@if (titleName !== '' && prioritizeTitleName) {
{{titleName}}
} @else if (number === LooseLeafOrSpecial) {
{{null | defaultValue}}
} @else {
{{volumeTitle}}
{{t('book-num', {num: volumeTitle})}}
}
}
@case (LibraryType.LightNovel) {
@if (titleName !== '' && prioritizeTitleName) {
{{titleName}}
} @else if (number === LooseLeafOrSpecial) {
{{null | defaultValue}}
} @else {
{{volumeTitle}}
{{t('book-num', {num: (isChapter ? number : volumeTitle)})}}
}
}

View file

@ -4,6 +4,7 @@ import { Chapter, LooseLeafOrDefaultNumber } from 'src/app/_models/chapter';
import { LibraryType } from 'src/app/_models/library/library';
import { Volume } from 'src/app/_models/volume';
import {TranslocoModule} from "@jsverse/transloco";
import {DefaultValuePipe} from "../../_pipes/default-value.pipe";
/**
* This is primarily used for list item
@ -12,7 +13,8 @@ import {TranslocoModule} from "@jsverse/transloco";
selector: 'app-entity-title',
standalone: true,
imports: [
TranslocoModule
TranslocoModule,
DefaultValuePipe
],
templateUrl: './entity-title.component.html',
styleUrls: ['./entity-title.component.scss'],
@ -20,7 +22,6 @@ import {TranslocoModule} from "@jsverse/transloco";
})
export class EntityTitleComponent implements OnInit {
protected readonly LooseLeafOrSpecialNumber = LooseLeafOrDefaultNumber;
protected readonly LooseLeafOrSpecial = LooseLeafOrDefaultNumber + "";
protected readonly LibraryType = LibraryType;
@ -59,6 +60,7 @@ export class EntityTitleComponent implements OnInit {
this.volumeTitle = c.volumeTitle || '';
this.titleName = c.titleName || '';
this.number = c.range;
} else {
const v = this.utilityService.asVolume(this.entity);
this.volumeTitle = v.name || '';