fix(web): lecteurs EPUB/PDF — gestion d'erreurs, worker pdf.js local
Composant ReaderError avec diagnostic et actions de repli, worker pdf.js servi localement (pdfWorker) pour éviter les CDN, typage du view foliate, navigation retour vers la fiche livre et styles lecteur associés. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -676,8 +676,23 @@ select {
|
||||
min-height: calc(100vh - 120px);
|
||||
}
|
||||
|
||||
.epub-host {
|
||||
display: grid;
|
||||
width: min(100%, 980px);
|
||||
height: calc(100vh - 170px);
|
||||
min-height: 460px;
|
||||
}
|
||||
|
||||
.epub-view {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
background: #f7f0df;
|
||||
color: #17110d;
|
||||
}
|
||||
|
||||
.pdf-reader canvas,
|
||||
.epub-reader iframe,
|
||||
.cbz-reader img {
|
||||
max-width: min(100%, 980px);
|
||||
max-height: calc(100vh - 170px);
|
||||
@ -691,11 +706,6 @@ select {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.epub-reader iframe {
|
||||
width: min(100%, 980px);
|
||||
height: calc(100vh - 170px);
|
||||
}
|
||||
|
||||
.reader-fallback {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@ -712,6 +722,46 @@ select {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.reader-error {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
width: min(100%, 620px);
|
||||
padding: 18px;
|
||||
border: 1px solid rgba(169, 72, 52, 0.72);
|
||||
border-radius: var(--radius);
|
||||
background: rgba(169, 72, 52, 0.14);
|
||||
}
|
||||
|
||||
.reader-error p {
|
||||
margin-bottom: 0;
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.reader-error-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.reader-error a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.reader-error details {
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.reader-error summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.reader-error pre {
|
||||
overflow: auto;
|
||||
max-width: 100%;
|
||||
margin: 10px 0 0;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
@ -786,18 +836,21 @@ select {
|
||||
.provider-row,
|
||||
.provider-local,
|
||||
.schedule-controls,
|
||||
.save-bar {
|
||||
.save-bar,
|
||||
.reader-error-actions {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.save-bar,
|
||||
.save-bar div,
|
||||
.provider-actions {
|
||||
.provider-actions,
|
||||
.reader-error-actions {
|
||||
justify-content: stretch;
|
||||
}
|
||||
|
||||
.save-bar div,
|
||||
.provider-actions {
|
||||
.provider-actions,
|
||||
.reader-error-actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user