Tweak UI
This commit is contained in:
+12
-10
@@ -6,22 +6,24 @@
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">
|
||||
<i class="pi pi-download"></i>
|
||||
Auto-Download Metadata
|
||||
Automatic Metadata Download
|
||||
</h3>
|
||||
<p class="section-description">
|
||||
<i class="pi pi-exclamation-triangle"></i>
|
||||
Automatically downloads metadata from your configured sources when files are added to the Bookdrop folder. Use with caution if adding many files at once as metadata fetching can take time.
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Auto-Download for BookDrop Files</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="metadataDownloadOnBookdrop"
|
||||
(onChange)="onMetadataDownloadOnBookdropToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+35
-8
@@ -92,6 +92,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -102,34 +110,53 @@
|
||||
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) {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
&.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.5rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+56
-58
@@ -10,77 +10,75 @@
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="reviews-settings">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@if (publicReviewSettings.downloadEnabled) {
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<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">Download Public Reviews</label>
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="publicReviewSettings.downloadEnabled"
|
||||
(onChange)="onPublicReviewsToggle($event.checked)">
|
||||
[(ngModel)]="publicReviewSettings.autoDownloadEnabled"
|
||||
(onChange)="onAutoDownloadToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
Enable downloading user reviews from configured platforms (Amazon, Goodreads, Hardcover). Reviews will be stored with your books for offline access.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (publicReviewSettings.downloadEnabled) {
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Auto Download on Book Open</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="publicReviewSettings.autoDownloadEnabled"
|
||||
(onChange)="onAutoDownloadToggle($event.checked)">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="review-sources-section">
|
||||
<div class="sources-header">
|
||||
<span class="group-icon pi pi-database"></span>
|
||||
<h4 class="subsection-title">Review Sources</h4>
|
||||
</div>
|
||||
<p class="subsection-description">Configure which platforms to download reviews from and set limits for each source.</p>
|
||||
|
||||
<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-setting">
|
||||
<div class="provider-label-row">
|
||||
<label class="provider-label">{{ provider.provider }}</label>
|
||||
<div class="provider-controls">
|
||||
<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>
|
||||
}
|
||||
</div>
|
||||
<div class="provider-label-row">
|
||||
<label class="provider-label">{{ provider.provider }}</label>
|
||||
<div class="provider-controls">
|
||||
<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>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (publicReviewSettings.providers.length === 0) {
|
||||
<div class="no-providers-message">
|
||||
<i class="pi pi-exclamation-triangle"></i>
|
||||
@@ -89,7 +87,7 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+36
-114
@@ -22,6 +22,10 @@
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -46,23 +50,8 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.preferences-section {
|
||||
@media (min-width: 768px) {
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.reviews-settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 2rem;
|
||||
padding-bottom: 1.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
|
||||
&:last-child {
|
||||
@@ -70,104 +59,71 @@
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
&.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;
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
&::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.5rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
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.5rem;
|
||||
gap: 0.375rem;
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
margin: 0 0 0.5rem 0;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
color: var(--p-primary-color);
|
||||
font-size: 0.875rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setting-control {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
align-items: flex-end;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.review-sources-section {
|
||||
padding-top: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
border-top: 1px solid var(--p-content-border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.sources-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
|
||||
.group-icon {
|
||||
color: var(--primary-color);
|
||||
font-size: 0.9375rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.subsection-title {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
color: var(--p-text-color);
|
||||
margin: 0;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
}
|
||||
|
||||
.subsection-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
.providers-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
@@ -195,17 +151,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.provider-setting {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -240,29 +185,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.provider-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
|
||||
.provider-label {
|
||||
font-weight: 500;
|
||||
color: var(--p-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
.max-reviews-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user