Polish view and metadata settings page UI (#2362)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
+20
-22
@@ -10,29 +10,27 @@
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="preferences-section">
|
||||
<div class="provider-groups-container">
|
||||
@for (group of providerGroups; track group.label) {
|
||||
<div class="provider-group">
|
||||
<div class="group-header">
|
||||
<span class="group-icon pi pi-database"></span>
|
||||
<h4 class="group-label">{{ group.label }}</h4>
|
||||
</div>
|
||||
<div class="field-list">
|
||||
@for (field of group.fields; track field) {
|
||||
<div class="field-checkbox">
|
||||
<p-toggleswitch
|
||||
[inputId]="field"
|
||||
[ngModel]="selectedFields.includes(field)"
|
||||
(ngModelChange)="toggleField(field, $event)">
|
||||
</p-toggleswitch>
|
||||
<label [for]="field">{{ fieldLabels[field] || field }}</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="provider-groups-container">
|
||||
@for (group of providerGroups; track group.label) {
|
||||
<div class="provider-group">
|
||||
<div class="group-header">
|
||||
<span class="group-icon pi pi-database"></span>
|
||||
<h4 class="group-label">{{ group.label }}</h4>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="field-list">
|
||||
@for (field of group.fields; track field) {
|
||||
<div class="field-item">
|
||||
<p-toggleswitch
|
||||
[inputId]="field"
|
||||
[ngModel]="selectedFields.includes(field)"
|
||||
(ngModelChange)="toggleField(field, $event)">
|
||||
</p-toggleswitch>
|
||||
<label [for]="field">{{ fieldLabels[field] || field }}</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+48
-67
@@ -1,14 +1,20 @@
|
||||
.preferences-section {
|
||||
@media (min-width: 768px) {
|
||||
padding: 0 0.5rem;
|
||||
.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: 2rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: var(--card-border);
|
||||
border-bottom-color: var(--p-content-border-color);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -33,29 +39,30 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-groups-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.875rem;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-group {
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 0.875rem;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
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%);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
@@ -66,75 +73,49 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.75rem;
|
||||
padding-bottom: 0.625rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
margin-bottom: 0.625rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px dashed var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.group-icon {
|
||||
color: var(--primary-color);
|
||||
font-size: 0.9375rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.group-icon {
|
||||
color: var(--primary-color);
|
||||
font-size: 0.875rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.group-label {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.group-label {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.field-checkbox {
|
||||
.field-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.625rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-radius: 5px;
|
||||
padding: 0.3125rem 0.5rem;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--p-surface-800) 70%, transparent 30%);
|
||||
background: color-mix(in srgb, var(--primary-color) 8%, transparent 92%);
|
||||
}
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
font-size: 0.875rem;
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 400;
|
||||
user-select: none;
|
||||
color: var(--text-color);
|
||||
margin-bottom: 0;
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.375rem 0.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-body {
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
+46
-54
@@ -10,64 +10,56 @@
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="preferences-section">
|
||||
<div class="action-section">
|
||||
<div class="action-content">
|
||||
<div class="action-info">
|
||||
<span class="action-label">Recalculate Metadata Scores</span>
|
||||
<span class="action-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
Recomputes match scores for all books based on the latest weights.
|
||||
</span>
|
||||
</div>
|
||||
<div class="setting-item action-item">
|
||||
<div class="action-row">
|
||||
<div class="action-info">
|
||||
<span class="action-label">Recalculate Metadata Scores</span>
|
||||
<span class="action-description">Recomputes match scores for all books based on the latest weights.</span>
|
||||
</div>
|
||||
<p-button
|
||||
type="button"
|
||||
icon="pi pi-refresh"
|
||||
label="Recalculate"
|
||||
[disabled]="isRecalculating"
|
||||
(click)="recalculate()"
|
||||
outlined>
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item weights-item">
|
||||
<div class="weights-header">
|
||||
<span class="weights-icon pi pi-sliders-v"></span>
|
||||
<h4 class="weights-label">Field Weights</h4>
|
||||
</div>
|
||||
|
||||
<form [formGroup]="form" class="weights-form">
|
||||
<div class="weights-grid">
|
||||
@for (key of orderedKeys; track key) {
|
||||
<div class="weight-field">
|
||||
<label class="field-label">{{ labelMap[key] }}</label>
|
||||
<p-inputNumber
|
||||
size="small"
|
||||
[formControlName]="key"
|
||||
[min]="0"
|
||||
[max]="10"
|
||||
fluid
|
||||
[showButtons]="true"/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<p-button
|
||||
type="button"
|
||||
icon="pi pi-refresh"
|
||||
label="Recalculate"
|
||||
[disabled]="isRecalculating"
|
||||
(click)="recalculate()"
|
||||
severity="success"
|
||||
label="Save Weights"
|
||||
icon="pi pi-save"
|
||||
outlined
|
||||
></p-button>
|
||||
[disabled]="isSaving"
|
||||
(click)="save()">
|
||||
</p-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weights-section">
|
||||
<div class="weights-header">
|
||||
<span class="weights-icon pi pi-sliders-v"></span>
|
||||
<h4 class="weights-label">Metadata Field Weights</h4>
|
||||
</div>
|
||||
|
||||
<form [formGroup]="form" class="weights-form">
|
||||
<div class="weights-grid">
|
||||
@for (key of orderedKeys; track key) {
|
||||
<div class="weight-field">
|
||||
<label class="field-label">
|
||||
{{ labelMap[key] }}
|
||||
</label>
|
||||
<p-inputNumber
|
||||
size="small"
|
||||
[formControlName]="key"
|
||||
[min]="0"
|
||||
[max]="10"
|
||||
fluid
|
||||
[showButtons]="true"
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<p-button
|
||||
type="button"
|
||||
severity="success"
|
||||
label="Save Weights"
|
||||
icon="pi pi-save"
|
||||
outlined
|
||||
[disabled]="isSaving"
|
||||
(click)="save()">
|
||||
</p-button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+60
-92
@@ -1,34 +1,20 @@
|
||||
.custom-border {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--card-border);
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.preferences-section {
|
||||
@media (min-width: 768px) {
|
||||
padding: 0 0.5rem;
|
||||
padding: 1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: var(--card-border);
|
||||
border-bottom-color: var(--p-content-border-color);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -53,25 +39,29 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.action-section {
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
transition: all 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);
|
||||
}
|
||||
.section-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.875rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.action-content {
|
||||
.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%);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.action-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -80,97 +70,80 @@
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.action-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.375rem;
|
||||
flex: 1;
|
||||
gap: 0.125rem;
|
||||
}
|
||||
|
||||
.action-label {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.action-description {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
font-size: 0.8125rem;
|
||||
color: var(--p-text-muted-color);
|
||||
line-height: 1.4;
|
||||
|
||||
.pi {
|
||||
font-size: 0.875rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
.weights-section {
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
padding: 0.875rem;
|
||||
transition: all 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);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.weights-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.625rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.weights-icon {
|
||||
color: var(--primary-color);
|
||||
font-size: 0.9375rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.weights-icon {
|
||||
color: var(--primary-color);
|
||||
font-size: 0.875rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.weights-label {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.weights-label {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.weights-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.weights-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 1rem;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 0.625rem;
|
||||
padding-top: 0.5rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.weight-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.375rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
padding: 0.5rem 0.625rem;
|
||||
background: var(--ground-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 4px;
|
||||
|
||||
.field-label {
|
||||
font-size: 0.875rem;
|
||||
@@ -178,26 +151,21 @@
|
||||
color: var(--text-color);
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
::ng-deep p-inputnumber {
|
||||
width: 6rem;
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--p-content-border-color);
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
justify-content: stretch;
|
||||
|
||||
p-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section-body {
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
+106
-136
@@ -11,173 +11,143 @@
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div>
|
||||
<div class="configurable-providers-section">
|
||||
<h4 class="provider-group-title">Providers with Configuration</h4>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label class="setting-label">Amazon</label>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch [(ngModel)]="amazonEnabled"></p-toggleswitch>
|
||||
</div>
|
||||
@if (amazonEnabled) {
|
||||
<div class="provider-config-fields">
|
||||
<div class="config-field">
|
||||
<label class="config-label">Region</label>
|
||||
<p-select
|
||||
[options]="amazonDomains"
|
||||
[(ngModel)]="selectedAmazonDomain"
|
||||
placeholder="Select Domain"
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
|
||||
<div class="config-field">
|
||||
<div class="config-label-row">
|
||||
<label class="config-label">Cookie (Optional, but highly recommended)</label>
|
||||
<app-external-doc-link docType="amazonCookie"></app-external-doc-link>
|
||||
</div>
|
||||
<p class="config-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Providing your Amazon session cookie allows the app to access richer book metadata and bypass rate limits.</span>
|
||||
</p>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Paste your Amazon cookie"
|
||||
[(ngModel)]="amazonCookie"
|
||||
class="config-input"/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="configurable-providers-list">
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="amazonEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Amazon</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label class="setting-label">Google Books</label>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch [(ngModel)]="googleEnabled"></p-toggleswitch>
|
||||
</div>
|
||||
@if (googleEnabled) {
|
||||
<div class="provider-config-fields">
|
||||
<div class="config-field">
|
||||
<label class="config-label">Language Restriction</label>
|
||||
<p-select
|
||||
[options]="googleLanguages"
|
||||
[(ngModel)]="selectedGoogleLanguage"
|
||||
[showClear]="!!selectedGoogleLanguage"
|
||||
placeholder="Select Language"
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
@if (amazonEnabled) {
|
||||
<div class="setting-options">
|
||||
<div class="config-field">
|
||||
<label class="config-label">Region</label>
|
||||
<p-select
|
||||
[options]="amazonDomains"
|
||||
[(ngModel)]="selectedAmazonDomain"
|
||||
placeholder="Select Domain"
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label class="setting-label">Hardcover</label>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="hardcoverEnabled"
|
||||
[disabled]="!hardcoverToken">
|
||||
</p-toggleswitch>
|
||||
</div>
|
||||
@if (hardcoverEnabled) {
|
||||
<div class="provider-config-fields">
|
||||
<div class="config-field">
|
||||
<div class="config-label-row">
|
||||
<label class="config-label">API Token</label>
|
||||
<app-external-doc-link docType="hardcover"></app-external-doc-link>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Enter Hardcover API token"
|
||||
[(ngModel)]="hardcoverToken"
|
||||
(ngModelChange)="onTokenChange($event)"
|
||||
class="config-input"/>
|
||||
<div class="config-field">
|
||||
<div class="config-label-row">
|
||||
<label class="config-label">Cookie (Optional, but highly recommended)</label>
|
||||
<app-external-doc-link docType="amazonCookie"></app-external-doc-link>
|
||||
</div>
|
||||
<p class="config-description">Providing your Amazon session cookie allows the app to access richer book metadata and bypass rate limits.</p>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Paste your Amazon cookie"
|
||||
[(ngModel)]="amazonCookie"
|
||||
class="config-input"/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label class="setting-label">Comic Vine</label>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Enabled:</label>
|
||||
<p-toggleswitch [(ngModel)]="comicvineEnabled"></p-toggleswitch>
|
||||
</div>
|
||||
@if (comicvineEnabled) {
|
||||
<div class="provider-config-fields">
|
||||
<div class="config-field">
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="googleEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Google Books</label>
|
||||
</div>
|
||||
@if (googleEnabled) {
|
||||
<div class="setting-options">
|
||||
<div class="config-field">
|
||||
<label class="config-label">Language Restriction</label>
|
||||
<p-select
|
||||
[options]="googleLanguages"
|
||||
[(ngModel)]="selectedGoogleLanguage"
|
||||
[showClear]="!!selectedGoogleLanguage"
|
||||
placeholder="Select Language"
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[(ngModel)]="hardcoverEnabled"
|
||||
[disabled]="!hardcoverToken">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Hardcover</label>
|
||||
</div>
|
||||
@if (hardcoverEnabled) {
|
||||
<div class="setting-options">
|
||||
<div class="config-field">
|
||||
<div class="config-label-row">
|
||||
<label class="config-label">API Token</label>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Enter Comic Vine API token"
|
||||
[(ngModel)]="comicvineToken"
|
||||
(ngModelChange)="onComicTokenChange($event)"
|
||||
class="config-input"/>
|
||||
<app-external-doc-link docType="hardcover"></app-external-doc-link>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Enter Hardcover API token"
|
||||
[(ngModel)]="hardcoverToken"
|
||||
(ngModelChange)="onTokenChange($event)"
|
||||
class="config-input"/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="comicvineEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Comic Vine</label>
|
||||
</div>
|
||||
@if (comicvineEnabled) {
|
||||
<div class="setting-options">
|
||||
<div class="config-field">
|
||||
<label class="config-label">API Token</label>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Enter Comic Vine API token"
|
||||
[(ngModel)]="comicvineToken"
|
||||
(ngModelChange)="onComicTokenChange($event)"
|
||||
class="config-input"/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="simple-providers-section">
|
||||
<h4 class="provider-group-title">Ready-to-Use Providers</h4>
|
||||
|
||||
<div class="simple-providers-grid">
|
||||
<div class="simple-provider-item">
|
||||
<div class="simple-provider-header">
|
||||
<label class="setting-label">Goodreads</label>
|
||||
<div class="setting-item simple-provider">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="goodreadsEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Goodreads</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="simple-provider-item">
|
||||
<div class="simple-provider-header">
|
||||
<label class="setting-label">Douban</label>
|
||||
<div class="setting-item simple-provider">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="doubanEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Douban</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="simple-provider-item">
|
||||
<div class="simple-provider-header">
|
||||
<label class="setting-label">Lubimyczytac</label>
|
||||
<div class="setting-item simple-provider">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="lubimyCzytacEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Lubimyczytac</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="simple-provider-item">
|
||||
<div class="simple-provider-header">
|
||||
<label class="setting-label">Ranobedb</label>
|
||||
<div class="setting-item simple-provider">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="ranobedbEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Ranobedb</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+119
-263
@@ -4,11 +4,23 @@
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.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 {
|
||||
@@ -33,58 +45,53 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
.section-body {
|
||||
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;
|
||||
gap: 2rem;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.875rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.configurable-providers-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.configurable-providers-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.simple-providers-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.provider-group-title {
|
||||
font-size: 1rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
margin: 1rem 0 1rem 0;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.provider-group-description {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--p-text-muted-color);
|
||||
margin: 0 0 0.5rem 0;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.025em;
|
||||
margin: 0 0 0.25rem 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;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.simple-provider-item {
|
||||
background: var(--p-surface-800);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
.setting-item {
|
||||
padding: 0.875rem 1rem;
|
||||
border-radius: 6px;
|
||||
padding: 0.75rem 1rem;
|
||||
transition: all 0.2s ease;
|
||||
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: var(--primary-color);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@@ -92,259 +99,108 @@
|
||||
}
|
||||
}
|
||||
|
||||
.simple-provider-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
|
||||
.setting-label {
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
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;
|
||||
background: var(--p-surface-800);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 0;
|
||||
|
||||
&.setting-item-indented {
|
||||
max-width: 100%;
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.providers-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.provider-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-info {
|
||||
.setting-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
|
||||
.provider-label {
|
||||
font-weight: 500;
|
||||
color: var(--p-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
.provider-config {
|
||||
margin-top: 1rem;
|
||||
padding-left: 2rem;
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.setting-options {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.provider-config-fields {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.config-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.config-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.config-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.config-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.875rem;
|
||||
.config-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
::ng-deep .config-select {
|
||||
width: 100%;
|
||||
max-width: 20rem;
|
||||
}
|
||||
|
||||
.config-input {
|
||||
width: 100%;
|
||||
max-width: 40rem;
|
||||
padding: 0.375rem 0.625rem;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 4px;
|
||||
background: var(--ground-background);
|
||||
color: var(--text-color);
|
||||
font-size: 0.875rem;
|
||||
transition: border-color 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.config-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.625rem;
|
||||
|
||||
.config-label {
|
||||
margin: 0;
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.config-description {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.375rem;
|
||||
&::placeholder {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.8125rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
.simple-providers-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 0.75rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
::ng-deep .config-select {
|
||||
width: 100%;
|
||||
max-width: 20rem;
|
||||
@media (max-width: 480px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.config-input {
|
||||
width: 100%;
|
||||
max-width: 40rem;
|
||||
padding: 0.375rem 0.625rem;
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
border-radius: 6px;
|
||||
background: var(--ground-background);
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
transition: all 0.2s ease;
|
||||
.simple-provider {
|
||||
padding: 0.625rem 0.875rem;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent 85%);
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: var(--p-text-muted-color);
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.5rem 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1.5rem;
|
||||
padding-top: 1rem;
|
||||
padding-top: 0.5rem;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
+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;
|
||||
}
|
||||
}
|
||||
|
||||
+20
-34
@@ -11,48 +11,34 @@
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Filter Mode</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Choose the default mode for combining filters selected from the right filter sidebar.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="filterModes"
|
||||
[(ngModel)]="selectedFilterMode"
|
||||
(ngModelChange)="onFilterModeChange()"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Choose the default mode for combining filters selected from the right filter sidebar.</p>
|
||||
<div class="setting-options">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="filterModes"
|
||||
[(ngModel)]="selectedFilterMode"
|
||||
(ngModelChange)="onFilterModeChange()"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Sorting Mode</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Choose how filter options are sorted in the sidebar.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="filterSortingModes"
|
||||
[(ngModel)]="selectedFilterSortingMode"
|
||||
(ngModelChange)="onFilterSortingModeChange()"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Choose how filter options are sorted in the sidebar.</p>
|
||||
<div class="setting-options">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="filterSortingModes"
|
||||
[(ngModel)]="selectedFilterSortingMode"
|
||||
(ngModelChange)="onFilterSortingModeChange()"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+49
-94
@@ -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 {
|
||||
@@ -28,117 +40,60 @@
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.875rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
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) {
|
||||
gap: 0.5rem;
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
.setting-header-standalone {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
.setting-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
margin-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.9375rem;
|
||||
color: var(--text-color-secondary);
|
||||
}
|
||||
.setting-options {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
|
||||
p-select {
|
||||
min-width: 200px;
|
||||
p-select {
|
||||
min-width: 200px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
min-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--primary-color);
|
||||
@media (max-width: 768px) {
|
||||
min-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+40
-54
@@ -11,69 +11,55 @@
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Metadata Center Display Mode</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Choose whether to open the Metadata Center in the current page or as a popup dialog window.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<div class="button-group">
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="viewMode === 'route'"
|
||||
(click)="onViewModeChange('route')">
|
||||
<i class="pi pi-window-maximize"></i>
|
||||
<span class="option-text">Open in Page</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="viewMode === 'dialog'"
|
||||
(click)="onViewModeChange('dialog')">
|
||||
<i class="pi pi-external-link"></i>
|
||||
<span class="option-text">Open in Dialog</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Choose whether to open the Metadata Center in the current page or as a popup dialog window.</p>
|
||||
<div class="setting-options">
|
||||
<div class="button-group">
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="viewMode === 'route'"
|
||||
(click)="onViewModeChange('route')">
|
||||
<i class="pi pi-window-maximize"></i>
|
||||
<span class="option-text">Open in Page</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="viewMode === 'dialog'"
|
||||
(click)="onViewModeChange('dialog')">
|
||||
<i class="pi pi-external-link"></i>
|
||||
<span class="option-text">Open in Dialog</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Series View Mode</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Enable or disable the series view mode for displaying series information.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<div class="button-group">
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="seriesViewMode === true"
|
||||
(click)="onSeriesViewModeChange(true)">
|
||||
<i class="pi pi-check-circle"></i>
|
||||
<span class="option-text">Enabled</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="seriesViewMode === false"
|
||||
(click)="onSeriesViewModeChange(false)">
|
||||
<i class="pi pi-times-circle"></i>
|
||||
<span class="option-text">Disabled</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Enable or disable the series view mode for displaying series information.</p>
|
||||
<div class="setting-options">
|
||||
<div class="button-group">
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="seriesViewMode === true"
|
||||
(click)="onSeriesViewModeChange(true)">
|
||||
<i class="pi pi-check-circle"></i>
|
||||
<span class="option-text">Enabled</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="option-button"
|
||||
[class.selected]="seriesViewMode === false"
|
||||
(click)="onSeriesViewModeChange(false)">
|
||||
<i class="pi pi-times-circle"></i>
|
||||
<span class="option-text">Disabled</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+41
-125
@@ -1,54 +1,20 @@
|
||||
.main-container {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.settings-header {
|
||||
margin-top: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: var(--card-border);
|
||||
border-bottom-color: var(--p-content-border-color);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -73,104 +39,54 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
.section-body {
|
||||
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;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.875rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
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) {
|
||||
gap: 0.5rem;
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
.setting-header-standalone {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
.setting-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.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;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
.setting-options {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.button-group {
|
||||
|
||||
+33
-54
@@ -11,74 +11,53 @@
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Library</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Choose how library names are sorted and displayed in the sidebar.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="sortingOptions"
|
||||
[(ngModel)]="selectedLibrarySorting"
|
||||
(ngModelChange)="onLibrarySortingChange()"
|
||||
appendTo="body"
|
||||
placeholder="Select Sorting">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Choose how library names are sorted and displayed in the sidebar.</p>
|
||||
<div class="setting-options">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="sortingOptions"
|
||||
[(ngModel)]="selectedLibrarySorting"
|
||||
(ngModelChange)="onLibrarySortingChange()"
|
||||
appendTo="body"
|
||||
placeholder="Select Sorting">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Shelf</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Choose how shelf names are sorted and displayed in the sidebar.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="sortingOptions"
|
||||
[(ngModel)]="selectedShelfSorting"
|
||||
(ngModelChange)="onShelfSortingChange()"
|
||||
appendTo="body"
|
||||
placeholder="Select Sorting">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Choose how shelf names are sorted and displayed in the sidebar.</p>
|
||||
<div class="setting-options">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="sortingOptions"
|
||||
[(ngModel)]="selectedShelfSorting"
|
||||
(ngModelChange)="onShelfSortingChange()"
|
||||
appendTo="body"
|
||||
placeholder="Select Sorting">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Magic Shelf</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Choose how magic shelf names are sorted and displayed in the sidebar.</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="setting-item setting-item-indented">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="sortingOptions"
|
||||
[(ngModel)]="selectedMagicShelfSorting"
|
||||
(ngModelChange)="onMagicShelfSortingChange()"
|
||||
appendTo="body"
|
||||
placeholder="Select Sorting">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="setting-description">Choose how magic shelf names are sorted and displayed in the sidebar.</p>
|
||||
<div class="setting-options">
|
||||
<p-select
|
||||
size="small"
|
||||
[options]="sortingOptions"
|
||||
[(ngModel)]="selectedMagicShelfSorting"
|
||||
(ngModelChange)="onMagicShelfSortingChange()"
|
||||
appendTo="body"
|
||||
placeholder="Select Sorting">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+46
-130
@@ -1,57 +1,22 @@
|
||||
.main-container {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.settings-header {
|
||||
margin-top: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.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;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: var(--card-border);
|
||||
border-bottom-color: var(--p-content-border-color);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -74,110 +39,61 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
.section-body {
|
||||
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;
|
||||
padding-left: 1rem;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.75rem;
|
||||
gap: 0.875rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
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) {
|
||||
gap: 0.5rem;
|
||||
|
||||
&.setting-item-indented {
|
||||
margin-left: 0;
|
||||
padding: 0.625rem 0.625rem 0.5rem 0.625rem;
|
||||
}
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
.setting-header-standalone {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.375rem;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.setting-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.setting-label-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
.setting-description {
|
||||
color: var(--p-text-muted-color);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
margin-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.9375rem;
|
||||
color: var(--text-color-secondary);
|
||||
}
|
||||
.setting-options {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px dashed var(--p-content-border-color);
|
||||
|
||||
p-select {
|
||||
min-width: 200px;
|
||||
p-select {
|
||||
min-width: 200px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
min-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
|
||||
.pi {
|
||||
margin-top: 0.125rem;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.pi-info-circle {
|
||||
color: var(--primary-color);
|
||||
@media (max-width: 768px) {
|
||||
min-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
-26
@@ -11,40 +11,36 @@
|
||||
|
||||
<div class="section-body">
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Default Preferences</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Configure the default sorting field, direction, and view mode for all libraries and shelves.</span>
|
||||
</p>
|
||||
<div class="setting-controls">
|
||||
<p-select size="small" [options]="sortOptions" optionLabel="label" optionValue="field"
|
||||
[(ngModel)]="selectedSort" placeholder="Sort By" appendTo="body"></p-select>
|
||||
<p-select size="small" [options]="sortDirectionOptions" [(ngModel)]="selectedSortDir"
|
||||
placeholder="Direction" appendTo="body"></p-select>
|
||||
<p-select size="small" [options]="viewModeOptions" [(ngModel)]="selectedView"
|
||||
placeholder="View Mode" appendTo="body"></p-select>
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Default Preferences</label>
|
||||
</div>
|
||||
<p class="setting-description">Configure the default sorting field, direction, and view mode for all libraries and shelves.</p>
|
||||
<div class="setting-options">
|
||||
<div class="select-group">
|
||||
<p-select size="small" [options]="sortOptions" optionLabel="label" optionValue="field"
|
||||
[(ngModel)]="selectedSort" placeholder="Sort By" appendTo="body"></p-select>
|
||||
<p-select size="small" [options]="sortDirectionOptions" [(ngModel)]="selectedSortDir"
|
||||
placeholder="Direction" appendTo="body"></p-select>
|
||||
<p-select size="small" [options]="viewModeOptions" [(ngModel)]="selectedView"
|
||||
placeholder="View Mode" appendTo="body"></p-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Auto-save on Navigation</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Automatically save changes when navigating to the next or previous book in the metadata editor.</span>
|
||||
</p>
|
||||
<div class="setting-controls">
|
||||
<label class="control-label">Enabled:</label>
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="autoSaveMetadata"></p-toggleswitch>
|
||||
<label class="setting-label">Auto-save on Navigation</label>
|
||||
</div>
|
||||
<p class="setting-description">Automatically save changes when navigating to the next or previous book in the metadata editor.</p>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label class="setting-label">Override Management</label>
|
||||
<p class="setting-description">
|
||||
<i class="pi pi-info-circle"></i>
|
||||
<span>Add custom preferences for specific libraries or shelves. These will override your default settings.</span>
|
||||
</p>
|
||||
<div class="setting-controls">
|
||||
<div class="setting-header-standalone">
|
||||
<label class="setting-label">Override Management</label>
|
||||
</div>
|
||||
<p class="setting-description">Add custom preferences for specific libraries or shelves. These will override your default settings.</p>
|
||||
<div class="setting-options">
|
||||
<p-button label="Add Override" outlined size="small" (onClick)="addOverride()" icon="pi pi-plus" [disabled]="availableLibraries.length === 0"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,7 +95,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="save-section">
|
||||
<div class="setting-actions">
|
||||
<p-button label="Save Settings" icon="pi pi-save" outlined severity="success" (onClick)="saveSettings()"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+78
-103
@@ -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,125 +39,87 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
.section-body {
|
||||
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-body {
|
||||
padding-left: 1rem;
|
||||
|
||||
> .setting-item {
|
||||
margin-bottom: 0.75rem;
|
||||
@media (max-width: 768px) {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
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) {
|
||||
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-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);
|
||||
}
|
||||
}
|
||||
|
||||
.setting-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.5rem;
|
||||
margin-left: 0;
|
||||
padding: 0.75rem;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
background: var(--p-surface-800);
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: 0.625rem;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
.setting-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.control-label {
|
||||
font-size: 0.9375rem;
|
||||
color: var(--text-color-secondary);
|
||||
font-weight: 600;
|
||||
}
|
||||
.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);
|
||||
}
|
||||
|
||||
.select-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
|
||||
p-select {
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
|
||||
p-select {
|
||||
min-width: 140px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
min-width: 100%;
|
||||
}
|
||||
min-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.overrides-table {
|
||||
width: 100%;
|
||||
margin-top: 1rem;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
|
||||
::ng-deep {
|
||||
.p-datatable {
|
||||
@@ -158,7 +132,7 @@
|
||||
padding: 0.75rem;
|
||||
background: color-mix(in srgb, var(--text-color) 3%, transparent);
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
font-size: 0.875rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.p-datatable-tbody > tr {
|
||||
@@ -167,7 +141,7 @@
|
||||
}
|
||||
|
||||
> td {
|
||||
padding: 0.75rem;
|
||||
padding: 0.625rem;
|
||||
border-bottom: 1px solid color-mix(in srgb, var(--p-content-border-color) 50%, transparent);
|
||||
}
|
||||
|
||||
@@ -179,8 +153,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
.save-section {
|
||||
.setting-actions {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
justify-content: flex-end;
|
||||
padding-top: 0.5rem;
|
||||
border-top: 1px solid var(--p-content-border-color);
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ import {routes} from './app/app.routes';
|
||||
import {AuthInterceptorService} from './app/core/security/auth-interceptor.service';
|
||||
import {AuthService, websocketInitializer} from './app/shared/service/auth.service';
|
||||
import {OAuthStorage, provideOAuthClient} from 'angular-oauth2-oidc';
|
||||
import {inject, provideAppInitializer, provideZoneChangeDetection, isDevMode} from '@angular/core';
|
||||
import {inject, isDevMode, provideAppInitializer, provideZoneChangeDetection} from '@angular/core';
|
||||
import {initializeAuthFactory} from './app/core/security/auth-initializer';
|
||||
import {StartupService} from './app/shared/service/startup.service';
|
||||
import {provideCharts, withDefaultRegisterables} from 'ng2-charts';
|
||||
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
||||
import { provideServiceWorker } from '@angular/service-worker';
|
||||
import {provideServiceWorker} from '@angular/service-worker';
|
||||
|
||||
export function storageFactory(): OAuthStorage {
|
||||
return localStorage;
|
||||
@@ -66,8 +66,8 @@ bootstrapApplication(AppComponent, {
|
||||
}
|
||||
}
|
||||
}), provideServiceWorker('ngsw-worker.js', {
|
||||
enabled: !isDevMode(),
|
||||
registrationStrategy: 'registerWhenStable:30000'
|
||||
})
|
||||
enabled: !isDevMode(),
|
||||
registrationStrategy: 'registerWhenStable:30000'
|
||||
})
|
||||
]
|
||||
}).catch(err => console.error(err));
|
||||
|
||||
Reference in New Issue
Block a user