feat(renderer): PDF viewer with page nav & zoom controls (M10.2)
- PdfViewer.vue: lazy-loads pdfjs-dist, renders to canvas - Page navigation (arrows), zoom controls (50%–200%) - Keyboard navigation (arrow keys) - Integrated into content panel via openPdfViewer() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
edb4bbadcd
commit
7a3d874f5e
@@ -51,6 +51,7 @@ const activeTab = ref<ContentTab>('film')
|
||||
const availableTabs = ref<ContentTab[]>([])
|
||||
const selectedDesignSystemItem = ref<DesignSystemItem | null>(null)
|
||||
const longFormArticle = ref<{ content: string; title?: string } | null>(null)
|
||||
const pdfUrl = ref<{ url: string; title?: string } | null>(null)
|
||||
|
||||
export interface DesignSystemItem {
|
||||
id: string
|
||||
@@ -273,6 +274,7 @@ export function useContentPanel() {
|
||||
selectedMagazineSection.value = null
|
||||
selectedDesignSystemItem.value = null
|
||||
longFormArticle.value = null
|
||||
pdfUrl.value = null
|
||||
}
|
||||
|
||||
function openFilmDetail(film: Film) { clearAllSelections(); selectedFilm.value = film }
|
||||
@@ -296,6 +298,9 @@ export function useContentPanel() {
|
||||
function openLongFormArticle(content: string, title?: string) { clearAllSelections(); longFormArticle.value = { content, title }; panelOpen.value = true }
|
||||
function closeLongFormArticle() { longFormArticle.value = null }
|
||||
|
||||
function openPdfViewer(url: string, title?: string) { clearAllSelections(); pdfUrl.value = { url, title }; panelOpen.value = true }
|
||||
function closePdfViewer() { pdfUrl.value = null }
|
||||
|
||||
function openMagazineSectionDetail(section: MagazineSection, index: number) {
|
||||
clearAllSelections()
|
||||
selectedMagazineSection.value = section
|
||||
@@ -443,6 +448,9 @@ export function useContentPanel() {
|
||||
longFormArticle,
|
||||
openLongFormArticle,
|
||||
closeLongFormArticle,
|
||||
pdfUrl,
|
||||
openPdfViewer,
|
||||
closePdfViewer,
|
||||
enterDesignSystemMode,
|
||||
closePanel,
|
||||
showAllFilms,
|
||||
|
||||
Reference in New Issue
Block a user