Metadata Editing from the UI! (#1135)

* 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>
This commit is contained in:
Joseph Milazzo 2022-03-04 15:04:15 -06:00 committed by GitHub
parent 47a92a2e01
commit ba77954d5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 3605 additions and 723 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,224 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Data.Migrations
{
public partial class SeriesLockedFields : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "AgeRatingLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "CharacterLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "ColoristLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "CoverArtistLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "EditorLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "GenresLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "InkerLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "LanguageLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "LettererLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "PencillerLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "PublicationStatusLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "PublisherLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "SummaryLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "TagsLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "TranslatorLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "WriterLocked",
table: "SeriesMetadata",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "LocalizedNameLocked",
table: "Series",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "NameLocked",
table: "Series",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "SortNameLocked",
table: "Series",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AgeRatingLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "CharacterLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "ColoristLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "CoverArtistLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "EditorLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "GenresLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "InkerLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "LanguageLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "LettererLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "PencillerLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "PublicationStatusLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "PublisherLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "SummaryLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "TagsLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "TranslatorLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "WriterLocked",
table: "SeriesMetadata");
migrationBuilder.DropColumn(
name: "LocalizedNameLocked",
table: "Series");
migrationBuilder.DropColumn(
name: "NameLocked",
table: "Series");
migrationBuilder.DropColumn(
name: "SortNameLocked",
table: "Series");
}
}
}

View file

@ -15,7 +15,7 @@ namespace API.Data.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
modelBuilder.HasAnnotation("ProductVersion", "6.0.2");
modelBuilder.Entity("API.Entities.AppRole", b =>
{
@ -502,15 +502,51 @@ namespace API.Data.Migrations
b.Property<int>("AgeRating")
.HasColumnType("INTEGER");
b.Property<bool>("AgeRatingLocked")
.HasColumnType("INTEGER");
b.Property<bool>("CharacterLocked")
.HasColumnType("INTEGER");
b.Property<bool>("ColoristLocked")
.HasColumnType("INTEGER");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.Property<bool>("CoverArtistLocked")
.HasColumnType("INTEGER");
b.Property<bool>("EditorLocked")
.HasColumnType("INTEGER");
b.Property<bool>("GenresLocked")
.HasColumnType("INTEGER");
b.Property<bool>("InkerLocked")
.HasColumnType("INTEGER");
b.Property<string>("Language")
.HasColumnType("TEXT");
b.Property<bool>("LanguageLocked")
.HasColumnType("INTEGER");
b.Property<bool>("LettererLocked")
.HasColumnType("INTEGER");
b.Property<bool>("PencillerLocked")
.HasColumnType("INTEGER");
b.Property<int>("PublicationStatus")
.HasColumnType("INTEGER");
b.Property<bool>("PublicationStatusLocked")
.HasColumnType("INTEGER");
b.Property<bool>("PublisherLocked")
.HasColumnType("INTEGER");
b.Property<int>("ReleaseYear")
.HasColumnType("INTEGER");
@ -524,6 +560,18 @@ namespace API.Data.Migrations
b.Property<string>("Summary")
.HasColumnType("TEXT");
b.Property<bool>("SummaryLocked")
.HasColumnType("INTEGER");
b.Property<bool>("TagsLocked")
.HasColumnType("INTEGER");
b.Property<bool>("TranslatorLocked")
.HasColumnType("INTEGER");
b.Property<bool>("WriterLocked")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SeriesId")
@ -647,9 +695,15 @@ namespace API.Data.Migrations
b.Property<string>("LocalizedName")
.HasColumnType("TEXT");
b.Property<bool>("LocalizedNameLocked")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<bool>("NameLocked")
.HasColumnType("INTEGER");
b.Property<string>("NormalizedName")
.HasColumnType("TEXT");
@ -662,6 +716,9 @@ namespace API.Data.Migrations
b.Property<string>("SortName")
.HasColumnType("TEXT");
b.Property<bool>("SortNameLocked")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("LibraryId");