mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-30 19:54:14 -04:00
* Added the skeleton code for layout, hooked up Age Rating, Publication Status, and Tags * Tweaked message of Scan service to Finished scan of to better indicate the total scan time * Hooked in foundation for person typeaheads * Fixed people not populating typeaheads on load * For manga/comics, when parsing, set the SeriesSort from ComicInfo if it exists. * Implemented the ability to override and create new genre tags. Code is ready to flush out the rest. * Ability to update metadata from the UI is hooked up. Next is locking. * Updated typeahead to allow for non-multiple usage. Implemented ability to update Language tag in Series Metadata. * Fixed a bug in GetContinuePoint for a case where we have Volumes, Loose Leaf chapters and no read progress. * Added ETag headers on Images to allow for better caching (bookmarks and images in manga reader) * Built out UI code to show locked indication to user * Implemented Series locking and refactored a lot of styles in typeahead to make the lock setting work, plus misc cleanup. * Added locked properties to dtos. Updated typeahead loading indicator to not interfere with close button if present * Hooked up locking flags in UI * Integrated regular field locking/unlocking * Removed some old code * Prevent input group from wrapping * Implemented some basic layout for metadata on volume/chapter card modal. Refactored out all metadata from Chapter object in terms of UI and put into a separate call to ensure speedy delivery and simplicity of code. * Refactored code to hide covers section if not an admin * Implemented ability to modify a chapter/volume cover from the detail modal * Removed a few variables and change cover image modal * Added bookmark to single chapter view * Put a temp fix in for a ngb v12 z-index bug (reported). Bumped ngb to 12.0 stable and fixed some small rendering bugs * loading buttons ftw * Lots of cleanup, looks like the story is finished * Changed action name from Info to Details * Style tweaks * Fixed an issue where Summary would assume it's locked due to a subscription firing on setting the model * Fixed some misc bugs * Code smells Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
66 lines
2.3 KiB
C#
66 lines
2.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using API.DTOs.Metadata;
|
|
|
|
namespace API.DTOs
|
|
{
|
|
/// <summary>
|
|
/// A Chapter is the lowest grouping of a reading medium. A Chapter contains a set of MangaFiles which represents the underlying
|
|
/// file (abstracted from type).
|
|
/// </summary>
|
|
public class ChapterDto
|
|
{
|
|
public int Id { get; init; }
|
|
/// <summary>
|
|
/// Range of chapters. Chapter 2-4 -> "2-4". Chapter 2 -> "2".
|
|
/// </summary>
|
|
public string Range { get; init; }
|
|
/// <summary>
|
|
/// Smallest number of the Range.
|
|
/// </summary>
|
|
public string Number { get; init; }
|
|
/// <summary>
|
|
/// Total number of pages in all MangaFiles
|
|
/// </summary>
|
|
public int Pages { get; init; }
|
|
/// <summary>
|
|
/// If this Chapter contains files that could only be identified as Series or has Special Identifier from filename
|
|
/// </summary>
|
|
public bool IsSpecial { get; init; }
|
|
/// <summary>
|
|
/// Used for books/specials to display custom title. For non-specials/books, will be set to <see cref="Range"/>
|
|
/// </summary>
|
|
public string Title { get; set; }
|
|
/// <summary>
|
|
/// The files that represent this Chapter
|
|
/// </summary>
|
|
public ICollection<MangaFileDto> Files { get; init; }
|
|
/// <summary>
|
|
/// Calculated at API time. Number of pages read for this Chapter for logged in user.
|
|
/// </summary>
|
|
public int PagesRead { get; set; }
|
|
/// <summary>
|
|
/// If the Cover Image is locked for this entity
|
|
/// </summary>
|
|
public bool CoverImageLocked { get; set; }
|
|
/// <summary>
|
|
/// Volume Id this Chapter belongs to
|
|
/// </summary>
|
|
public int VolumeId { get; init; }
|
|
/// <summary>
|
|
/// When chapter was created
|
|
/// </summary>
|
|
public DateTime Created { get; init; }
|
|
/// <summary>
|
|
/// When the chapter was released.
|
|
/// </summary>
|
|
/// <remarks>Metadata field</remarks>
|
|
public DateTime ReleaseDate { get; init; }
|
|
/// <summary>
|
|
/// Title of the Chapter/Issue
|
|
/// </summary>
|
|
/// <remarks>Metadata field</remarks>
|
|
public string TitleName { get; set; }
|
|
}
|
|
}
|