From ca1e7ee6e3a5080d87fe2b479d2160ea59d2d4d5 Mon Sep 17 00:00:00 2001 From: Muppetteer Date: Tue, 9 Dec 2025 07:10:51 +1100 Subject: [PATCH] Improve metadata edit UI (#1792) --- .../metadata-editor.component.html | 257 +++++++++--------- .../metadata-editor.component.scss | 32 +++ .../metadata-editor.component.ts | 2 - 3 files changed, 162 insertions(+), 129 deletions(-) diff --git a/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.html b/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.html index 5dac863ab..29a6f378c 100644 --- a/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.html +++ b/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.html @@ -1,17 +1,17 @@ @if (book$ | async; as book) { -
+ @if (isLoading) {
} @if (isLoading) { } -
-
-
+
+
+
-
+
-
- +
+ @if (!book.metadata!['titleLocked']) { - + } @if (book.metadata!['titleLocked']) { - + }
-
+ +
-
- +
+ @if (!book.metadata!['subtitleLocked']) { - + } @if (book.metadata!['subtitleLocked']) { - + + } +
+
+ +
+ +
+ + @if (!book.metadata!['languageLocked']) { + + } + @if (book.metadata!['languageLocked']) { + }
-
+
-
+
@if (!book.metadata!['authorsLocked']) { - + } @if (book.metadata!['authorsLocked']) { - + }
-
+
-
+
@if (!book.metadata!['publisherLocked']) { - + } @if (book.metadata!['publisherLocked']) { - + }
-
- -
- - @if (!book.metadata!['languageLocked']) { - +
+ +
+ + + @if (!book.metadata!['publishedDateLocked']) { + } - @if (book.metadata!['languageLocked']) { - + @if (book.metadata!['publishedDateLocked']) { + }
@@ -162,7 +188,7 @@
-
+
@if (!book.metadata!['categoriesLocked']) { - + } @if (book.metadata!['categoriesLocked']) { - + }
@@ -190,7 +216,7 @@
-
+
@if (!book.metadata!['moodsLocked']) { - + } @if (book.metadata!['moodsLocked']) { - + }
@@ -217,7 +243,7 @@
-
+
@if (!book.metadata!['tagsLocked']) { - + } @if (book.metadata!['tagsLocked']) { - + }
@@ -245,9 +271,8 @@
-
+
@if (!book.metadata!['seriesNameLocked']) { - + } @if (book.metadata!['seriesNameLocked']) { - + }
-
- -
- +
+ +
+ @if (!book.metadata!['seriesNumberLocked']) { - + } @if (book.metadata!['seriesNumberLocked']) { - + }
-
- -
- +
+ +
+ @if (!book.metadata!['seriesTotalLocked']) { - + } @if (book.metadata!['seriesTotalLocked']) { - + }
-
+
-
- +
+ @if (!book.metadata!['pageCountLocked']) { - + } @if (book.metadata!['pageCountLocked']) { - - } -
-
- -
- -
- - - @if (!book.metadata!['publishedDateLocked']) { - - } - @if (book.metadata!['publishedDateLocked']) { - + }
+
+
-
+
@if (!book.metadata!['reviewsLocked']) { @@ -348,7 +350,7 @@
-
+
@if (!book.metadata!['isbn10Locked']) { @@ -360,7 +362,7 @@
-
+
@if (!book.metadata!['isbn13Locked']) { @@ -371,8 +373,8 @@
- -
+ +
@if (!book.metadata!['asinLocked']) { @@ -384,7 +386,7 @@
-
+
@if (!book.metadata!['amazonRatingLocked']) { @@ -395,8 +397,8 @@
- -
+ +
@if (!book.metadata!['amazonReviewCountLocked']) { @@ -408,7 +410,7 @@
-
+
@if (!book.metadata!['googleIdLocked']) { @@ -423,7 +425,7 @@
-
+
@if (!book.metadata!['goodreadsIdLocked']) { @@ -435,7 +437,7 @@
-
+
@if (!book.metadata!['goodreadsRatingLocked']) { @@ -446,8 +448,8 @@
- -
+ +
@if (!book.metadata!['goodreadsReviewCountLocked']) { @@ -459,7 +461,7 @@
-
+
@if (!book.metadata!['hardcoverIdLocked']) { @@ -471,7 +473,7 @@
-
+
@if (!book.metadata!['hardcoverRatingLocked']) { @@ -482,8 +484,8 @@
- -
+ +
@if (!book.metadata!['hardcoverReviewCountLocked']) { @@ -495,7 +497,7 @@
-
+
@if (!book.metadata!['comicvineIdLocked']) { @@ -506,26 +508,27 @@
-
-
-
- - - - - @if (!book.metadata!['descriptionLocked']) { - - } - @if (book.metadata!['descriptionLocked']) { - - } -
+ +
+
+ +
+ + @if (!book.metadata!['descriptionLocked']) { + + } + @if (book.metadata!['descriptionLocked']) { + + } +
+
+
diff --git a/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.scss b/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.scss index 918a9e3dd..3e98056eb 100644 --- a/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.scss +++ b/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.scss @@ -6,6 +6,38 @@ } } +::ng-deep p-image { + width: 250px; +} + +::ng-deep p-image img { + margin: 0 auto; +} + ::ng-deep .p-autocomplete .p-chip .p-chip-label { font-size: 12px; } + +::ng-deep .p-autocomplete-input-chip { + width: 7rem; +} + +::ng-deep .withbutton input, +::ng-deep .withbutton ul { + border-radius: 6px 0 0 6px; +} + +.withbutton textarea { + border-radius: 6px 0 6px 6px; +} + +::ng-deep .withbutton button { + border-color: var(--p-inputtext-border-color) !important; + border-radius: 0 6px 6px 0 !important; + border-left: 0px !important; +} + +label { + color: var(--text-color-secondary); + white-space: nowrap; +} diff --git a/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.ts b/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.ts index 200051979..786d86b2a 100644 --- a/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.ts +++ b/booklore-ui/src/app/features/metadata/component/book-metadata-center/metadata-editor/metadata-editor.component.ts @@ -20,7 +20,6 @@ import {MetadataRefreshType} from "../../../model/request/metadata-refresh-type. import {AutoComplete} from "primeng/autocomplete"; import {DatePicker} from "primeng/datepicker"; import {Textarea} from "primeng/textarea"; -import {IftaLabel} from "primeng/iftalabel"; import {Image} from "primeng/image"; import {LazyLoadImageModule} from "ng-lazyload-image"; import {CoverSearchComponent} from '../../cover-search/cover-search.component'; @@ -44,7 +43,6 @@ import {TaskHelperService} from '../../../../settings/task-management/task-helpe AutoComplete, DatePicker, Textarea, - IftaLabel, Image, LazyLoadImageModule, ],