@ginhotaru282/reader 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +15 -0
- package/.next/build-manifest.json +20 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +114 -0
- package/.next/required-server-files.json +334 -0
- package/.next/routes-manifest.json +149 -0
- package/.next/server/app/(reader)/[id]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/(reader)/[id]/page/build-manifest.json +16 -0
- package/.next/server/app/(reader)/[id]/page/next-font-manifest.json +15 -0
- package/.next/server/app/(reader)/[id]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/(reader)/[id]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/(reader)/[id]/page.js +16 -0
- package/.next/server/app/(reader)/[id]/page.js.map +5 -0
- package/.next/server/app/(reader)/[id]/page.js.nft.json +1 -0
- package/.next/server/app/(reader)/[id]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +16 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +9 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +15 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +16 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +16 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route/build-manifest.json +9 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route.js +6 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route.js.map +5 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route.js.nft.json +1 -0
- package/.next/server/app/api/bookmark/[id]/toggle/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chapter/[id]/audio/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chapter/[id]/audio/route/build-manifest.json +9 -0
- package/.next/server/app/api/chapter/[id]/audio/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chapter/[id]/audio/route.js +6 -0
- package/.next/server/app/api/chapter/[id]/audio/route.js.map +5 -0
- package/.next/server/app/api/chapter/[id]/audio/route.js.nft.json +1 -0
- package/.next/server/app/api/chapter/[id]/audio/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route/build-manifest.json +9 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route.js +6 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route.js.map +5 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route.js.nft.json +1 -0
- package/.next/server/app/api/chapter/[id]/audio-status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chapter/[id]/unlock/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chapter/[id]/unlock/route/build-manifest.json +9 -0
- package/.next/server/app/api/chapter/[id]/unlock/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chapter/[id]/unlock/route.js +6 -0
- package/.next/server/app/api/chapter/[id]/unlock/route.js.map +5 -0
- package/.next/server/app/api/chapter/[id]/unlock/route.js.nft.json +1 -0
- package/.next/server/app/api/chapter/[id]/unlock/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/comment/story/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/comment/story/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/comment/story/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/comment/story/[id]/route.js +6 -0
- package/.next/server/app/api/comment/story/[id]/route.js.map +5 -0
- package/.next/server/app/api/comment/story/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/comment/story/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/reading-progress/[storyId]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/reading-progress/[storyId]/route/build-manifest.json +9 -0
- package/.next/server/app/api/reading-progress/[storyId]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/reading-progress/[storyId]/route.js +6 -0
- package/.next/server/app/api/reading-progress/[storyId]/route.js.map +5 -0
- package/.next/server/app/api/reading-progress/[storyId]/route.js.nft.json +1 -0
- package/.next/server/app/api/reading-progress/[storyId]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/reading-progress/sync/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/reading-progress/sync/route/build-manifest.json +9 -0
- package/.next/server/app/api/reading-progress/sync/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/reading-progress/sync/route.js +6 -0
- package/.next/server/app/api/reading-progress/sync/route.js.map +5 -0
- package/.next/server/app/api/reading-progress/sync/route.js.nft.json +1 -0
- package/.next/server/app/api/reading-progress/sync/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route/build-manifest.json +9 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route.js +6 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route.js.map +5 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route.js.nft.json +1 -0
- package/.next/server/app/api/story/[id]/combo-unlock/route_client-reference-manifest.js +3 -0
- package/.next/server/app/icon.png/route/app-paths-manifest.json +3 -0
- package/.next/server/app/icon.png/route/build-manifest.json +9 -0
- package/.next/server/app/icon.png/route.js +7 -0
- package/.next/server/app/icon.png/route.js.map +5 -0
- package/.next/server/app/icon.png/route.js.nft.json +1 -0
- package/.next/server/app/icon.png.body +0 -0
- package/.next/server/app/icon.png.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +16 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/index.segments/_full.segment.rsc +16 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +16 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +14 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +15 -0
- package/.next/server/chunks/[externals]_next_dist_0iuj5m_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ewmt7_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0m1sn3r._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rthafo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0u0sxpl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xuaoik._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0yuh9-6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10dmsr8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ohu1lu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ux8_la._.js +3 -0
- package/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/_next-internal_server_app_api_bookmark_[id]_toggle_route_actions_0midgng.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chapter_[id]_audio-status_route_actions_137h21m.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chapter_[id]_audio_route_actions_1ursqip.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chapter_[id]_unlock_route_actions_02wqhh1.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_comment_story_[id]_route_actions_0-k0u9j.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_reading-progress_[storyId]_route_actions_1wu6t2e.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_reading-progress_sync_route_actions_0bmsea-.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_story_[id]_combo-unlock_route_actions_1s8x_jq.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_icon_png_route_actions_1-lsc8h.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0nojrj_.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__01629yw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05n80pl._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uw2vno._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ybcdc2._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1-g8gmo._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__13bnu2t._.js +6 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1gdndpr._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1gux7cw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1t3wpve._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1vfpvus._.js +21 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/ssr/_1dkuh1k._.js +8 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_(reader)_[id]_page_actions_1j9t8xe.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1j.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0h91jdk._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0bw_x_7._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0opsz1q._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_01b_3bz.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_05derss.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0p62q26.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js +4 -0
- package/.next/server/functions-config-manifest.json +4 -0
- package/.next/server/middleware-build-manifest.js +20 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +23 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/RFW2Gso53U4j44sDcC09J/_buildManifest.js +1 -0
- package/.next/static/RFW2Gso53U4j44sDcC09J/_clientMiddlewareManifest.js +1 -0
- package/.next/static/RFW2Gso53U4j44sDcC09J/_ssgManifest.js +1 -0
- package/.next/static/chunks/01dkdyukbdpqq.js +1 -0
- package/.next/static/chunks/05-c3ty_6dwfk.js +1 -0
- package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/.next/static/chunks/0w6_crw430jrp.css +3 -0
- package/.next/static/chunks/14mrh2-p_w84d.js +1 -0
- package/.next/static/chunks/1xxzci2thw472.css +4 -0
- package/.next/static/chunks/25o46h8mdjlrg.js +1 -0
- package/.next/static/chunks/2wkjp1bvz-w78.js +5 -0
- package/.next/static/chunks/3j8kcbmnuxd8g.js +1 -0
- package/.next/static/chunks/turbopack-1my_pp40jfqxc.js +1 -0
- package/.next/static/media/0b1dc8ddaa74ba49-s.0e__wj8580tc5.woff2 +0 -0
- package/.next/static/media/1a099d89ee94ee96-s.35a5cae5tspm2.woff2 +0 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/507a47c1876d4ec2-s.2qdkzeru_ecot.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/71fbf9c08529c2a5-s.2fpqrm51ez0iq.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/8c2eb9ceedecfc8e-s.p.23aeddxv5enbo.woff2 +0 -0
- package/.next/static/media/ac34884600cd8d5d-s.2936i88_6qsfd.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/e1ccd2766b08c828-s.p.15gdzqknx46iu.woff2 +0 -0
- package/.next/static/media/e629b5bc06499d58-s.p.10u7vx61f1ie7.woff2 +0 -0
- package/.next/static/media/e7150917543fc9da-s.0mybutugvu-lq.woff2 +0 -0
- package/.next/static/media/e9457141811d41ae-s.02frcczqg7k-8.woff2 +0 -0
- package/.next/static/media/fba5a26ea33df6a3-s.p.18rizl4rsrl42.woff2 +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/media/icon.189nugia0w7di.png +0 -0
- package/package.json +3 -1
- package/server.js +38 -0
- package/.dockerignore +0 -5
- package/.gitattributes +0 -2
- package/Dockerfile +0 -26
- package/README.md +0 -36
- package/eslint.config.mjs +0 -18
- package/next.config.ts +0 -8
- package/postcss.config.mjs +0 -7
- package/scripts/obfuscate-build.mjs +0 -77
- package/src/app/(reader)/[id]/page.tsx +0 -40
- package/src/app/(reader)/layout.tsx +0 -38
- package/src/app/api/bookmark/[id]/toggle/route.ts +0 -41
- package/src/app/api/chapter/[id]/audio/route.ts +0 -37
- package/src/app/api/chapter/[id]/audio-status/route.ts +0 -36
- package/src/app/api/chapter/[id]/unlock/route.ts +0 -49
- package/src/app/api/comment/story/[id]/route.ts +0 -48
- package/src/app/api/reading-progress/[storyId]/route.ts +0 -26
- package/src/app/api/reading-progress/sync/route.ts +0 -38
- package/src/app/api/story/[id]/combo-unlock/route.ts +0 -47
- package/src/app/globals.css +0 -26
- package/src/app/icon.png +0 -0
- package/src/app/layout.tsx +0 -35
- package/src/app/page.tsx +0 -3
- package/src/components/ssr/Skeleton/index.module.css +0 -22
- package/src/components/ssr/Skeleton/index.tsx +0 -38
- package/src/modules/reader/ReaderView.tsx +0 -48
- package/src/modules/reader/api/backend-data.ts +0 -231
- package/src/modules/reader/api/client-audio-api.ts +0 -33
- package/src/modules/reader/api/client-bookmark-api.ts +0 -21
- package/src/modules/reader/api/client-comment-api.ts +0 -31
- package/src/modules/reader/api/client-progress-api.ts +0 -36
- package/src/modules/reader/api/client-purchase-api.ts +0 -64
- package/src/modules/reader/api/get-reader-page-data.ts +0 -48
- package/src/modules/reader/api/types.ts +0 -47
- package/src/modules/reader/components/AudioPlayerBar.tsx +0 -299
- package/src/modules/reader/components/AutoScrollDrawer.tsx +0 -58
- package/src/modules/reader/components/ChapterBottomNav.tsx +0 -16
- package/src/modules/reader/components/ChapterContent.tsx +0 -43
- package/src/modules/reader/components/ChapterListDrawer.tsx +0 -84
- package/src/modules/reader/components/ChapterNav.tsx +0 -20
- package/src/modules/reader/components/ChapterSelect.tsx +0 -24
- package/src/modules/reader/components/ChapterWatermark.tsx +0 -53
- package/src/modules/reader/components/CommentSection.tsx +0 -156
- package/src/modules/reader/components/LockedChapterGate.tsx +0 -37
- package/src/modules/reader/components/MobileDock.tsx +0 -62
- package/src/modules/reader/components/NavButton.tsx +0 -22
- package/src/modules/reader/components/ReaderBreadcrumbs.tsx +0 -20
- package/src/modules/reader/components/ReaderChrome.tsx +0 -206
- package/src/modules/reader/components/ReaderToolbar.tsx +0 -52
- package/src/modules/reader/components/ReaderTopbar.tsx +0 -31
- package/src/modules/reader/components/SettingsPanel.tsx +0 -158
- package/src/modules/reader/components/Toast.tsx +0 -15
- package/src/modules/reader/constants/index.ts +0 -22
- package/src/modules/reader/hooks/useAudioPlayer.ts +0 -633
- package/src/modules/reader/hooks/useAutoScroll.ts +0 -31
- package/src/modules/reader/hooks/useBookmark.ts +0 -32
- package/src/modules/reader/hooks/useComments.ts +0 -86
- package/src/modules/reader/hooks/useContentProtection.ts +0 -81
- package/src/modules/reader/hooks/useDrawers.ts +0 -27
- package/src/modules/reader/hooks/useFullscreen.ts +0 -24
- package/src/modules/reader/hooks/usePrefs.ts +0 -66
- package/src/modules/reader/hooks/useReaderView.ts +0 -190
- package/src/modules/reader/hooks/useReadingProgress.ts +0 -95
- package/src/modules/reader/hooks/useScrollVisibility.ts +0 -44
- package/src/modules/reader/hooks/useToast.ts +0 -19
- package/src/modules/reader/hooks/useUnlock.ts +0 -59
- package/src/modules/reader/styles/reader.module.css +0 -1986
- package/src/modules/reader/types.ts +0 -145
- package/src/modules/reader/utils/affiliate.ts +0 -43
- package/src/modules/reader/utils/chapter-label.ts +0 -8
- package/src/modules/reader/utils/format-date.ts +0 -10
- package/src/modules/reader/utils/obfuscate-content.ts +0 -70
- package/src/modules/reader/utils/silent-wav.ts +0 -33
- package/src/modules/reader/utils/tiktok-tts.ts +0 -251
- package/src/modules/reader/utils/word-svg.ts +0 -132
- package/tsconfig.json +0 -34
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import styles from "../styles/reader.module.css";
|
|
5
|
-
import type { CommentSectionProps } from "../types";
|
|
6
|
-
import type { Comment } from "../api/types";
|
|
7
|
-
import { formatDate } from "../utils/format-date";
|
|
8
|
-
import { DEMO_USER } from "../constants";
|
|
9
|
-
|
|
10
|
-
function CommentItem({
|
|
11
|
-
comment,
|
|
12
|
-
submittingReplyId,
|
|
13
|
-
onReply,
|
|
14
|
-
}: {
|
|
15
|
-
comment: Comment;
|
|
16
|
-
submittingReplyId: string | null;
|
|
17
|
-
onReply: (parentCommentId: string, content: string) => Promise<boolean>;
|
|
18
|
-
}) {
|
|
19
|
-
const [replyOpen, setReplyOpen] = useState(false);
|
|
20
|
-
const [replyText, setReplyText] = useState("");
|
|
21
|
-
const submitting = submittingReplyId === comment.id;
|
|
22
|
-
|
|
23
|
-
const submitReply = async () => {
|
|
24
|
-
const trimmed = replyText.trim();
|
|
25
|
-
if (!trimmed) return;
|
|
26
|
-
const ok = await onReply(comment.id, trimmed);
|
|
27
|
-
if (ok) {
|
|
28
|
-
setReplyText("");
|
|
29
|
-
setReplyOpen(false);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className={styles.commentCard}>
|
|
35
|
-
<div className={styles.cmtAvatarFallback}>{comment.displayName.charAt(0).toUpperCase()}</div>
|
|
36
|
-
<div className={styles.cmtBody}>
|
|
37
|
-
<div className={styles.cmtHeader}>
|
|
38
|
-
<div className={styles.cmtMeta}>
|
|
39
|
-
<span className={styles.cmtAuthor}>{comment.displayName}</span>
|
|
40
|
-
<span className={styles.cmtTime}>{formatDate(comment.createdAt)}</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p className={styles.cmtContent}>{comment.content}</p>
|
|
44
|
-
|
|
45
|
-
<button className={styles.cmtReplyBtn} onClick={() => setReplyOpen((prev) => !prev)}>
|
|
46
|
-
Trả lời
|
|
47
|
-
</button>
|
|
48
|
-
|
|
49
|
-
{replyOpen && (
|
|
50
|
-
<div className={styles.cmtReplyForm}>
|
|
51
|
-
<textarea
|
|
52
|
-
className={styles.commentTextarea}
|
|
53
|
-
rows={2}
|
|
54
|
-
maxLength={1000}
|
|
55
|
-
value={replyText}
|
|
56
|
-
onChange={(e) => setReplyText(e.target.value)}
|
|
57
|
-
placeholder={`Trả lời ${comment.displayName}...`}
|
|
58
|
-
/>
|
|
59
|
-
<div className={styles.formActionRow}>
|
|
60
|
-
<button
|
|
61
|
-
className={styles.btnSubmitComment}
|
|
62
|
-
disabled={submitting || !replyText.trim()}
|
|
63
|
-
onClick={submitReply}
|
|
64
|
-
>
|
|
65
|
-
{submitting ? "Đang gửi..." : "Gửi"}
|
|
66
|
-
</button>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
)}
|
|
70
|
-
|
|
71
|
-
{comment.replies.length > 0 && (
|
|
72
|
-
<div className={styles.cmtReplies}>
|
|
73
|
-
{comment.replies.map((reply) => (
|
|
74
|
-
<CommentItem
|
|
75
|
-
key={reply.id}
|
|
76
|
-
comment={reply}
|
|
77
|
-
submittingReplyId={submittingReplyId}
|
|
78
|
-
onReply={onReply}
|
|
79
|
-
/>
|
|
80
|
-
))}
|
|
81
|
-
</div>
|
|
82
|
-
)}
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function CommentSection({
|
|
89
|
-
chapter,
|
|
90
|
-
comments,
|
|
91
|
-
commentContent,
|
|
92
|
-
setCommentContent,
|
|
93
|
-
submittingComment,
|
|
94
|
-
onSubmit,
|
|
95
|
-
submittingReplyId,
|
|
96
|
-
onReply,
|
|
97
|
-
}: CommentSectionProps) {
|
|
98
|
-
return (
|
|
99
|
-
<div id="comments" className={styles.commentSection} style={{ scrollMarginTop: 100 }}>
|
|
100
|
-
<div className={styles.sectionHeader}>
|
|
101
|
-
<div className={styles.accentBar} />
|
|
102
|
-
<h3 className={styles.sectionTitle}>
|
|
103
|
-
Bình luận <span className={styles.chapterWordHighlight}>Chương {chapter.chapterNumber}</span> (
|
|
104
|
-
{comments.length})
|
|
105
|
-
</h3>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<div className={styles.commentContainer}>
|
|
109
|
-
<form onSubmit={onSubmit} className={styles.commentForm}>
|
|
110
|
-
<div className={styles.formRow}>
|
|
111
|
-
<div className={styles.userAvatarFallback}>
|
|
112
|
-
{DEMO_USER.displayName.charAt(0).toUpperCase()}
|
|
113
|
-
</div>
|
|
114
|
-
<div className={styles.formInputGroup}>
|
|
115
|
-
<textarea
|
|
116
|
-
placeholder="Viết bình luận của bạn về chương này (tối đa 1000 ký tự)..."
|
|
117
|
-
value={commentContent}
|
|
118
|
-
onChange={(e) => setCommentContent(e.target.value)}
|
|
119
|
-
maxLength={1000}
|
|
120
|
-
rows={3}
|
|
121
|
-
className={styles.commentTextarea}
|
|
122
|
-
/>
|
|
123
|
-
<div className={styles.formActionRow}>
|
|
124
|
-
<button
|
|
125
|
-
type="submit"
|
|
126
|
-
disabled={submittingComment || !commentContent.trim()}
|
|
127
|
-
className={styles.btnSubmitComment}
|
|
128
|
-
>
|
|
129
|
-
{submittingComment ? "Đang gửi..." : "Gửi bình luận"}
|
|
130
|
-
</button>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</form>
|
|
135
|
-
|
|
136
|
-
{comments.length > 0 ? (
|
|
137
|
-
<div className={styles.commentList}>
|
|
138
|
-
{comments.map((cmt) => (
|
|
139
|
-
<CommentItem key={cmt.id} comment={cmt} submittingReplyId={submittingReplyId} onReply={onReply} />
|
|
140
|
-
))}
|
|
141
|
-
</div>
|
|
142
|
-
) : (
|
|
143
|
-
<div className={styles.emptyComments}>
|
|
144
|
-
<span className="material-icons-round" style={{ fontSize: 36, opacity: 0.6 }}>
|
|
145
|
-
forum
|
|
146
|
-
</span>
|
|
147
|
-
<p className={styles.emptyCommentsText}>Chưa có bình luận nào cho chương này.</p>
|
|
148
|
-
<p style={{ fontSize: 13, opacity: 0.7 }}>
|
|
149
|
-
Hãy là người đầu tiên chia sẻ cảm nghĩ của bạn về chương này!
|
|
150
|
-
</p>
|
|
151
|
-
</div>
|
|
152
|
-
)}
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
);
|
|
156
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import styles from "../styles/reader.module.css";
|
|
4
|
-
import { useUnlock } from "../hooks/useUnlock";
|
|
5
|
-
import type { LockedChapterGateProps } from "../types";
|
|
6
|
-
|
|
7
|
-
export function LockedChapterGate({ chapter, story }: LockedChapterGateProps) {
|
|
8
|
-
const { unlocking, message, unlock, unlockStoryCombo } = useUnlock(chapter.id, story.id);
|
|
9
|
-
|
|
10
|
-
const showCombo = !!story.comboPriceGold && !story.isComboUnlocked;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<div className={styles.lockGate}>
|
|
14
|
-
<span className={`material-icons-round ${styles.lockGateIcon}`}>lock</span>
|
|
15
|
-
<p className={styles.lockGateTitle}>Chương này cần mở khoá để đọc</p>
|
|
16
|
-
<p className={styles.lockGateSubtitle}>
|
|
17
|
-
{(chapter.priceGold || 0).toLocaleString("vi-VN")} Vàng
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
{message && <p className={styles.lockGateMessage}>{message}</p>}
|
|
21
|
-
|
|
22
|
-
<div className={styles.lockGateActions}>
|
|
23
|
-
<button className={styles.btnPrimary} disabled={unlocking} onClick={unlock}>
|
|
24
|
-
{unlocking ? "Đang mở khoá..." : "Mở khoá chương này"}
|
|
25
|
-
</button>
|
|
26
|
-
|
|
27
|
-
{showCombo && (
|
|
28
|
-
<button className={styles.btnGhost} disabled={unlocking} onClick={unlockStoryCombo}>
|
|
29
|
-
{unlocking
|
|
30
|
-
? "Đang xử lý..."
|
|
31
|
-
: `Mua trọn bộ (${(story.comboPriceGold || 0).toLocaleString("vi-VN")} Vàng)`}
|
|
32
|
-
</button>
|
|
33
|
-
)}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useRouter } from "next/navigation";
|
|
4
|
-
import styles from "../styles/reader.module.css";
|
|
5
|
-
import type { MobileDockProps } from "../types";
|
|
6
|
-
|
|
7
|
-
export function MobileDock({
|
|
8
|
-
chapter,
|
|
9
|
-
onOpenChapterList,
|
|
10
|
-
onOpenAudio,
|
|
11
|
-
isAudioReady,
|
|
12
|
-
playerOpen,
|
|
13
|
-
onOpenSettings,
|
|
14
|
-
}: MobileDockProps) {
|
|
15
|
-
const router = useRouter();
|
|
16
|
-
return (
|
|
17
|
-
<div className={`${styles.mobileDockContainer} ${playerOpen ? styles.mobileDockContainerHidden : ""}`}>
|
|
18
|
-
<div className={styles.mobileDock}>
|
|
19
|
-
<button className={styles.dockItem} onClick={onOpenChapterList}>
|
|
20
|
-
<span className="material-icons-round">format_list_bulleted</span>
|
|
21
|
-
<span className={styles.dockLabel}>Chương</span>
|
|
22
|
-
</button>
|
|
23
|
-
|
|
24
|
-
{chapter.prevChapterId ? (
|
|
25
|
-
<button className={styles.dockItem} onClick={() => router.push(`/${chapter.prevChapterId}`)}>
|
|
26
|
-
<span className="material-icons-round">chevron_left</span>
|
|
27
|
-
<span className={styles.dockLabel}>Trước</span>
|
|
28
|
-
</button>
|
|
29
|
-
) : (
|
|
30
|
-
<button className={styles.dockItem} disabled>
|
|
31
|
-
<span className="material-icons-round">chevron_left</span>
|
|
32
|
-
<span className={styles.dockLabel}>Trước</span>
|
|
33
|
-
</button>
|
|
34
|
-
)}
|
|
35
|
-
|
|
36
|
-
<button
|
|
37
|
-
className={`${styles.dockActionFab} ${isAudioReady ? styles.dockActionFabActive : ""}`}
|
|
38
|
-
onClick={onOpenAudio}
|
|
39
|
-
>
|
|
40
|
-
<span className="material-icons-round">headphones</span>
|
|
41
|
-
</button>
|
|
42
|
-
|
|
43
|
-
{chapter.nextChapterId ? (
|
|
44
|
-
<button className={styles.dockItem} onClick={() => router.push(`/${chapter.nextChapterId}`)}>
|
|
45
|
-
<span className="material-icons-round">chevron_right</span>
|
|
46
|
-
<span className={styles.dockLabel}>Sau</span>
|
|
47
|
-
</button>
|
|
48
|
-
) : (
|
|
49
|
-
<button className={styles.dockItem} disabled>
|
|
50
|
-
<span className="material-icons-round">chevron_right</span>
|
|
51
|
-
<span className={styles.dockLabel}>Sau</span>
|
|
52
|
-
</button>
|
|
53
|
-
)}
|
|
54
|
-
|
|
55
|
-
<button className={styles.dockItem} onClick={onOpenSettings}>
|
|
56
|
-
<span className="material-icons-round">tune</span>
|
|
57
|
-
<span className={styles.dockLabel}>Thêm</span>
|
|
58
|
-
</button>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import Link from "next/link";
|
|
2
|
-
import styles from "../styles/reader.module.css";
|
|
3
|
-
import type { NavButtonProps } from "../types";
|
|
4
|
-
|
|
5
|
-
export function NavButton({ href, variant, children }: NavButtonProps) {
|
|
6
|
-
const baseClass = variant === "primary" ? styles.btnPrimary : styles.btnGhost;
|
|
7
|
-
const disabledClass =
|
|
8
|
-
variant === "primary" ? styles.btnPrimaryDisabled : styles.btnGhostDisabled;
|
|
9
|
-
|
|
10
|
-
if (!href) {
|
|
11
|
-
return (
|
|
12
|
-
<span className={`${baseClass} ${disabledClass}`} aria-disabled="true">
|
|
13
|
-
{children}
|
|
14
|
-
</span>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
return (
|
|
18
|
-
<Link href={`/${href}`} className={baseClass}>
|
|
19
|
-
{children}
|
|
20
|
-
</Link>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import styles from "../styles/reader.module.css";
|
|
2
|
-
import type { ReaderBreadcrumbsProps } from "../types";
|
|
3
|
-
|
|
4
|
-
export function ReaderBreadcrumbs({ story, chapter }: ReaderBreadcrumbsProps) {
|
|
5
|
-
return (
|
|
6
|
-
<div className={styles.readerBreadcrumbs}>
|
|
7
|
-
{/* Plain anchor, not next/link: the real homepage lives on the main
|
|
8
|
-
frontend app at the site root, outside this app's own basePath. */}
|
|
9
|
-
<a href="/" className={styles.breadcrumbLink}>
|
|
10
|
-
Trang chủ
|
|
11
|
-
</a>
|
|
12
|
-
<span className={styles.breadcrumbSep}>></span>
|
|
13
|
-
<a href={`/story/${story.slug}`} className={styles.breadcrumbLink}>
|
|
14
|
-
{story.title}
|
|
15
|
-
</a>
|
|
16
|
-
<span className={styles.breadcrumbSep}>></span>
|
|
17
|
-
<span className={styles.breadcrumbCurrent}>Chương {chapter.chapterNumber}</span>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable react-hooks/refs -- useReaderView bundles containerRef into
|
|
4
|
-
the same object as every other value it returns, so react-hooks/refs treats
|
|
5
|
-
every `hook.x` read below as a ref access. containerRef itself is only ever
|
|
6
|
-
passed to `ref=`, never read from; the rest of the flags here are false
|
|
7
|
-
positives from that bundling, accepted intentionally to keep a single
|
|
8
|
-
`hook.x` access pattern instead of destructuring. */
|
|
9
|
-
|
|
10
|
-
import type { CSSProperties } from "react";
|
|
11
|
-
import { getChapterLabel } from "../utils/chapter-label";
|
|
12
|
-
import { useReaderView } from "../hooks/useReaderView";
|
|
13
|
-
import { ReaderTopbar } from "./ReaderTopbar";
|
|
14
|
-
import { ReaderToolbar } from "./ReaderToolbar";
|
|
15
|
-
import { CommentSection } from "./CommentSection";
|
|
16
|
-
import { ChapterListDrawer } from "./ChapterListDrawer";
|
|
17
|
-
import { ChapterContent } from "./ChapterContent";
|
|
18
|
-
import { ChapterWatermark } from "./ChapterWatermark";
|
|
19
|
-
import { LockedChapterGate } from "./LockedChapterGate";
|
|
20
|
-
import { AutoScrollDrawer } from "./AutoScrollDrawer";
|
|
21
|
-
import { MobileDock } from "./MobileDock";
|
|
22
|
-
import { SettingsPanel } from "./SettingsPanel";
|
|
23
|
-
import { AudioPlayerBar } from "./AudioPlayerBar";
|
|
24
|
-
import { Toast } from "./Toast";
|
|
25
|
-
import { triggerAffiliateRedirect } from "../utils/affiliate";
|
|
26
|
-
import styles from "../styles/reader.module.css";
|
|
27
|
-
import type { ReaderChromeProps } from "../types";
|
|
28
|
-
|
|
29
|
-
export function ReaderChrome({
|
|
30
|
-
chapter,
|
|
31
|
-
story,
|
|
32
|
-
allChapters,
|
|
33
|
-
paragraphs,
|
|
34
|
-
initialComments,
|
|
35
|
-
initialIsBookmarked,
|
|
36
|
-
renderedParagraphs,
|
|
37
|
-
viewer,
|
|
38
|
-
breadcrumbs,
|
|
39
|
-
chapterNav,
|
|
40
|
-
bottomNav,
|
|
41
|
-
}: ReaderChromeProps) {
|
|
42
|
-
const hook = useReaderView(chapter, story, initialComments, paragraphs, initialIsBookmarked);
|
|
43
|
-
const chapterLabel = getChapterLabel(chapter);
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<div
|
|
47
|
-
ref={hook.containerRef}
|
|
48
|
-
className={`${styles.readerContainer} ${styles[hook.prefs.theme]}`}
|
|
49
|
-
data-reader-font={hook.prefs.fontFamily}
|
|
50
|
-
style={
|
|
51
|
-
{
|
|
52
|
-
"--reader-font-size": `${hook.prefs.fontSize}px`,
|
|
53
|
-
"--reader-line-height": hook.prefs.lineHeight,
|
|
54
|
-
} as CSSProperties
|
|
55
|
-
}
|
|
56
|
-
>
|
|
57
|
-
{!hook.isFullscreen && (
|
|
58
|
-
<ReaderTopbar
|
|
59
|
-
story={story}
|
|
60
|
-
chapterLabel={chapterLabel}
|
|
61
|
-
scrollVisible={hook.scrollVisible}
|
|
62
|
-
onBack={() => {
|
|
63
|
-
window.location.href = `/story/${story.slug}`;
|
|
64
|
-
}}
|
|
65
|
-
onOpenSettings={() => hook.setSettingsOpen(true)}
|
|
66
|
-
/>
|
|
67
|
-
)}
|
|
68
|
-
|
|
69
|
-
<main className={styles.main} style={{ paddingTop: hook.isFullscreen ? 24 : 52 }}>
|
|
70
|
-
<div className={`${styles.wrap} ${hook.isFullscreen ? styles.wrapFullscreen : ""}`}>
|
|
71
|
-
{hook.isFullscreen && (
|
|
72
|
-
<button
|
|
73
|
-
className={styles.exitFullscreenFloatBtn}
|
|
74
|
-
onClick={hook.toggleFullscreen}
|
|
75
|
-
title="Thoát toàn màn hình"
|
|
76
|
-
>
|
|
77
|
-
<span className="material-icons-round">close</span>
|
|
78
|
-
</button>
|
|
79
|
-
)}
|
|
80
|
-
|
|
81
|
-
{!hook.isFullscreen && breadcrumbs}
|
|
82
|
-
|
|
83
|
-
{!hook.isFullscreen && chapterNav}
|
|
84
|
-
|
|
85
|
-
{!hook.isFullscreen && (
|
|
86
|
-
<ReaderToolbar
|
|
87
|
-
isBookmarked={hook.isBookmarked}
|
|
88
|
-
onOpenChapterList={() => hook.setChapterListOpen(true)}
|
|
89
|
-
onOpenAutoScroll={() => hook.setAutoScrollOpen(true)}
|
|
90
|
-
onOpenSettings={() => hook.setSettingsOpen(true)}
|
|
91
|
-
onToggleFullscreen={hook.toggleFullscreen}
|
|
92
|
-
onToggleBookmark={hook.toggleBookmark}
|
|
93
|
-
onShare={hook.handleShare}
|
|
94
|
-
onOpenAudio={() => {
|
|
95
|
-
triggerAffiliateRedirect(story);
|
|
96
|
-
hook.audio.openPlayer();
|
|
97
|
-
}}
|
|
98
|
-
isAudioReady={hook.audio.isAudioReady}
|
|
99
|
-
/>
|
|
100
|
-
)}
|
|
101
|
-
|
|
102
|
-
<h1 className={styles.chapterTitle}>{chapter.title}</h1>
|
|
103
|
-
|
|
104
|
-
{chapter.isLocked ? (
|
|
105
|
-
<LockedChapterGate chapter={chapter} story={story} />
|
|
106
|
-
) : (
|
|
107
|
-
<div className={styles.contentWrap}>
|
|
108
|
-
<ChapterContent
|
|
109
|
-
renderedParagraphs={renderedParagraphs}
|
|
110
|
-
clickable={hook.audio.selectedVoice !== "server" && hook.audio.playerOpen}
|
|
111
|
-
highlightedIndex={
|
|
112
|
-
hook.audio.selectedVoice !== "server" && hook.audio.playerOpen
|
|
113
|
-
? hook.audio.currentParagraphIndex
|
|
114
|
-
: null
|
|
115
|
-
}
|
|
116
|
-
onParagraphClick={(idx) => hook.audio.playParagraph(idx, true)}
|
|
117
|
-
/>
|
|
118
|
-
<ChapterWatermark theme={hook.prefs.theme} viewer={viewer} />
|
|
119
|
-
</div>
|
|
120
|
-
)}
|
|
121
|
-
|
|
122
|
-
{!hook.isFullscreen && bottomNav}
|
|
123
|
-
|
|
124
|
-
{!hook.isFullscreen && (
|
|
125
|
-
<CommentSection
|
|
126
|
-
chapter={chapter}
|
|
127
|
-
comments={hook.comments}
|
|
128
|
-
commentContent={hook.commentContent}
|
|
129
|
-
setCommentContent={hook.setCommentContent}
|
|
130
|
-
submittingComment={hook.submittingComment}
|
|
131
|
-
onSubmit={hook.handleAddComment}
|
|
132
|
-
submittingReplyId={hook.submittingReplyId}
|
|
133
|
-
onReply={hook.handleReplyComment}
|
|
134
|
-
/>
|
|
135
|
-
)}
|
|
136
|
-
</div>
|
|
137
|
-
</main>
|
|
138
|
-
|
|
139
|
-
<ChapterListDrawer
|
|
140
|
-
open={hook.chapterListOpen}
|
|
141
|
-
onClose={() => hook.setChapterListOpen(false)}
|
|
142
|
-
chapter={chapter}
|
|
143
|
-
allChapters={allChapters}
|
|
144
|
-
onSelect={(id) => {
|
|
145
|
-
hook.setChapterListOpen(false);
|
|
146
|
-
hook.router.push(`/${id}`);
|
|
147
|
-
}}
|
|
148
|
-
/>
|
|
149
|
-
|
|
150
|
-
<AutoScrollDrawer
|
|
151
|
-
open={hook.autoScrollOpen}
|
|
152
|
-
onClose={() => hook.setAutoScrollOpen(false)}
|
|
153
|
-
isAutoScrolling={hook.isAutoScrolling}
|
|
154
|
-
scrollSpeed={hook.scrollSpeed}
|
|
155
|
-
onChangeSpeed={hook.handleChangeScrollSpeed}
|
|
156
|
-
onStart={() => {
|
|
157
|
-
hook.startAutoScroll();
|
|
158
|
-
hook.setAutoScrollOpen(false);
|
|
159
|
-
}}
|
|
160
|
-
onStop={hook.stopAutoScroll}
|
|
161
|
-
/>
|
|
162
|
-
|
|
163
|
-
{!hook.isFullscreen && (
|
|
164
|
-
<MobileDock
|
|
165
|
-
chapter={chapter}
|
|
166
|
-
onOpenChapterList={() => hook.setChapterListOpen(true)}
|
|
167
|
-
onOpenAudio={() => {
|
|
168
|
-
triggerAffiliateRedirect(story);
|
|
169
|
-
hook.audio.openPlayer();
|
|
170
|
-
}}
|
|
171
|
-
isAudioReady={hook.audio.isAudioReady}
|
|
172
|
-
playerOpen={hook.audio.playerOpen}
|
|
173
|
-
onOpenSettings={() => hook.setSettingsOpen(true)}
|
|
174
|
-
/>
|
|
175
|
-
)}
|
|
176
|
-
|
|
177
|
-
<SettingsPanel
|
|
178
|
-
open={hook.settingsOpen}
|
|
179
|
-
onClose={() => hook.setSettingsOpen(false)}
|
|
180
|
-
prefs={hook.prefs}
|
|
181
|
-
updatePref={hook.updatePref}
|
|
182
|
-
isAutoScrolling={hook.isAutoScrolling}
|
|
183
|
-
isFullscreen={hook.isFullscreen}
|
|
184
|
-
isBookmarked={hook.isBookmarked}
|
|
185
|
-
onOpenAutoScroll={hook.handleSettingsOpenAutoScroll}
|
|
186
|
-
onToggleFullscreen={hook.handleSettingsToggleFullscreen}
|
|
187
|
-
onToggleBookmark={hook.toggleBookmark}
|
|
188
|
-
onShare={hook.handleShare}
|
|
189
|
-
onOpenAudio={() => {
|
|
190
|
-
triggerAffiliateRedirect(story);
|
|
191
|
-
hook.setSettingsOpen(false);
|
|
192
|
-
hook.audio.openPlayer();
|
|
193
|
-
}}
|
|
194
|
-
selectedVoice={hook.audio.selectedVoice}
|
|
195
|
-
voices={hook.audio.voices}
|
|
196
|
-
onVoiceChange={hook.audio.handleVoiceChange}
|
|
197
|
-
continuousPlay={hook.audio.continuousPlay}
|
|
198
|
-
onToggleContinuousPlay={hook.audio.setContinuousPlay}
|
|
199
|
-
/>
|
|
200
|
-
|
|
201
|
-
{!hook.isFullscreen && <AudioPlayerBar chapterLabel={chapterLabel} player={hook.audio} />}
|
|
202
|
-
|
|
203
|
-
<Toast toast={hook.toast} />
|
|
204
|
-
</div>
|
|
205
|
-
);
|
|
206
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import styles from "../styles/reader.module.css";
|
|
2
|
-
import type { ReaderToolbarProps } from "../types";
|
|
3
|
-
|
|
4
|
-
export function ReaderToolbar({
|
|
5
|
-
isBookmarked,
|
|
6
|
-
onOpenChapterList,
|
|
7
|
-
onOpenAutoScroll,
|
|
8
|
-
onOpenSettings,
|
|
9
|
-
onToggleFullscreen,
|
|
10
|
-
onToggleBookmark,
|
|
11
|
-
onShare,
|
|
12
|
-
onOpenAudio,
|
|
13
|
-
isAudioReady,
|
|
14
|
-
}: ReaderToolbarProps) {
|
|
15
|
-
return (
|
|
16
|
-
<div className={styles.readerToolbar}>
|
|
17
|
-
<div className={styles.toolbarLeft}>
|
|
18
|
-
<button className={styles.toolbarBtn} onClick={onOpenChapterList} title="Danh sách chương">
|
|
19
|
-
<span className="material-icons-round">format_list_bulleted</span>
|
|
20
|
-
</button>
|
|
21
|
-
<button className={styles.toolbarBtn} onClick={onOpenAutoScroll} title="Cuộn tự động">
|
|
22
|
-
<span className="material-icons-round">height</span>
|
|
23
|
-
</button>
|
|
24
|
-
<button className={styles.toolbarBtn} onClick={onOpenSettings} title="Cài đặt đọc">
|
|
25
|
-
<span className="material-icons-round">text_fields</span>
|
|
26
|
-
</button>
|
|
27
|
-
<button className={styles.toolbarBtn} onClick={onToggleFullscreen} title="Toàn màn hình">
|
|
28
|
-
<span className="material-icons-round">fullscreen</span>
|
|
29
|
-
</button>
|
|
30
|
-
<button
|
|
31
|
-
className={`${styles.toolbarBtn} ${isBookmarked ? styles.toolbarBtnActive : ""}`}
|
|
32
|
-
onClick={onToggleBookmark}
|
|
33
|
-
title="Theo dõi truyện"
|
|
34
|
-
>
|
|
35
|
-
<span className="material-icons-round">{isBookmarked ? "favorite" : "favorite_border"}</span>
|
|
36
|
-
</button>
|
|
37
|
-
<button className={styles.toolbarBtn} onClick={onShare} title="Chia sẻ">
|
|
38
|
-
<span className="material-icons-round">share</span>
|
|
39
|
-
</button>
|
|
40
|
-
</div>
|
|
41
|
-
<div className={styles.toolbarRight}>
|
|
42
|
-
<button
|
|
43
|
-
className={`${styles.toolbarBtn} ${isAudioReady ? styles.toolbarBtnAudioDone : ""}`}
|
|
44
|
-
onClick={onOpenAudio}
|
|
45
|
-
title="Nghe audio truyện"
|
|
46
|
-
>
|
|
47
|
-
<span className="material-icons-round">headphones</span>
|
|
48
|
-
</button>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import styles from "../styles/reader.module.css";
|
|
2
|
-
import type { ReaderTopbarProps } from "../types";
|
|
3
|
-
|
|
4
|
-
export function ReaderTopbar({
|
|
5
|
-
story,
|
|
6
|
-
chapterLabel,
|
|
7
|
-
scrollVisible,
|
|
8
|
-
onBack,
|
|
9
|
-
onOpenSettings,
|
|
10
|
-
}: ReaderTopbarProps) {
|
|
11
|
-
return (
|
|
12
|
-
<header className={`${styles.topbar} ${scrollVisible ? "" : styles.topbarHidden}`}>
|
|
13
|
-
<div className={styles.topbarLeft}>
|
|
14
|
-
<button className={styles.iconBtn} onClick={onBack} aria-label="Quay lại">
|
|
15
|
-
<span className="material-icons-round">arrow_back</span>
|
|
16
|
-
</button>
|
|
17
|
-
<div className={styles.storyInfo}>
|
|
18
|
-
<a href={`/story/${story.slug}`} className={styles.storyTitle}>
|
|
19
|
-
{story.title}
|
|
20
|
-
</a>
|
|
21
|
-
<span className={styles.chapterLabel}>{chapterLabel}</span>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div className={styles.topbarRight}>
|
|
25
|
-
<button className={styles.iconBtn} onClick={onOpenSettings} aria-label="Cài đặt đọc">
|
|
26
|
-
<span className="material-icons-round">tune</span>
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
</header>
|
|
30
|
-
);
|
|
31
|
-
}
|