Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

1.4 KB
Raw Blame
<ng-container *transloco="let t; read: 'entity-title'">
  <ng-container [ngSwitch]="libraryType">
    <ng-container *ngSwitchCase="LibraryType.Comic">
      <ng-container *ngIf="titleName !== '' && prioritizeTitleName; else fullComicTitle">
        {{titleName}}
      </ng-container>
      <ng-template #fullComicTitle>
        {{seriesName.length > 0 ? seriesName + ' - ' : ''}}
        <ng-container *ngIf="includeVolume && volumeTitle !== ''">
          {{entity.number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
        </ng-container>
        {{entity.number !== 0 ? (isChapter ? t('issue-num') + entity.number : volumeTitle) : t('special')}}
      </ng-template>
    </ng-container>
    <ng-container *ngSwitchCase="LibraryType.Manga">
      <ng-container *ngIf="titleName !== '' && prioritizeTitleName; else fullMangaTitle">
        {{titleName}}
      </ng-container>
      <ng-template #fullMangaTitle>
        {{seriesName.length > 0 ? seriesName + ' - ' : ''}}
        <ng-container *ngIf="includeVolume && volumeTitle !== ''">
          {{entity.number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
        </ng-container>
        {{entity.number !== 0 ? (isChapter ? (t('chapter') + ' ')  + entity.number : volumeTitle) : t('special')}}
      </ng-template>
    </ng-container>
    <ng-container *ngSwitchCase="LibraryType.Book">
      {{volumeTitle}}
    </ng-container>
  </ng-container>
</ng-container>