Remove Tailwind CSS and all remaining references (#2413)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
committed by
acx10
co-authored by
acx10
parent
5d9e535a14
commit
a0870cac86
+2
-2
@@ -18,7 +18,7 @@
|
||||
</p-button>
|
||||
</div>
|
||||
}
|
||||
<div class="rounded-xl overflow-hidden border-[1px] border-solid border-[var(--p-content-border-color)]" [class.dialog-mode]="config">
|
||||
<div class="tabs-wrapper" [class.dialog-mode]="config">
|
||||
<p-tabs [(value)]="tab" lazy="true" scrollable>
|
||||
<p-tablist>
|
||||
<p-tab value="view">
|
||||
@@ -38,7 +38,7 @@
|
||||
</p-tab>
|
||||
}
|
||||
</p-tablist>
|
||||
<p-tabpanels class="tabpanels-responsive overflow-auto">
|
||||
<p-tabpanels class="tabpanels-responsive">
|
||||
<p-tabpanel value="view">
|
||||
<app-metadata-viewer
|
||||
[book$]="book$"
|
||||
|
||||
+10
@@ -11,11 +11,21 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tabs-wrapper {
|
||||
border-radius: 0.75rem;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.dialog-mode {
|
||||
border-radius: 0 0 0.75rem 0.75rem !important;
|
||||
border-width: 1px 0 0 !important;
|
||||
}
|
||||
|
||||
.tabpanels-responsive {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::ng-deep .layout-main .tabpanels-responsive {
|
||||
height: calc(100dvh - 9.7rem);
|
||||
}
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@
|
||||
pTooltip="Go to previous book"
|
||||
tooltipPosition="bottom">
|
||||
</p-button>
|
||||
<span class="text-sm text-surface-600 dark:text-surface-400">
|
||||
<span class="navigation-position">
|
||||
{{ getNavigationPosition() }}
|
||||
</span>
|
||||
<p-button
|
||||
@@ -537,7 +537,7 @@
|
||||
pTooltip="Go to previous book"
|
||||
tooltipPosition="bottom">
|
||||
</p-button>
|
||||
<span class="text-sm text-surface-600 dark:text-surface-400">
|
||||
<span class="navigation-position">
|
||||
{{ getNavigationPosition() }}
|
||||
</span>
|
||||
<p-button
|
||||
|
||||
+5
@@ -680,3 +680,8 @@
|
||||
::ng-deep .p-inputchips {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.navigation-position {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary-color);
|
||||
}
|
||||
|
||||
+84
-84
@@ -17,29 +17,29 @@
|
||||
</p-button>
|
||||
</div>
|
||||
|
||||
<div class="dialog-content relative">
|
||||
<div class="dialog-content">
|
||||
@if (loading) {
|
||||
<div class="absolute inset-0 z-50 flex items-center justify-center bg-black/60">
|
||||
<div class="loading-overlay">
|
||||
<p-progressSpinner></p-progressSpinner>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="p-4 border border-gray-700 rounded-md mb-4 bg-gray-900 text-gray-200">
|
||||
<div class="flex justify-between items-center mb-2">
|
||||
<p class="text-base font-semibold">
|
||||
<div class="info-box">
|
||||
<div class="info-header">
|
||||
<p class="info-title">
|
||||
Editing {{ books.length }} Book{{ books.length !== 1 ? 's' : '' }}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
(click)="showBookList = !showBookList"
|
||||
class="text-sm text-sky-400 hover:underline">
|
||||
class="toggle-list-btn">
|
||||
{{ showBookList ? 'Hide' : 'Show' }} Titles
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (showBookList) {
|
||||
<div class="max-h-48 overflow-y-auto border-t border-gray-700 pt-2 pl-1 text-sm text-gray-300">
|
||||
<ul class="list-disc pl-5 space-y-1">
|
||||
<div class="book-list-panel">
|
||||
<ul class="book-list">
|
||||
@for (book of books; track book) {
|
||||
<li>{{ book.metadata?.title || 'Untitled Book' }}</li>
|
||||
}
|
||||
@@ -48,31 +48,31 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="px-4 text-sm text-yellow-500 mb-2">
|
||||
<i class="pi pi-exclamation-triangle mr-1"></i>
|
||||
<div class="warning-text">
|
||||
<i class="pi pi-exclamation-triangle warning-icon"></i>
|
||||
Checking <strong>Clear</strong> will remove that field's metadata from <strong>all selected books</strong>.
|
||||
</div>
|
||||
|
||||
<form [formGroup]="metadataForm" (ngSubmit)="onSubmit()" (keydown)="onFormKeydown($event)" class="flex flex-col gap-4 w-full p-4">
|
||||
<form [formGroup]="metadataForm" (ngSubmit)="onSubmit()" (keydown)="onFormKeydown($event)" class="bulk-form">
|
||||
|
||||
<div class="flex justify-between gap-7">
|
||||
<div class="form-row">
|
||||
<!-- Authors -->
|
||||
<div class="flex flex-col gap-2 w-full md:basis-[80%]">
|
||||
<label for="authors" class="flex items-center justify-between gap-2">
|
||||
<span class="flex items-center gap-2">
|
||||
<div class="field-group field-group--wide">
|
||||
<label for="authors" class="field-label-row">
|
||||
<span class="field-label-text">
|
||||
Author(s)
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
<i class="pi pi-info-circle info-icon"
|
||||
pTooltip="Enter multiple authors. Press Enter after typing each name."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer"></i>
|
||||
</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.authors" [ngModelOptions]="{standalone: true}" (onChange)="onFieldClearToggle('authors')" binary="true" inputId="clearAuthors"/>
|
||||
<label for="clearAuthors" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearAuthors" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-autoComplete
|
||||
class="w-full"
|
||||
class="full-width"
|
||||
id="authors"
|
||||
formControlName="authors"
|
||||
[disabled]="clearFields.authors"
|
||||
@@ -87,33 +87,33 @@
|
||||
</div>
|
||||
|
||||
<!-- Language -->
|
||||
<div class="flex flex-col gap-2 md:basis-[20%]">
|
||||
<label for="language" class="flex items-center justify-between gap-2">
|
||||
<div class="field-group field-group--narrow">
|
||||
<label for="language" class="field-label-row">
|
||||
<span>Language</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.language" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('language')" binary="true" inputId="clearLanguage"/>
|
||||
<label for="clearLanguage" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearLanguage" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<input pInputText id="language" formControlName="language" [disabled]="clearFields.language" class="w-full"/>
|
||||
<input pInputText id="language" formControlName="language" [disabled]="clearFields.language" class="full-width"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between gap-7">
|
||||
<div class="form-row">
|
||||
<!-- Publisher -->
|
||||
<div class="flex flex-col gap-2 w-full md:basis-[80%]">
|
||||
<label for="publisher" class="flex items-center justify-between gap-2">
|
||||
<div class="field-group field-group--wide">
|
||||
<label for="publisher" class="field-label-row">
|
||||
<span>Publisher</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.publisher" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('publisher')" binary="true" inputId="clearPublisher"/>
|
||||
<label for="clearPublisher" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearPublisher" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-autoComplete
|
||||
class="w-full"
|
||||
inputStyleClass="w-full"
|
||||
class="full-width"
|
||||
inputStyleClass="full-width"
|
||||
formControlName="publisher"
|
||||
inputId="publisher"
|
||||
[disabled]="clearFields.publisher"
|
||||
@@ -127,17 +127,17 @@
|
||||
</div>
|
||||
|
||||
<!-- Published Date -->
|
||||
<div class="flex flex-col gap-2 md:basis-[20%]">
|
||||
<label for="publishedDate" class="flex items-center justify-between gap-2">
|
||||
<div class="field-group field-group--narrow">
|
||||
<label for="publishedDate" class="field-label-row">
|
||||
<span>Published Date</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.publishedDate" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('publishedDate')" binary="true" inputId="clearPublishedDate"/>
|
||||
<label for="clearPublishedDate" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearPublishedDate" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-datepicker
|
||||
class="w-full md:min-w-[9rem]"
|
||||
class="full-width datepicker-min-width"
|
||||
formControlName="publishedDate"
|
||||
inputId="publishedDate"
|
||||
dataType="string"
|
||||
@@ -152,20 +152,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between gap-7">
|
||||
<div class="form-row">
|
||||
<!-- Series Name -->
|
||||
<div class="flex flex-col gap-2 w-full md:basis-[80%]">
|
||||
<label for="seriesName" class="flex items-center justify-between gap-2">
|
||||
<div class="field-group field-group--wide">
|
||||
<label for="seriesName" class="field-label-row">
|
||||
<span>Series Name</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.seriesName" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('seriesName')" binary="true" inputId="clearSeriesName"/>
|
||||
<label for="clearSeriesName" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearSeriesName" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-autoComplete
|
||||
class="w-full"
|
||||
inputStyleClass="w-full"
|
||||
class="full-width"
|
||||
inputStyleClass="full-width"
|
||||
formControlName="seriesName"
|
||||
inputId="seriesName"
|
||||
[disabled]="clearFields.seriesName"
|
||||
@@ -179,44 +179,44 @@
|
||||
</div>
|
||||
|
||||
<!-- Series Total -->
|
||||
<div class="flex flex-col gap-2 md:basis-[20%]">
|
||||
<label for="seriesTotal" class="flex items-center justify-between gap-2">
|
||||
<span class="flex items-center gap-2">
|
||||
<div class="field-group field-group--narrow">
|
||||
<label for="seriesTotal" class="field-label-row">
|
||||
<span class="field-label-text">
|
||||
Total Books
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
<i class="pi pi-info-circle info-icon"
|
||||
pTooltip="Total number of books in the series."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer"></i>
|
||||
</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.seriesTotal" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('seriesTotal')" binary="true" inputId="clearSeriesTotal"/>
|
||||
<label for="clearSeriesTotal" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearSeriesTotal" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<input pInputText id="seriesTotal" type="number" min="1" formControlName="seriesTotal"
|
||||
[disabled]="clearFields.seriesTotal" class="w-full"/>
|
||||
[disabled]="clearFields.seriesTotal" class="full-width"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Genres -->
|
||||
<div class="flex flex-col gap-2">
|
||||
<label for="genres" class="flex items-center justify-between gap-2">
|
||||
<span class="flex items-center gap-2">
|
||||
<div class="field-group">
|
||||
<label for="genres" class="field-label-row">
|
||||
<span class="field-label-text">
|
||||
Genre(s)
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
<i class="pi pi-info-circle info-icon"
|
||||
pTooltip="Enter multiple genres. Press Enter after typing each genre."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer"></i>
|
||||
</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.genres" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('genres')" binary="true" inputId="clearGenres"/>
|
||||
<label for="clearGenres" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearGenres" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-autoComplete
|
||||
class="w-full"
|
||||
class="full-width"
|
||||
id="genres"
|
||||
formControlName="genres"
|
||||
[disabled]="clearFields.genres"
|
||||
@@ -229,7 +229,7 @@
|
||||
(onSelect)="onAutoCompleteSelect('genres', $event)">
|
||||
</p-autoComplete>
|
||||
|
||||
<div class="flex items-center gap-2 mt-2">
|
||||
<div class="merge-option">
|
||||
<p-checkbox
|
||||
inputId="mergeCategories"
|
||||
name="mergeCategories"
|
||||
@@ -237,30 +237,30 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
binary="true"
|
||||
/>
|
||||
<label for="mergeCategories" class="text-sm text-gray-300 cursor-pointer">
|
||||
<label for="mergeCategories" class="clear-label">
|
||||
Keep existing genres and add new ones (uncheck to remove all existing genres)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Moods -->
|
||||
<div class="flex flex-col gap-2">
|
||||
<label for="moods" class="flex items-center justify-between gap-2">
|
||||
<span class="flex items-center gap-2">
|
||||
<div class="field-group">
|
||||
<label for="moods" class="field-label-row">
|
||||
<span class="field-label-text">
|
||||
Mood(s)
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
<i class="pi pi-info-circle info-icon"
|
||||
pTooltip="Enter multiple moods. Press Enter after typing each mood."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer"></i>
|
||||
</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.moods" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('moods')" binary="true" inputId="clearMoods"/>
|
||||
<label for="clearMoods" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearMoods" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-autoComplete
|
||||
class="w-full"
|
||||
class="full-width"
|
||||
id="moods"
|
||||
formControlName="moods"
|
||||
[disabled]="clearFields.moods"
|
||||
@@ -273,7 +273,7 @@
|
||||
(onSelect)="onAutoCompleteSelect('moods', $event)">
|
||||
</p-autoComplete>
|
||||
|
||||
<div class="flex items-center gap-2 mt-2">
|
||||
<div class="merge-option">
|
||||
<p-checkbox
|
||||
inputId="mergeMoods"
|
||||
name="mergeMoods"
|
||||
@@ -281,30 +281,30 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
binary="true"
|
||||
/>
|
||||
<label for="mergeMoods" class="text-sm text-gray-300 cursor-pointer">
|
||||
<label for="mergeMoods" class="clear-label">
|
||||
Keep existing moods and add new ones (uncheck to remove all existing moods)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tags -->
|
||||
<div class="flex flex-col gap-2">
|
||||
<label for="tags" class="flex items-center justify-between gap-2">
|
||||
<span class="flex items-center gap-2">
|
||||
<div class="field-group">
|
||||
<label for="tags" class="field-label-row">
|
||||
<span class="field-label-text">
|
||||
Tag(s)
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
<i class="pi pi-info-circle info-icon"
|
||||
pTooltip="Enter multiple tags. Press Enter after typing each tag."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer"></i>
|
||||
</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="clear-checkbox">
|
||||
<p-checkbox [(ngModel)]="clearFields.tags" [ngModelOptions]="{standalone: true}"
|
||||
(onChange)="onFieldClearToggle('tags')" binary="true" inputId="clearTags"/>
|
||||
<label for="clearTags" class="text-sm text-gray-300 cursor-pointer">Clear</label>
|
||||
<label for="clearTags" class="clear-label">Clear</label>
|
||||
</div>
|
||||
</label>
|
||||
<p-autoComplete
|
||||
class="w-full"
|
||||
class="full-width"
|
||||
id="tags"
|
||||
formControlName="tags"
|
||||
[disabled]="clearFields.tags"
|
||||
@@ -317,7 +317,7 @@
|
||||
(onSelect)="onAutoCompleteSelect('tags', $event)">
|
||||
</p-autoComplete>
|
||||
|
||||
<div class="flex items-center gap-2 mt-2">
|
||||
<div class="merge-option">
|
||||
<p-checkbox
|
||||
inputId="mergeTags"
|
||||
name="mergeTags"
|
||||
@@ -325,24 +325,24 @@
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
binary="true"
|
||||
/>
|
||||
<label for="mergeTags" class="text-sm text-gray-300 cursor-pointer">
|
||||
<label for="mergeTags" class="clear-label">
|
||||
Keep existing tags and add new ones (uncheck to remove all existing tags)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Cover Image Upload Section -->
|
||||
<div class="flex flex-col gap-2 border border-gray-700 rounded-md p-4 bg-gray-900">
|
||||
<label class="flex items-center gap-2 text-base font-semibold">
|
||||
<div class="cover-section">
|
||||
<label class="cover-label">
|
||||
<i class="pi pi-image"></i>
|
||||
Cover Image
|
||||
</label>
|
||||
<p class="text-sm text-gray-400">
|
||||
<p class="cover-description">
|
||||
Upload an image to set as the cover for all selected books.
|
||||
</p>
|
||||
<div class="flex items-center gap-4 mt-2">
|
||||
<div class="cover-actions">
|
||||
@if (selectedCoverFile) {
|
||||
<div class="flex items-center gap-2 text-sm text-gray-300">
|
||||
<div class="cover-file-info">
|
||||
<i class="pi pi-file-image"></i>
|
||||
<span>{{ selectedCoverFile.name }}</span>
|
||||
<p-button
|
||||
@@ -361,7 +361,7 @@
|
||||
#coverFileInput
|
||||
accept="image/jpeg,image/png,image/webp"
|
||||
(change)="onCoverFileSelect($event)"
|
||||
class="hidden">
|
||||
class="file-input-hidden">
|
||||
<p-button
|
||||
icon="pi pi-upload"
|
||||
label="Select Image"
|
||||
@@ -374,7 +374,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<div class="form-submit">
|
||||
<p-button type="submit" label="Apply to Selected" [disabled]="loading"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
+202
@@ -20,6 +20,208 @@
|
||||
border-top: none;
|
||||
border-radius: 0 0 10px 10px;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loading-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.info-box {
|
||||
padding: 1rem;
|
||||
border: 1px solid #374151;
|
||||
border-radius: 0.375rem;
|
||||
margin-bottom: 1rem;
|
||||
background: #111827;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
.info-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.toggle-list-btn {
|
||||
font-size: 0.875rem;
|
||||
color: #38bdf8;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.book-list-panel {
|
||||
max-height: 12rem;
|
||||
overflow-y: auto;
|
||||
border-top: 1px solid #374151;
|
||||
padding-top: 0.5rem;
|
||||
padding-left: 0.25rem;
|
||||
font-size: 0.875rem;
|
||||
color: #d1d5db;
|
||||
}
|
||||
|
||||
.book-list {
|
||||
list-style-type: disc;
|
||||
padding-left: 1.25rem;
|
||||
|
||||
li + li {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.warning-text {
|
||||
padding: 0 1rem;
|
||||
font-size: 0.875rem;
|
||||
color: #eab308;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.warning-icon {
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.bulk-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1.75rem;
|
||||
}
|
||||
|
||||
.field-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
|
||||
&--wide {
|
||||
width: 100%;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
flex-basis: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
&--narrow {
|
||||
@media (min-width: 768px) {
|
||||
flex-basis: 20%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.field-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.field-label-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
color: #0284c7;
|
||||
}
|
||||
|
||||
.clear-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.clear-label {
|
||||
font-size: 0.875rem;
|
||||
color: #d1d5db;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.datepicker-min-width {
|
||||
@media (min-width: 768px) {
|
||||
min-width: 9rem;
|
||||
}
|
||||
}
|
||||
|
||||
.merge-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.cover-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
border: 1px solid #374151;
|
||||
border-radius: 0.375rem;
|
||||
padding: 1rem;
|
||||
background: #111827;
|
||||
}
|
||||
|
||||
.cover-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cover-description {
|
||||
font-size: 0.875rem;
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.cover-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.cover-file-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
color: #d1d5db;
|
||||
}
|
||||
|
||||
.file-input-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-submit {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
::ng-deep .p-inputchips {
|
||||
|
||||
+2
-2
@@ -181,7 +181,7 @@
|
||||
type="text"
|
||||
pInputText
|
||||
[(ngModel)]="mergeTarget"
|
||||
class="w-full"
|
||||
class="full-width-input"
|
||||
[placeholder]="isSingleValueField(currentMergeType) ? 'e.g., English' : 'e.g., Fiction, Mystery, Thriller'"/>
|
||||
@if (isSingleValueField(currentMergeType)) {
|
||||
<small class="help-text">
|
||||
@@ -254,7 +254,7 @@
|
||||
type="text"
|
||||
pInputText
|
||||
[(ngModel)]="renameTarget"
|
||||
class="w-full"
|
||||
class="full-width-input"
|
||||
[placeholder]="isSingleValueField(currentMergeType) ? 'e.g., Mystery' : 'e.g., Mystery, Detective'"
|
||||
(keyup.enter)="confirmRename()"/>
|
||||
@if (isSingleValueField(currentMergeType)) {
|
||||
|
||||
+4
@@ -497,3 +497,7 @@
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.full-width-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
+47
-47
@@ -1,102 +1,102 @@
|
||||
<div class="flex flex-col space-y-6 p-4">
|
||||
<table class="min-w-full table-auto border-collapse custom-table">
|
||||
<div class="options-container">
|
||||
<table class="custom-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-4 py-1.5 text-left font-semibold text-zinc-300" style="max-width: 70px; width: 70px;">Enabled</th>
|
||||
<th class="px-4 py-1.5 text-left font-semibold text-zinc-300" style="max-width: 127px; width: 127px;">Field</th>
|
||||
<th class="px-4 py-1.5 text-left font-semibold text-zinc-300">
|
||||
<th class="table-header" style="max-width: 70px; width: 70px;">Enabled</th>
|
||||
<th class="table-header" style="max-width: 127px; width: 127px;">Field</th>
|
||||
<th class="table-header">
|
||||
1st Priority
|
||||
<i class="pi pi-question-circle ml-1 text-xs"
|
||||
<i class="pi pi-question-circle help-icon"
|
||||
pTooltip="First choice - always tried first for this field"
|
||||
tooltipPosition="top"></i>
|
||||
</th>
|
||||
<th class="px-4 py-1.5 text-left font-semibold text-zinc-300">
|
||||
<th class="table-header">
|
||||
2nd Priority
|
||||
<i class="pi pi-question-circle ml-1 text-xs"
|
||||
<i class="pi pi-question-circle help-icon"
|
||||
pTooltip="Second choice - used if 1st priority doesn't have data"
|
||||
tooltipPosition="top"></i>
|
||||
</th>
|
||||
<th class="px-4 py-1.5 text-left font-semibold text-zinc-300">
|
||||
<th class="table-header">
|
||||
3rd Priority
|
||||
<i class="pi pi-question-circle ml-1 text-xs"
|
||||
<i class="pi pi-question-circle help-icon"
|
||||
pTooltip="Third choice - used if 1st and 2nd priorities don't have data"
|
||||
tooltipPosition="top"></i>
|
||||
</th>
|
||||
<th class="px-4 py-1.5 text-left font-semibold text-zinc-300">
|
||||
<th class="table-header">
|
||||
4th Priority
|
||||
<i class="pi pi-question-circle ml-1 text-xs"
|
||||
<i class="pi pi-question-circle help-icon"
|
||||
pTooltip="Last fallback option - only used if 1st, 2nd, and 3rd priorities fail or are empty"
|
||||
tooltipPosition="top"></i>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2" style="max-width: 70px; width: 70px;"></td>
|
||||
<td class="px-4 py-2 text-sm text-zinc-400 italic" style="max-width: 127px; width: 127px;">Set All:</td>
|
||||
<td class="px-4 py-2">
|
||||
<td class="table-cell" style="max-width: 70px; width: 70px;"></td>
|
||||
<td class="table-cell set-all-label" style="max-width: 127px; width: 127px;">Set All:</td>
|
||||
<td class="table-cell">
|
||||
<p-select [options]="providersWithClear" [(ngModel)]="bulkP1"
|
||||
(ngModelChange)="setBulkProvider('p1', $event)"
|
||||
placeholder="Set all P1" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<td class="table-cell">
|
||||
<p-select [options]="providersWithClear" [(ngModel)]="bulkP2"
|
||||
(ngModelChange)="setBulkProvider('p2', $event)"
|
||||
placeholder="Set all P2" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<td class="table-cell">
|
||||
<p-select [options]="providersWithClear" [(ngModel)]="bulkP3"
|
||||
(ngModelChange)="setBulkProvider('p3', $event)"
|
||||
placeholder="Set all P3" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<td class="table-cell">
|
||||
<p-select [options]="providersWithClear" [(ngModel)]="bulkP4"
|
||||
(ngModelChange)="setBulkProvider('p4', $event)"
|
||||
placeholder="Set all P4" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (field of nonProviderSpecificFields; track field) {
|
||||
<tr [hidden]="field === 'cover' && !refreshCovers" [class.opacity-50]="!enabledFields[field]">
|
||||
<td class="px-4 py-1.5" style="max-width: 70px; width: 70px;">
|
||||
<tr [hidden]="field === 'cover' && !refreshCovers" [class.row-disabled]="!enabledFields[field]">
|
||||
<td class="table-cell-sm" style="max-width: 70px; width: 70px;">
|
||||
<p-checkbox [(ngModel)]="enabledFields[field]" [binary]="true"
|
||||
pTooltip="Enable this field during metadata fetch"
|
||||
tooltipPosition="top"></p-checkbox>
|
||||
</td>
|
||||
<td class="px-4 py-1.5 text-zinc-200" style="max-width: 127px; width: 127px;">{{ formatLabel(field) }}</td>
|
||||
<td class="px-4 py-1.5">
|
||||
<td class="table-cell-sm field-label" style="max-width: 127px; width: 127px;">{{ formatLabel(field) }}</td>
|
||||
<td class="table-cell-sm">
|
||||
<p-select [options]="providers" [(ngModel)]="fieldOptions[field].p1"
|
||||
[disabled]="!enabledFields[field]"
|
||||
placeholder="Unset" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
<td class="px-4 py-1.5">
|
||||
<td class="table-cell-sm">
|
||||
<p-select [options]="providers" [(ngModel)]="fieldOptions[field].p2"
|
||||
[disabled]="!enabledFields[field]"
|
||||
placeholder="Unset" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
<td class="px-4 py-1.5">
|
||||
<td class="table-cell-sm">
|
||||
<p-select [options]="providers" [(ngModel)]="fieldOptions[field].p3"
|
||||
[disabled]="!enabledFields[field]"
|
||||
placeholder="Unset" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
<td class="px-4 py-1.5">
|
||||
<td class="table-cell-sm">
|
||||
<p-select [options]="providers" [(ngModel)]="fieldOptions[field].p4"
|
||||
[disabled]="!enabledFields[field]"
|
||||
placeholder="Unset" appendTo="body"
|
||||
class="w-full" size="small">
|
||||
styleClass="select-full-width" size="small">
|
||||
</p-select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -104,45 +104,45 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="space-y-4">
|
||||
<h3 class="text-lg font-semibold text-zinc-300">Provider-Specific Fields</h3>
|
||||
<p class="text-sm text-zinc-400">These fields are unique to specific providers and cannot have custom priority settings. Use the checkboxes to enable/disable fetching these fields.</p>
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
||||
<div class="provider-specific-section">
|
||||
<h3 class="section-title">Provider-Specific Fields</h3>
|
||||
<p class="section-description">These fields are unique to specific providers and cannot have custom priority settings. Use the checkboxes to enable/disable fetching these fields.</p>
|
||||
<div class="fields-grid">
|
||||
@for (field of providerSpecificFields; track field) {
|
||||
<div class="flex items-center space-x-3 p-3 border border-zinc-600 rounded-lg">
|
||||
<div class="field-card">
|
||||
<p-checkbox [(ngModel)]="enabledFields[field]" [binary]="true"
|
||||
pTooltip="Enable this field during metadata fetch"
|
||||
tooltipPosition="top"></p-checkbox>
|
||||
<span class="text-sm text-zinc-300">{{ formatLabel(field) }}</span>
|
||||
<span class="field-card-label">{{ formatLabel(field) }}</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center justify-between gap-4 w-full">
|
||||
<div class="footer-row">
|
||||
|
||||
<div class="flex flex-row gap-10">
|
||||
<div class="flex flex-row items-center gap-4">
|
||||
<div class="options-group">
|
||||
<div class="option-item">
|
||||
<p pTooltip="Controls how fetched metadata replaces existing values. 'Replace Missing Only' only fills empty fields, 'Replace All Fields' overwrites existing values." tooltipPosition="top">Replace Mode:</p>
|
||||
<p-select [options]="replaceModeOptions" [(ngModel)]="replaceMode" optionLabel="label" optionValue="value"
|
||||
appendTo="body" size="small" class="min-w-40">
|
||||
appendTo="body" size="small" styleClass="select-mode">
|
||||
</p-select>
|
||||
</div>
|
||||
<div class="flex flex-row items-center gap-4">
|
||||
<div class="option-item">
|
||||
<p pTooltip="Fetch and update new book cover images" tooltipPosition="top">Update covers:</p>
|
||||
<p-checkbox [(ngModel)]="refreshCovers" [binary]="true"></p-checkbox>
|
||||
</div>
|
||||
<div class="flex flex-row items-center gap-4">
|
||||
<div class="option-item">
|
||||
<p pTooltip="Combine new genres with existing ones" tooltipPosition="top">Merge genres:</p>
|
||||
<p-checkbox [(ngModel)]="mergeCategories" [binary]="true"></p-checkbox>
|
||||
</div>
|
||||
<div class="flex flex-row items-center gap-4">
|
||||
<div class="option-item">
|
||||
<p pTooltip="Review and approve metadata changes before saving" tooltipPosition="top">Manual review:</p>
|
||||
<p-checkbox [(ngModel)]="reviewBeforeApply" [binary]="true"></p-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row gap-6">
|
||||
<div class="action-buttons">
|
||||
<p-button severity="warn" outlined="true" label="Reset Form" (onClick)="reset()"></p-button>
|
||||
<p-button [label]="submitButtonLabel" severity="success" icon="pi pi-save" outlined="true" (onClick)="submit()"></p-button>
|
||||
</div>
|
||||
|
||||
+133
@@ -1,4 +1,137 @@
|
||||
.options-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.custom-table {
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
table-layout: auto;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--card-border);
|
||||
}
|
||||
|
||||
.table-header {
|
||||
padding: 0.375rem 1rem;
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
color: #d4d4d8;
|
||||
}
|
||||
|
||||
.help-icon {
|
||||
margin-left: 0.25rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.table-cell {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.table-cell-sm {
|
||||
padding: 0.375rem 1rem;
|
||||
}
|
||||
|
||||
.set-all-label {
|
||||
font-size: 0.875rem;
|
||||
color: #a1a1aa;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
color: #e4e4e7;
|
||||
}
|
||||
|
||||
.row-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
// Provider specific section
|
||||
.provider-specific-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: #d4d4d8;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 0.875rem;
|
||||
color: #a1a1aa;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fields-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 1rem;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.field-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem;
|
||||
border: 1px solid #52525b;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.field-card-label {
|
||||
font-size: 0.875rem;
|
||||
color: #d4d4d8;
|
||||
}
|
||||
|
||||
// Footer row
|
||||
.footer-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.options-group {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 2.5rem;
|
||||
}
|
||||
|
||||
.option-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
// Select styles
|
||||
:host ::ng-deep {
|
||||
.select-full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.select-mode {
|
||||
min-width: 10rem;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,11 +19,11 @@
|
||||
|
||||
<div class="dialog-content">
|
||||
<div class="book-list-section">
|
||||
<div class="max-h-24 overflow-auto border border-gray-500 rounded p-2 text-sm">
|
||||
<ul class="list-disc pl-5 space-y-1">
|
||||
<div class="book-list-container">
|
||||
<ul class="book-list">
|
||||
@for (book of booksToShow; track book.id) {
|
||||
<li>
|
||||
<span class="text-gray-400">#{{ book.id }}</span>: {{ book.metadata?.title || 'Untitled' }}
|
||||
<span class="book-id">#{{ book.id }}</span>: {{ book.metadata?.title || 'Untitled' }}
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
+26
@@ -38,6 +38,32 @@
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.book-list-container {
|
||||
max-height: 6rem;
|
||||
overflow: auto;
|
||||
border: 1px solid #6b7280;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.book-list {
|
||||
list-style-type: disc;
|
||||
padding-left: 1.25rem;
|
||||
|
||||
li {
|
||||
margin-bottom: 0.25rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.book-id {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
::ng-deep app-metadata-fetch-options {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user