From acef302de422e276261e712241949ce8fb9904d1 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:13:40 +0100 Subject: example: add sample EPUB file --- example/src/Misc Media/First Geneva Convention.epub | Bin 0 -> 80897 bytes example/src/gallery.yaml | 1 + 2 files changed, 1 insertion(+) create mode 100644 example/src/Misc Media/First Geneva Convention.epub diff --git a/example/src/Misc Media/First Geneva Convention.epub b/example/src/Misc Media/First Geneva Convention.epub new file mode 100644 index 0000000..4274ab7 Binary files /dev/null and b/example/src/Misc Media/First Geneva Convention.epub differ diff --git a/example/src/gallery.yaml b/example/src/gallery.yaml index 1a6cd69..c13cdca 100644 --- a/example/src/gallery.yaml +++ b/example/src/gallery.yaml @@ -10,6 +10,7 @@ includedFiles: - '*.txt' - '*.md' - '*.pdf' + - '*.epub' - '*.ogg' - '*.mp4' -- cgit v1.2.3 From 736520e5e17eee490565c98cd037363fd3e34aed Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:14:07 +0100 Subject: compiler,viewer: register EPUB item type --- compiler/src/ItemProcessors.hs | 5 ++++- compiler/src/Resource.hs | 1 + viewer/src/@types/gallery.ts | 6 ++++++ viewer/src/@types/itemType.ts | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/compiler/src/ItemProcessors.hs b/compiler/src/ItemProcessors.hs index fa99316..6035477 100644 --- a/compiler/src/ItemProcessors.hs +++ b/compiler/src/ItemProcessors.hs @@ -1,7 +1,7 @@ -- ldgallery - A static generator which turns a collection of tagged -- pictures into a searchable web gallery. -- --- Copyright (C) 2019-2021 Pacien TRAN-GIRARD +-- Copyright (C) 2019-2022 Pacien TRAN-GIRARD -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as @@ -38,6 +38,7 @@ data Format = | PlainTextFormat | MarkdownFormat | PortableDocumentFormat + | EPUBFormat | VideoFormat | AudioFormat | Unknown @@ -59,6 +60,7 @@ formatFromPath = ".txt" -> PlainTextFormat ".md" -> MarkdownFormat ".pdf" -> PortableDocumentFormat + ".epub" -> EPUBFormat ".wav" -> AudioFormat ".oga" -> AudioFormat ".ogg" -> AudioFormat @@ -103,6 +105,7 @@ itemFileProcessor maxResolution = processorFor PlainTextFormat _ = copyResource PlainText processorFor MarkdownFormat _ = copyResource Markdown processorFor PortableDocumentFormat _ = copyResource PDF + processorFor EPUBFormat _ = copyResource EPUB processorFor VideoFormat _ = copyResource Video processorFor AudioFormat _ = copyResource Audio processorFor Unknown _ = copyResource Other diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs index 804c9a1..1868512 100644 --- a/compiler/src/Resource.hs +++ b/compiler/src/Resource.hs @@ -92,6 +92,7 @@ data GalleryItemProps = | PlainText { resource :: Resource } | Markdown { resource :: Resource } | PDF { resource :: Resource } + | EPUB { resource :: Resource } | Video { resource :: Resource } | Audio { resource :: Resource } | Other { resource :: Resource } diff --git a/viewer/src/@types/gallery.ts b/viewer/src/@types/gallery.ts index 8c0f177..6960de2 100644 --- a/viewer/src/@types/gallery.ts +++ b/viewer/src/@types/gallery.ts @@ -64,6 +64,9 @@ export interface MarkdownProperties extends Downloadable { export interface PDFProperties extends Downloadable { type: ItemType.PDF; } +export interface EPUBProperties extends Downloadable { + type: ItemType.EPUB; +} export interface VideoProperties extends Downloadable { type: ItemType.VIDEO; } @@ -107,6 +110,9 @@ export interface MarkdownItem extends Item { export interface PDFItem extends Item { properties: PDFProperties; } +export interface EPUBItem extends Item { + properties: EPUBProperties; +} export interface VideoItem extends Item { properties: VideoProperties; } diff --git a/viewer/src/@types/itemType.ts b/viewer/src/@types/itemType.ts index ecab05c..8528728 100644 --- a/viewer/src/@types/itemType.ts +++ b/viewer/src/@types/itemType.ts @@ -23,6 +23,7 @@ export enum ItemType { PLAINTEXT = 'plaintext', MARKDOWN = 'markdown', PDF = 'pdf', + EPUB = 'epub', VIDEO = 'video', AUDIO = 'audio', DIRECTORY = 'directory', -- cgit v1.2.3 From afe4a270a6ad7a591dd47e4069b79ea2ead531b1 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:18:51 +0100 Subject: viewer: set icon type for EPUB items --- viewer/src/services/navigation.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/viewer/src/services/navigation.ts b/viewer/src/services/navigation.ts index b2e807b..fb01169 100644 --- a/viewer/src/services/navigation.ts +++ b/viewer/src/services/navigation.ts @@ -19,7 +19,18 @@ import { DirectoryItem, DownloadableItem, Item } from '@/@types/gallery'; import { ItemType } from '@/@types/itemType'; -import { faFile, faFileAlt, faFileAudio, faFilePdf, faFileVideo, faFolder, faHome, faImage, IconDefinition } from '@fortawesome/free-solid-svg-icons'; +import { + faFile, + faFileAlt, + faFileAudio, + faFilePdf, + faBook, + faFileVideo, + faFolder, + faHome, + faImage, + IconDefinition, +} from '@fortawesome/free-solid-svg-icons'; import { isDirectory } from './itemGuards'; const ICON_BY_TYPE: Record = { @@ -28,6 +39,7 @@ const ICON_BY_TYPE: Record = { plaintext: faFileAlt, markdown: faFileAlt, pdf: faFilePdf, + epub: faBook, video: faFileVideo, audio: faFileAudio, other: faFile, -- cgit v1.2.3 From 6518bf8e8857d1da620f593293f399f38f5f473e Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:19:20 +0100 Subject: viewer/man: add EPUB to the list of supported formats --- viewer/ldgallery-viewer.7.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/viewer/ldgallery-viewer.7.md b/viewer/ldgallery-viewer.7.md index 46509fb..afdaec5 100644 --- a/viewer/ldgallery-viewer.7.md +++ b/viewer/ldgallery-viewer.7.md @@ -2,7 +2,7 @@ pagetitle: Viewer user manual - ldgallery title: LDGALLERY-VIEWER(7) ldgallery author: Pacien TRAN-GIRARD, Guillaume FOUET -date: 2022-10-26 (v2.1-SNAPSHOT) +date: 2022-10-30 (v2.1-SNAPSHOT) --- @@ -37,8 +37,8 @@ Items of the following formats can be opened and visualised within the web appli * Pictures (Bitmap, JPEG, PNG, TIFF, HDR, GIF) * Videos (OGV, WebM, Matroska, MPEG-4) * Audio files (WAV, Opus, FLAC, MP3, MPEG-4) -* Plain text files (`.txt`) -* PDFs +* Text files (TXT, Markdown) +* Ebooks (PDF, EPUB) Formats which are not listed above or which are not supported by the user's web browser are offered for download instead of being directly displayed in the same window. The item being visualised can be downloaded using the download button at the top-left corner. -- cgit v1.2.3 From 3ceae7626521c59eb39f058771603948a113d3a7 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:18:33 +0100 Subject: viewer: add Epub.js as new dependency --- readme.md | 1 + viewer/package.json | 1 + viewer/yarn.lock | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 151 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index b363490..0d4ed9f 100644 --- a/readme.md +++ b/readme.md @@ -77,6 +77,7 @@ Builds of this software embed and make use of the following libraries: * fortawesome/vue-fontawesome, licensed under the MIT License * vueuse/core, licensed under the MIT License * core-js, licensed under the MIT License + * Epub.js, licensed under the BSD-2-Clause License * hammerjs, licensed under the MIT License * marked, licensed under the MIT License * mosha-vue-toastify, licensed under the MIT License diff --git a/viewer/package.json b/viewer/package.json index f5ac5e3..61ea287 100644 --- a/viewer/package.json +++ b/viewer/package.json @@ -14,6 +14,7 @@ "@fortawesome/vue-fontawesome": "3.0.1", "@vueuse/core": "9.3.1", "core-js": "3.25.0", + "epubjs": "0.3.93", "hammerjs": "2.0.8", "marked": "4.1.1", "mosha-vue-toastify": "1.0.23", diff --git a/viewer/yarn.lock b/viewer/yarn.lock index 7991def..cd9f495 100644 --- a/viewer/yarn.lock +++ b/viewer/yarn.lock @@ -1292,6 +1292,13 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/localforage@0.0.34": + version "0.0.34" + resolved "https://registry.yarnpkg.com/@types/localforage/-/localforage-0.0.34.tgz#5e31c32dd8791ec4b9ff3ef47c9cb55b2d0d9438" + integrity sha512-tJxahnjm9dEI1X+hQSC5f2BSd/coZaqbIl1m3TCl0q9SVuC52XcXfV0XmoCU1+PmjyucuVITwoTnN8OlTbEXXA== + dependencies: + localforage "*" + "@types/marked@4.0.7": version "4.0.7" resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.7.tgz#400a76809fd08c2bbd9e25f3be06ea38c8e0a1d3" @@ -2090,6 +2097,11 @@ "@webassemblyjs/ast" "1.11.1" "@xtuc/long" "4.2.2" +"@xmldom/xmldom@^0.7.5": + version "0.7.7" + resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.7.7.tgz#16bd8a4e5c953018b8168e5d0a7d26b117cd7fa9" + integrity sha512-RwEdIYho2kjbSZ7fpvhkHy5wk1Y3x0O6e/EHL3/SoiAfFWH+yhV2/XZQvsBoAeGRNFwgScJS/gRZv+uIwoj7yA== + "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -2777,7 +2789,7 @@ core-js@3.25.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.25.0.tgz#be71d9e0dd648ffd70c44a7ec2319d039357eceb" integrity sha512-CVU1xvJEfJGhyCpBrzzzU1kjCfgsGUxhEvwUV2e/cOedYWHdmluamx+knDnmhqALddMG16fZvIqvs9aijsHHaA== -core-js@^3.8.3: +core-js@^3.18.3, core-js@^3.8.3: version "3.26.0" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.0.tgz#a516db0ed0811be10eac5d94f3b8463d03faccfe" integrity sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw== @@ -2959,6 +2971,14 @@ csstype@^2.6.8: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.21.tgz#2efb85b7cc55c80017c66a5ad7cbd931fda3a90e" integrity sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w== +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + debug@2.6.9, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3185,6 +3205,21 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== +epubjs@0.3.93: + version "0.3.93" + resolved "https://registry.yarnpkg.com/epubjs/-/epubjs-0.3.93.tgz#100c4597db152fc07d5246be38acca928b6b0b22" + integrity sha512-c06pNSdBxcXv3dZSbXAVLE1/pmleRhOT6mXNZo6INKmvuKpYB65MwU/lO7830czCtjIiK9i+KR+3S+p0wtljrw== + dependencies: + "@types/localforage" "0.0.34" + "@xmldom/xmldom" "^0.7.5" + core-js "^3.18.3" + event-emitter "^0.3.5" + jszip "^3.7.1" + localforage "^1.10.0" + lodash "^4.17.21" + marks-pane "^1.0.9" + path-webpack "0.0.3" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3250,6 +3285,32 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@~0.10.14: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3532,6 +3593,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + event-pubsub@4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/event-pubsub/-/event-pubsub-4.3.0.tgz#f68d816bc29f1ec02c539dc58c8dd40ce72cb36e" @@ -3625,6 +3694,13 @@ express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -4142,6 +4218,11 @@ ignore@^5.1.1, ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + immutable@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" @@ -4515,6 +4596,16 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jszip@^3.7.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + setimmediate "^1.0.5" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -4548,6 +4639,20 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + lilconfig@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" @@ -4581,6 +4686,13 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" +localforage@*, localforage@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -4686,6 +4798,11 @@ marked@4.1.1: resolved "https://registry.yarnpkg.com/marked/-/marked-4.1.1.tgz#2f709a4462abf65a283f2453dc1c42ab177d302e" integrity sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw== +marks-pane@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/marks-pane/-/marks-pane-1.0.9.tgz#c0b5ab813384d8cd81faaeb3bbf3397dc809c1b3" + integrity sha512-Ahs4oeG90tbdPWwAJkAAoHg2lRR8lAs9mZXETNPO9hYg3AkjUJBKi1NQ4aaIQZVGrig7c/3NUV1jANl8rFTeMg== + mdn-data@2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" @@ -4870,6 +4987,11 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -5096,6 +5218,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pako@~1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" @@ -5186,6 +5313,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-webpack@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/path-webpack/-/path-webpack-0.0.3.tgz#ff6dec749eec5a94605c04d5f63fc55607a03a16" + integrity sha512-AmeDxedoo5svf7aB3FYqSAKqMxys014lVKBzy1o/5vv9CtU7U4wgGWL1dA2o6MOzcD53ScN4Jmiq6VbtLz1vIQ== + picocolors@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" @@ -5600,7 +5732,7 @@ read-pkg@^5.1.1, read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@^2.0.1: +readable-stream@^2.0.1, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -5932,6 +6064,11 @@ serve-static@1.15.0: parseurl "~1.3.3" send "0.18.0" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" @@ -6419,6 +6556,16 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typescript@4.8.4: version "4.8.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" -- cgit v1.2.3 From 8d514e10db70433adc308bb7af705ef064807091 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 18 Nov 2022 22:34:28 +0100 Subject: viewer: update lock file It was missing vue-tsc and its dependencies. --- viewer/yarn.lock | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/viewer/yarn.lock b/viewer/yarn.lock index cd9f495..5715dfe 100644 --- a/viewer/yarn.lock +++ b/viewer/yarn.lock @@ -1550,6 +1550,51 @@ "@typescript-eslint/types" "5.41.0" eslint-visitor-keys "^3.3.0" +"@volar/language-core@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-1.0.9.tgz#d12456b294d1e5b3928b22e5214c8e7141ee2ce1" + integrity sha512-5Fty3slLet6svXiJw2YxhYeo6c7wFdtILrql5bZymYLM+HbiZtJbryW1YnUEKAP7MO9Mbeh+TNH4Z0HFxHgIqw== + dependencies: + "@volar/source-map" "1.0.9" + "@vue/reactivity" "^3.2.40" + muggle-string "^0.1.0" + +"@volar/source-map@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@volar/source-map/-/source-map-1.0.9.tgz#00aa951d3d7f9b842f84e28ab2a1831ab3b5b95a" + integrity sha512-fazB/vy5ZEJ3yKx4fabJyGNI3CBkdLkfEIRVu6+1P3VixK0Mn+eqyUIkLBrzGYaeFM3GybhCLCvsVdNz0Fu/CQ== + dependencies: + muggle-string "^0.1.0" + +"@volar/typescript@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@volar/typescript/-/typescript-1.0.9.tgz#9c0a8b5d79c0a03413755499d211c1c8001ac0cc" + integrity sha512-dVziu+ShQUWuMukM6bvK2v2O446/gG6l1XkTh2vfkccw1IzjfbiP1TWQoNo1ipTfZOtu5YJGYAx+o5HNrGXWfQ== + dependencies: + "@volar/language-core" "1.0.9" + +"@volar/vue-language-core@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@volar/vue-language-core/-/vue-language-core-1.0.9.tgz#9eb7c30652c80f210fca071aeeea794873835eda" + integrity sha512-tofNoR8ShPFenHT1YVMuvoXtXWwoQE+fiXVqSmW0dSKZqEDjWQ3YeXSd0a6aqyKaIbvR7kWWGp34WbpQlwf9Ww== + dependencies: + "@volar/language-core" "1.0.9" + "@volar/source-map" "1.0.9" + "@vue/compiler-dom" "^3.2.40" + "@vue/compiler-sfc" "^3.2.40" + "@vue/reactivity" "^3.2.40" + "@vue/shared" "^3.2.40" + minimatch "^5.1.0" + vue-template-compiler "^2.7.10" + +"@volar/vue-typescript@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@volar/vue-typescript/-/vue-typescript-1.0.9.tgz#47ae4424283ec42c0b3321a4efbd4c505de3fe16" + integrity sha512-ZLe4y9YNbviACa7uAMCilzxA76gbbSlKfjspXBzk6fCobd8QCIig+VyDYcjANIlm2HhgSCX8jYTzhCKlegh4mw== + dependencies: + "@volar/typescript" "1.0.9" + "@volar/vue-language-core" "1.0.9" + "@vue/babel-helper-vue-jsx-merge-props@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2" @@ -1816,6 +1861,16 @@ estree-walker "^2.0.2" source-map "^0.6.1" +"@vue/compiler-core@3.2.45": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.45.tgz#d9311207d96f6ebd5f4660be129fb99f01ddb41b" + integrity sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/shared" "3.2.45" + estree-walker "^2.0.2" + source-map "^0.6.1" + "@vue/compiler-dom@3.2.41": version "3.2.41" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.41.tgz#dc63dcd3ce8ca8a8721f14009d498a7a54380299" @@ -1824,6 +1879,14 @@ "@vue/compiler-core" "3.2.41" "@vue/shared" "3.2.41" +"@vue/compiler-dom@3.2.45", "@vue/compiler-dom@^3.2.40": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.45.tgz#c43cc15e50da62ecc16a42f2622d25dc5fd97dce" + integrity sha512-tyYeUEuKqqZO137WrZkpwfPCdiiIeXYCcJ8L4gWz9vqaxzIQRccTSwSWZ/Axx5YR2z+LvpUbmPNXxuBU45lyRw== + dependencies: + "@vue/compiler-core" "3.2.45" + "@vue/shared" "3.2.45" + "@vue/compiler-sfc@3.2.41": version "3.2.41" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.41.tgz#238fb8c48318408c856748f4116aff8cc1dc2a73" @@ -1840,6 +1903,22 @@ postcss "^8.1.10" source-map "^0.6.1" +"@vue/compiler-sfc@^3.2.40": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.45.tgz#7f7989cc04ec9e7c55acd406827a2c4e96872c70" + integrity sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/compiler-core" "3.2.45" + "@vue/compiler-dom" "3.2.45" + "@vue/compiler-ssr" "3.2.45" + "@vue/reactivity-transform" "3.2.45" + "@vue/shared" "3.2.45" + estree-walker "^2.0.2" + magic-string "^0.25.7" + postcss "^8.1.10" + source-map "^0.6.1" + "@vue/compiler-ssr@3.2.41": version "3.2.41" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.41.tgz#344f564d68584b33367731c04ffc949784611fcb" @@ -1848,6 +1927,14 @@ "@vue/compiler-dom" "3.2.41" "@vue/shared" "3.2.41" +"@vue/compiler-ssr@3.2.45": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.45.tgz#bd20604b6e64ea15344d5b6278c4141191c983b2" + integrity sha512-6BRaggEGqhWht3lt24CrIbQSRD5O07MTmd+LjAn5fJj568+R9eUD2F7wMQJjX859seSlrYog7sUtrZSd7feqrQ== + dependencies: + "@vue/compiler-dom" "3.2.45" + "@vue/shared" "3.2.45" + "@vue/component-compiler-utils@^3.1.0", "@vue/component-compiler-utils@^3.3.0": version "3.3.0" resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz#f9f5fb53464b0c37b2c8d2f3fbfe44df60f61dc9" @@ -1901,6 +1988,17 @@ estree-walker "^2.0.2" magic-string "^0.25.7" +"@vue/reactivity-transform@3.2.45": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.45.tgz#07ac83b8138550c83dfb50db43cde1e0e5e8124d" + integrity sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ== + dependencies: + "@babel/parser" "^7.16.4" + "@vue/compiler-core" "3.2.45" + "@vue/shared" "3.2.45" + estree-walker "^2.0.2" + magic-string "^0.25.7" + "@vue/reactivity@3.2.41": version "3.2.41" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.41.tgz#0ad3bdf76d76822da1502dc9f394dafd02642963" @@ -1908,6 +2006,13 @@ dependencies: "@vue/shared" "3.2.41" +"@vue/reactivity@^3.2.40": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.45.tgz#412a45b574de601be5a4a5d9a8cbd4dee4662ff0" + integrity sha512-PRvhCcQcyEVohW0P8iQ7HDcIOXRjZfAsOds3N99X/Dzewy8TVhTCT4uXpAHfoKjVTJRA0O0K+6QNkDIZAxNi3A== + dependencies: + "@vue/shared" "3.2.45" + "@vue/runtime-core@3.2.41": version "3.2.41" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.41.tgz#775bfc00b3fadbaddab77138f23322aee3517a76" @@ -1938,6 +2043,11 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.41.tgz#fbc95422df654ea64e8428eced96ba6ad555d2bb" integrity sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw== +"@vue/shared@3.2.45", "@vue/shared@^3.2.40": + version "3.2.45" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.45.tgz#a3fffa7489eafff38d984e23d0236e230c818bc2" + integrity sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg== + "@vue/vue-loader-v15@npm:vue-loader@^15.9.7": version "15.10.0" resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-15.10.0.tgz#2a12695c421a2a2cc2138f05a949d04ed086e38b" @@ -2429,6 +2539,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -2979,6 +3096,11 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" +de-indent@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" + integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== + debug@2.6.9, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -4901,6 +5023,13 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" + integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" @@ -4950,6 +5079,11 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +muggle-string@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/muggle-string/-/muggle-string-0.1.0.tgz#1fda8a281c8b27bb8b70466dbc9f27586a8baa6c" + integrity sha512-Tr1knR3d2mKvvWthlk7202rywKbiOm4rVFLsfAaSIhJ6dt9o47W4S+JMtWhd/PW9Wrdew2/S2fSvhz3E2gkfEg== + multicast-dns@^7.2.5: version "7.2.5" resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" @@ -6746,11 +6880,27 @@ vue-style-loader@^4.1.0, vue-style-loader@^4.1.3: hash-sum "^1.0.2" loader-utils "^1.0.2" +vue-template-compiler@^2.7.10: + version "2.7.14" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz#4545b7dfb88090744c1577ae5ac3f964e61634b1" + integrity sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ== + dependencies: + de-indent "^1.0.2" + he "^1.2.0" + vue-template-es2015-compiler@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== +vue-tsc@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-1.0.9.tgz#7d388ec3097bc9c1789d5745a97c608217af4873" + integrity sha512-vRmHD1K6DmBymNhoHjQy/aYKTRQNLGOu2/ESasChG9Vy113K6CdP0NlhR0bzgFJfv2eFB9Ez/9L5kIciUajBxQ== + dependencies: + "@volar/vue-language-core" "1.0.9" + "@volar/vue-typescript" "1.0.9" + vue@3.2.41, vue@^3.2.37: version "3.2.41" resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.41.tgz#ed452b8a0f7f2b962f055c8955139c28b1c06806" -- cgit v1.2.3 From a8736b0edb99ad433c8a7795ea1f31a8751c2f41 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:20:38 +0100 Subject: viewer/epub: add EPUB item handler This adds a paginated ePub viewer using epub.js. --- viewer/src/assets/scss/theme.scss | 2 + viewer/src/locales/en.yml | 3 + viewer/src/views/GalleryNavigation.vue | 2 + .../views/item_handlers/async/AsyncEpubViewer.vue | 149 +++++++++++++++++++++ viewer/src/views/item_handlers/async/index.ts | 23 ++++ 5 files changed, 179 insertions(+) create mode 100644 viewer/src/views/item_handlers/async/AsyncEpubViewer.vue create mode 100644 viewer/src/views/item_handlers/async/index.ts diff --git a/viewer/src/assets/scss/theme.scss b/viewer/src/assets/scss/theme.scss index 63febbf..fe70f17 100644 --- a/viewer/src/assets/scss/theme.scss +++ b/viewer/src/assets/scss/theme.scss @@ -41,6 +41,8 @@ $dropdown-item-color: $palette-600; $dropdown-item-hover-color: $palette-500; $panel-top-bgcolor: $palette-800; $panel-top-txtcolor: $primary; +$panel-bottom-bgcolor: $palette-800; +$panel-bottom-txtcolor: $primary; $panel-left-bgcolor: $palette-800; $panel-left-txtcolor: $primary; $command-buttons-bgcolor: $palette-700; diff --git a/viewer/src/locales/en.yml b/viewer/src/locales/en.yml index 86ecd49..280f18b 100644 --- a/viewer/src/locales/en.yml +++ b/viewer/src/locales/en.yml @@ -15,6 +15,9 @@ directory: no-results: Empty directory download: download-file-fmt: Download {0} +epubViewer: + previousSection: Previous section + nextSection: Next section gallery: resource-loading-error: Error loading resource unknown-resource: Resource not found diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 0869aaf..b342c52 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -44,6 +44,7 @@ import { computedEager } from '@vueuse/shared'; import { computed, watchEffect } from 'vue'; import { useI18n } from 'vue-i18n'; import GallerySearch from './GallerySearch.vue'; +import { EpubViewer } from './item_handlers/async'; import AudioViewer from './item_handlers/AudioViewer.vue'; import DirectoryViewer from './item_handlers/DirectoryViewer.vue'; import DownloadViewer from './item_handlers/DownloadViewer.vue'; @@ -67,6 +68,7 @@ const COMPONENT_BY_TYPE: Record = { plaintext: PlainTextViewer, markdown: MarkdownViewer, pdf: PdfViewer, + epub: EpubViewer, video: VideoViewer, audio: AudioViewer, other: DownloadViewer, diff --git a/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue b/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue new file mode 100644 index 0000000..712a844 --- /dev/null +++ b/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue @@ -0,0 +1,149 @@ + + + + + + + diff --git a/viewer/src/views/item_handlers/async/index.ts b/viewer/src/views/item_handlers/async/index.ts new file mode 100644 index 0000000..d4ca996 --- /dev/null +++ b/viewer/src/views/item_handlers/async/index.ts @@ -0,0 +1,23 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2022 Pacien TRAN-GIRARD +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + +import { defineAsyncComponent } from 'vue'; + +export const EpubViewer = defineAsyncComponent(() => + import(/* webpackChunkName: "epub-viewer" */ './AsyncEpubViewer.vue')); -- cgit v1.2.3 From f6ce45309e3d0c2b165aaa1d4d3ac24ba08d466f Mon Sep 17 00:00:00 2001 From: Zéro~Informatique Date: Sun, 27 Nov 2022 21:00:56 +0100 Subject: viewer/epub: resize on drawer movement Fixed data leaks (view.innerHTML + rendered event) --- .../views/item_handlers/async/AsyncEpubViewer.vue | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue b/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue index 712a844..20b1bee 100644 --- a/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue +++ b/viewer/src/views/item_handlers/async/AsyncEpubViewer.vue @@ -52,43 +52,50 @@