Polish view and metadata settings page UI (#2362)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
+62
-78
@@ -27,22 +27,18 @@
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Write Metadata to EPUB</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Write metadata directly into EPUB files when editing book information.</span>
|
||||
</p>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.epub.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('epub')">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
@if (metadataPersistence.saveToOriginalFile.epub.enabled) {
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.epub.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('epub')">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Write Metadata to EPUB</label>
|
||||
</div>
|
||||
<p class="setting-description">Write metadata directly into EPUB files when editing book information.</p>
|
||||
@if (metadataPersistence.saveToOriginalFile.epub.enabled) {
|
||||
<div class="setting-options">
|
||||
<div class="filesize-input">
|
||||
<label>Max File Size (MB):</label>
|
||||
<label>Max file size:</label>
|
||||
<input
|
||||
type="number"
|
||||
[(ngModel)]="metadataPersistence.saveToOriginalFile.epub.maxFileSizeInMb"
|
||||
@@ -50,34 +46,30 @@
|
||||
min="1"
|
||||
max="1000"
|
||||
class="filesize-field">
|
||||
<span class="filesize-unit">MB</span>
|
||||
<i
|
||||
class="pi pi-info-circle text-blue-500"
|
||||
pTooltip="Only files up to this size (MB) will be updated. Larger files are ignored."
|
||||
tooltipPosition="right"
|
||||
style="cursor: help;"
|
||||
></i>
|
||||
class="pi pi-info-circle"
|
||||
pTooltip="Only files up to this size will be updated. Larger files are ignored."
|
||||
tooltipPosition="right">
|
||||
</i>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Write Metadata to CBX</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Write metadata directly into CBX files when editing book information.</span>
|
||||
</p>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.cbx.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('cbx')">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
@if (metadataPersistence.saveToOriginalFile.cbx.enabled) {
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.cbx.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('cbx')">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Write Metadata to CBX</label>
|
||||
</div>
|
||||
<p class="setting-description">Write metadata directly into CBX files when editing book information.</p>
|
||||
@if (metadataPersistence.saveToOriginalFile.cbx.enabled) {
|
||||
<div class="setting-options">
|
||||
<div class="filesize-input">
|
||||
<label>Max File Size (MB):</label>
|
||||
<label>Max file size:</label>
|
||||
<input
|
||||
type="number"
|
||||
[(ngModel)]="metadataPersistence.saveToOriginalFile.cbx.maxFileSizeInMb"
|
||||
@@ -85,35 +77,33 @@
|
||||
min="1"
|
||||
max="1000"
|
||||
class="filesize-field">
|
||||
<span class="filesize-unit">MB</span>
|
||||
<i
|
||||
class="pi pi-info-circle text-blue-500"
|
||||
pTooltip="Only files up to this size (MB) will be updated. Larger files are ignored."
|
||||
tooltipPosition="right"
|
||||
style="cursor: help;"
|
||||
></i>
|
||||
class="pi pi-info-circle"
|
||||
pTooltip="Only files up to this size will be updated. Larger files are ignored."
|
||||
tooltipPosition="right">
|
||||
</i>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Write Metadata to PDF</label>
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.pdf.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('pdf')">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Write Metadata to PDF</label>
|
||||
</div>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Write metadata directly into PDF files when editing book information. <br>
|
||||
<strong>Note:</strong> PDFs do not support embedded covers, and only a limited set of metadata can be updated (Title, Authors, Publisher, Categories, Description, Language, Published Date). This is a limitation of the PDF format.</span>
|
||||
Write metadata directly into PDF files when editing book information.
|
||||
<span class="setting-note">PDFs do not support embedded covers. Only Title, Authors, Publisher, Categories, Description, Language, and Published Date can be updated.</span>
|
||||
</p>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.pdf.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('pdf')">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
@if (metadataPersistence.saveToOriginalFile.pdf.enabled) {
|
||||
@if (metadataPersistence.saveToOriginalFile.pdf.enabled) {
|
||||
<div class="setting-options">
|
||||
<div class="filesize-input">
|
||||
<label>Max File Size (MB):</label>
|
||||
<label>Max file size:</label>
|
||||
<input
|
||||
type="number"
|
||||
[(ngModel)]="metadataPersistence.saveToOriginalFile.pdf.maxFileSizeInMb"
|
||||
@@ -121,32 +111,26 @@
|
||||
min="1"
|
||||
max="1000"
|
||||
class="filesize-field">
|
||||
<span class="filesize-unit">MB</span>
|
||||
<i
|
||||
class="pi pi-info-circle text-blue-500"
|
||||
pTooltip="Only files up to this size (MB) will be updated. Larger files are ignored."
|
||||
tooltipPosition="right"
|
||||
style="cursor: help;"
|
||||
></i>
|
||||
class="pi pi-info-circle"
|
||||
pTooltip="Only files up to this size will be updated. Larger files are ignored."
|
||||
tooltipPosition="right">
|
||||
</i>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Auto-Move Files on Metadata Update</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Automatically move and rename files according to their library's naming pattern when metadata is updated, either through manual editing or auto-fetch operations.</span>
|
||||
</p>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.moveFilesToLibraryPattern"
|
||||
(onChange)="onPersistenceToggle('moveFilesToLibraryPattern')">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.moveFilesToLibraryPattern"
|
||||
(onChange)="onPersistenceToggle('moveFilesToLibraryPattern')">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Auto-Move Files on Metadata Update</label>
|
||||
</div>
|
||||
<p class="setting-description">Automatically move and rename files according to their library's naming pattern when metadata is updated.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+114
-132
@@ -1,8 +1,20 @@
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: var(--card-border);
|
||||
border-bottom-color: var(--p-content-border-color);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -27,193 +39,151 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.875rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-notice {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-top: 0.5rem;
|
||||
margin-left: 0;
|
||||
padding: 0.75rem 0.75rem 0.625rem 0.75rem;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
border-bottom: none;
|
||||
background: var(--p-surface-800);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
gap: 0.5rem;
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.setting-label {
|
||||
margin-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.9375rem;
|
||||
color: var(--text-color-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.375rem;
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0 0 0.5rem 0;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.warning-notice {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
font-size: 0.9375rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
background: color-mix(in srgb, var(--ground-background) 85%, var(--p-red-600) 15%);
|
||||
border: 1px solid color-mix(in srgb, var(--p-red-500) 30%, transparent 70%);
|
||||
border-left: 3px solid var(--p-red-500);
|
||||
color: var(--text-color);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
||||
|
||||
.pi-exclamation-triangle {
|
||||
color: var(--p-red-400);
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
color: var(--p-red-300);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.625rem 0.75rem;
|
||||
gap: 0.625rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.info-notice.unsupported-formats-note {
|
||||
background: color-mix(in srgb, var(--ground-background) 90%, var(--p-blue-600) 10%);
|
||||
border: 1px solid color-mix(in srgb, var(--p-blue-400) 30%, transparent 70%);
|
||||
border-left: 3px solid var(--p-blue-400);
|
||||
color: var(--text-color);
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 1rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 6px;
|
||||
background: color-mix(in srgb, var(--ground-background) 90%, var(--p-blue-600) 10%);
|
||||
border-left: 3px solid var(--p-blue-400);
|
||||
color: var(--text-color);
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--p-blue-400);
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: var(--p-blue-300);
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.625rem 0.75rem;
|
||||
gap: 0.625rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
padding: 0.875rem 1rem;
|
||||
border-radius: 6px;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.setting-note {
|
||||
display: block;
|
||||
margin-top: 0.25rem;
|
||||
font-style: italic;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.setting-options {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.filesize-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.625rem;
|
||||
margin-top: 0.5rem;
|
||||
gap: 0.5rem;
|
||||
|
||||
label {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-color-secondary);
|
||||
font-size: 0.8125rem;
|
||||
color: var(--p-text-muted-color);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.filesize-field {
|
||||
width: 100px;
|
||||
padding: 0.375rem 0.625rem;
|
||||
width: 70px;
|
||||
padding: 0.375rem 0.5rem;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 6px;
|
||||
border-radius: 4px;
|
||||
background: var(--ground-background);
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
transition: all 0.2s ease;
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
transition: border-color 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--primary-color);
|
||||
@@ -222,11 +192,23 @@
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent 85%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
gap: 0.5rem;
|
||||
.filesize-unit {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--p-text-muted-color);
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
cursor: help;
|
||||
opacity: 0.7;
|
||||
transition: opacity 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-9
@@ -10,20 +10,18 @@
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
<i class="pi pi-exclamation-triangle"></i>
|
||||
When enabled, metadata will be automatically retrieved from your configured sources whenever new files are added to the Bookdrop folder. Please note that processing a large number of files simultaneously may increase the time required for metadata fetching.
|
||||
<span>When enabled, metadata will be automatically retrieved from your configured sources whenever new files are added to the Bookdrop folder. Please note that processing a large number of files simultaneously may increase the time required for metadata fetching.</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enable automatic metadata download for Bookdrop imports</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="metadataDownloadOnBookdrop"
|
||||
(onChange)="onMetadataDownloadOnBookdropToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="metadataDownloadOnBookdrop"
|
||||
(onChange)="onMetadataDownloadOnBookdropToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Enable automatic metadata download for Bookdrop imports</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+54
-157
@@ -1,198 +1,95 @@
|
||||
.settings-header {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.settings-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--p-text-color);
|
||||
margin: 0 0 0.75rem 0;
|
||||
|
||||
.pi {
|
||||
color: var(--p-primary-color);
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.settings-content {
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
gap: 1.25rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-bottom: 1rem;
|
||||
|
||||
.section-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0.5rem 0 0 0;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pi-exclamation-triangle {
|
||||
color: var(--p-orange-500);
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--p-primary-color);
|
||||
}
|
||||
}
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 1.125rem;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
margin: 0;
|
||||
color: var(--text-color);
|
||||
margin: 0 0 0.5rem 0;
|
||||
|
||||
.pi {
|
||||
color: var(--p-primary-color);
|
||||
color: var(--primary-color);
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
background: var(--p-content-background);
|
||||
padding: 1.5rem;
|
||||
.section-description {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
color: var(--p-text-muted-color);
|
||||
margin: 0;
|
||||
|
||||
.section-header {
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
margin-bottom: 0;
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
+ .setting-item {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.pi-exclamation-triangle {
|
||||
color: var(--p-orange-500);
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
.section-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
@media (max-width: 768px) {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 2rem;
|
||||
padding: 0.875rem 1rem;
|
||||
border-radius: 6px;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-top: 0.5rem;
|
||||
margin-left: 0;
|
||||
padding: 0.75rem 0.75rem 0.625rem 0.75rem;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
border-bottom: none;
|
||||
background: var(--p-surface-800);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.setting-label {
|
||||
margin-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 1rem;
|
||||
color: var(--p-text-color);
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pi-exclamation-triangle {
|
||||
color: var(--p-orange-500);
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--p-primary-color);
|
||||
}
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-control {
|
||||
flex-shrink: 0;
|
||||
.setting-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
+45
-60
@@ -11,82 +11,67 @@
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Download Public Reviews</label>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="publicReviewSettings.downloadEnabled"
|
||||
(onChange)="onPublicReviewsToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="publicReviewSettings.downloadEnabled"
|
||||
(onChange)="onPublicReviewsToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Download Public Reviews</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (publicReviewSettings.downloadEnabled) {
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Auto Download on Book Open</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>
|
||||
Automatically fetch reviews when you open a book's details page. When disabled, reviews will only be downloaded manually or during metadata refresh, reducing background network activity and improving performance.
|
||||
</span>
|
||||
</p>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="publicReviewSettings.autoDownloadEnabled"
|
||||
(onChange)="onAutoDownloadToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="publicReviewSettings.autoDownloadEnabled"
|
||||
(onChange)="onAutoDownloadToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Auto Download on Book Open</label>
|
||||
</div>
|
||||
<p class="setting-description">Automatically fetch reviews when you open a book's details page. When disabled, reviews will only be downloaded manually or during metadata refresh.</p>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Review Sources</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>
|
||||
Configure which platforms to download reviews from and set limits for each source.
|
||||
</span>
|
||||
</p>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="providers-list">
|
||||
@for (provider of publicReviewSettings.providers; track provider.provider) {
|
||||
<div class="provider-item">
|
||||
<div class="provider-label-row">
|
||||
<label class="provider-label">{{ provider.provider }}</label>
|
||||
<div class="provider-controls">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Review Sources</label>
|
||||
</div>
|
||||
<p class="setting-description">Configure which platforms to download reviews from and set limits for each source.</p>
|
||||
@if (publicReviewSettings.providers.length > 0) {
|
||||
<div class="setting-options">
|
||||
<div class="providers-grid">
|
||||
@for (provider of publicReviewSettings.providers; track provider.provider) {
|
||||
<div class="provider-item">
|
||||
<div class="provider-row">
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="provider.enabled"
|
||||
(onChange)="onProviderToggle(provider.provider, $event.checked)">
|
||||
</p-toggleswitch>
|
||||
@if (provider.enabled) {
|
||||
<div class="max-reviews-control">
|
||||
<label class="max-reviews-label">Max Reviews:</label>
|
||||
<input
|
||||
type="number"
|
||||
class="max-reviews-input"
|
||||
min="1"
|
||||
max="10"
|
||||
[(ngModel)]="provider.maxReviews"
|
||||
(blur)="onMaxReviewsChange(provider.provider, provider.maxReviews)"
|
||||
title="Number of reviews to download (1-10)">
|
||||
</div>
|
||||
}
|
||||
<label class="provider-label">{{ provider.provider }}</label>
|
||||
</div>
|
||||
@if (provider.enabled) {
|
||||
<div class="max-reviews-control">
|
||||
<label class="max-reviews-label">Max:</label>
|
||||
<input
|
||||
type="number"
|
||||
class="max-reviews-input"
|
||||
min="1"
|
||||
max="10"
|
||||
[(ngModel)]="provider.maxReviews"
|
||||
(blur)="onMaxReviewsChange(provider.provider, provider.maxReviews)"
|
||||
title="Number of reviews to download (1-10)">
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (publicReviewSettings.providers.length === 0) {
|
||||
<div class="no-providers-message">
|
||||
<i class="pi pi-exclamation-triangle"></i>
|
||||
<span>No review sources available. Please ensure metadata providers are configured in the Provider Settings section above.</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="no-providers-message">
|
||||
<i class="pi pi-exclamation-triangle"></i>
|
||||
<span>No review sources available. Please ensure metadata providers are configured in the Provider Settings section above.</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
+109
-159
@@ -1,31 +1,20 @@
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
gap: 1.25rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.875rem;
|
||||
padding: 1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: var(--card-border);
|
||||
border-bottom-color: var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -50,100 +39,26 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-top: 0.5rem;
|
||||
margin-left: 0;
|
||||
padding: 0.75rem 0.75rem 0.625rem 0.75rem;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
border-bottom: none;
|
||||
background: var(--p-surface-800);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
gap: 0.5rem;
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.setting-label {
|
||||
margin-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.9375rem;
|
||||
color: var(--text-color-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.375rem;
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0 0 0.5rem 0;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.providers-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 0.875rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-item {
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 0.875rem;
|
||||
transition: all 0.2s ease;
|
||||
padding: 0.875rem 1rem;
|
||||
border-radius: 6px;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: color-mix(in srgb, var(--primary-color) 40%, var(--p-content-border-color) 60%);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@@ -151,70 +66,103 @@
|
||||
}
|
||||
}
|
||||
|
||||
.provider-label-row {
|
||||
.setting-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.setting-header-standalone {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.setting-options {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.providers-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 0.625rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
gap: 1rem;
|
||||
gap: 0.5rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
background: var(--ground-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 4px;
|
||||
transition: border-color 0.2s ease;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.75rem;
|
||||
&:hover {
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
.provider-label {
|
||||
font-weight: 500;
|
||||
color: var(--p-text-color);
|
||||
font-size: 0.875rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.provider-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.provider-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
flex-shrink: 0;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
.provider-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.max-reviews-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.max-reviews-label {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.max-reviews-label {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.max-reviews-input {
|
||||
width: 3rem;
|
||||
padding: 0.25rem 0.375rem;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 4px;
|
||||
background: var(--p-surface-800);
|
||||
color: var(--text-color);
|
||||
font-size: 0.8125rem;
|
||||
text-align: center;
|
||||
|
||||
.max-reviews-input {
|
||||
width: 4rem;
|
||||
padding: 0.375rem 0.5rem;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 4px;
|
||||
background: var(--p-surface-800);
|
||||
color: var(--p-text-color);
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--p-primary-color);
|
||||
box-shadow: 0 0 0 2px var(--p-primary-color-alpha-20);
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,13 +171,15 @@
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
font-size: 0.8125rem;
|
||||
font-style: italic;
|
||||
padding: 1rem;
|
||||
background: var(--p-surface-100);
|
||||
border-radius: 6px;
|
||||
margin-top: 0.5rem;
|
||||
padding: 0.75rem;
|
||||
background: var(--ground-background);
|
||||
border-radius: 4px;
|
||||
|
||||
.pi {
|
||||
color: var(--p-orange-500);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user