Tweak UI
This commit is contained in:
-6
@@ -57,11 +57,6 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&: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);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
@@ -133,7 +128,6 @@
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
|
||||
+34
-8
@@ -1,6 +1,7 @@
|
||||
.metadata-settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
@@ -51,7 +52,7 @@
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
margin: 0 0 0.25rem 0;
|
||||
margin: 1rem 0 1rem 0;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
}
|
||||
@@ -59,13 +60,14 @@
|
||||
.provider-group-description {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--p-text-muted-color);
|
||||
margin: 0 0 0.75rem 0;
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
.simple-providers-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
margin-top: 0;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr;
|
||||
@@ -77,7 +79,7 @@
|
||||
background: var(--p-surface-800);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 6px;
|
||||
padding: 0.875rem 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
@@ -108,17 +110,20 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&.setting-item-indented {
|
||||
display: inline-flex;
|
||||
margin-top: 0.5rem;
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 0.75rem 0.75rem 0.625rem 0.75rem;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
border-bottom: none;
|
||||
@@ -133,6 +138,8 @@
|
||||
|
||||
@media (max-width: 768px) {
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 0;
|
||||
|
||||
&.setting-item-indented {
|
||||
max-width: 100%;
|
||||
@@ -145,6 +152,9 @@
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
@@ -176,7 +186,7 @@
|
||||
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;
|
||||
@@ -238,6 +248,7 @@
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.config-field {
|
||||
@@ -254,7 +265,7 @@
|
||||
.config-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: 0.625rem;
|
||||
|
||||
.config-label {
|
||||
margin: 0;
|
||||
@@ -268,7 +279,7 @@
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
margin: 0 0 0.5rem 0;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
@@ -286,7 +297,7 @@
|
||||
.config-input {
|
||||
width: 100%;
|
||||
max-width: 40rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
padding: 0.375rem 0.625rem;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 6px;
|
||||
background: var(--ground-background);
|
||||
@@ -313,12 +324,27 @@
|
||||
.setting-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1.5rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.section-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
padding-left: 1rem;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
> div > .setting-item {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
+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;
|
||||
|
||||
+1
-2
@@ -45,8 +45,7 @@
|
||||
<span>Add custom preferences for specific libraries or shelves. These will override your default settings.</span>
|
||||
</p>
|
||||
<div class="setting-controls">
|
||||
<p-button label="Add Override" outlined size="small" (onClick)="addOverride()"
|
||||
severity="success" icon="pi pi-plus" [disabled]="availableLibraries.length === 0"></p-button>
|
||||
<p-button label="Add Override" outlined size="small" (onClick)="addOverride()" icon="pi pi-plus" [disabled]="availableLibraries.length === 0"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user