fix: vocab worksheet fills full browser width, fix missing thumbnails
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 25s
CI / test-go-edu-search (push) Successful in 27s
CI / test-python-klausur (push) Failing after 1m51s
CI / test-python-agent-core (push) Successful in 15s
CI / test-nodejs-website (push) Successful in 17s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 25s
CI / test-go-edu-search (push) Successful in 27s
CI / test-python-klausur (push) Failing after 1m51s
CI / test-python-agent-core (push) Successful in 15s
CI / test-nodejs-website (push) Successful in 17s
- Remove max-w-7xl constraint on content area so panels stretch to edges - Fall back to direct API thumbnail URLs when blob URLs are empty - Original pages now reliably show even if preloaded thumbnails failed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -891,7 +891,7 @@ export default function VocabWorksheetPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="relative z-10 max-w-7xl mx-auto px-6 py-6">
|
||||
<div className="relative z-10 w-full px-6 py-6">
|
||||
{/* OCR Settings Panel */}
|
||||
{showSettings && (
|
||||
<div className={`${glassCard} rounded-2xl p-6 mb-6`}>
|
||||
@@ -1428,9 +1428,18 @@ export default function VocabWorksheetPage() {
|
||||
const processedPageIndices = selectedPages.length > 0
|
||||
? selectedPages
|
||||
: [...new Set(vocabulary.map(v => (v.source_page || 1) - 1))].sort((a, b) => a - b)
|
||||
|
||||
// Use blob URLs if available, otherwise fall back to direct API URLs
|
||||
const apiBase = getApiBase()
|
||||
const thumbsToShow = processedPageIndices
|
||||
.filter(idx => idx >= 0 && idx < pagesThumbnails.length)
|
||||
.map(idx => ({ idx, src: pagesThumbnails[idx] }))
|
||||
.filter(idx => idx >= 0)
|
||||
.map(idx => ({
|
||||
idx,
|
||||
src: (idx < pagesThumbnails.length && pagesThumbnails[idx])
|
||||
? pagesThumbnails[idx]
|
||||
: session ? `${apiBase}/api/v1/vocab/sessions/${session.id}/pdf-thumbnail/${idx}?hires=true` : null,
|
||||
}))
|
||||
.filter(t => t.src !== null) as { idx: number; src: string }[]
|
||||
|
||||
if (thumbsToShow.length > 0) {
|
||||
return thumbsToShow.map(({ idx, src }) => (
|
||||
|
||||
Reference in New Issue
Block a user