### Description This PR implements **Issue #34: [UI/UX] Implement Hybrid Metadata Verification Form in Ingestion Modal**. ### Key Changes - **Metadata Verification State**: Introduced a new state in `BookIngestionModal.razor` allowing users to edit `Title` and `Author` before final ingestion. - **Cover Image Preview**: Added a high-fidelity cover preview with a CSS-based glowing placeholder fallback for books without embedded covers. - **Ingestion Pipeline**: - Implemented `IngestEbookCommand` and `IngestEbookCommandHandler`. - Added `IBookStorageService` and its implementation for managing EPUB and cover file storage. - Exposed `POST /api/library/ingest` Minimal API endpoint with `.DisableAntiforgery()` to handle client-side JSON uploads. - **Stability Fixes**: - Resolved DI validation errors in the WASM client by providing a dummy `IBookStorageService` registration. - Adjusted Kestrel request limits to handle large EPUB payloads (up to 100MB). - Corrected middleware ordering to ensure Antiforgery works correctly with Authentication. ### Verification - Solution builds successfully. - Manual verification of modal state transitions and API ingestion logic. Closes #34. --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #41 Reviewed-by: Marek Jaisński <jasins.marek@gmail.com> Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
This commit was merged in pull request #41.
This commit is contained in:
@@ -242,11 +242,139 @@
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* Verification State */
|
||||
.verification-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
animation: fadeIn 0.4s ease-out;
|
||||
}
|
||||
|
||||
.verification-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 140px 1fr;
|
||||
gap: 2rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.cover-preview {
|
||||
width: 140px;
|
||||
height: 200px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cover-preview img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.glowing-placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.glowing-placeholder::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 150%;
|
||||
height: 150%;
|
||||
background: radial-gradient(circle, var(--nexus-neon-alpha, rgba(0, 255, 153, 0.15)) 0%, transparent 70%);
|
||||
animation: pulseGlow 4s infinite alternate;
|
||||
}
|
||||
|
||||
.glowing-placeholder svg {
|
||||
color: var(--nexus-neon, #00ffaa);
|
||||
opacity: 0.5;
|
||||
z-index: 1;
|
||||
filter: drop-shadow(0 0 10px var(--nexus-neon-alpha-deep, rgba(0, 255, 153, 0.3)));
|
||||
}
|
||||
|
||||
.verification-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: var(--nexus-text-muted, #888);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
padding: 0.75rem 1rem;
|
||||
color: var(--nexus-text);
|
||||
font-family: var(--nexus-font-sans);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.form-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--nexus-neon, #00ffaa);
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
box-shadow: 0 0 15px rgba(0, 255, 153, 0.1);
|
||||
}
|
||||
|
||||
.error-message {
|
||||
margin-top: 1rem;
|
||||
color: #ff5555;
|
||||
color: var(--nexus-error, #ff5555);
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
padding: 0.75rem;
|
||||
background: var(--nexus-error-alpha, rgba(255, 85, 85, 0.1));
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--nexus-error-alpha-deep, rgba(255, 85, 85, 0.2));
|
||||
}
|
||||
|
||||
@keyframes pulseGlow {
|
||||
from { transform: scale(1); opacity: 0.5; }
|
||||
to { transform: scale(1.2); opacity: 0.8; }
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.btn-loading {
|
||||
position: relative;
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
.btn-loading::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 2px solid rgba(0, 0, 0, 0.1);
|
||||
border-top-color: #000;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
|
||||
Reference in New Issue
Block a user