feat: 添加左右导航按钮和智能响应式布局到集数选择器组件
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
if(!self.define){let e,s={};const c=(c,n)=>(c=new URL(c+".js",n).href,s[c]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=c,e.onload=s,document.head.appendChild(e)}else e=c,importScripts(c),s()}).then(()=>{let e=s[c];if(!e)throw new Error(`Module ${c} didn’t register its module`);return e}));self.define=(n,a)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(s[i])return;let t={};const r=e=>c(e,i),o={module:{uri:i},exports:t,require:r};s[i]=Promise.all(n.map(e=>o[e]||r(e))).then(e=>(a(...e),t))}}define(["./workbox-e9849328"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"7c3d1f3a59bd37bd6b0e05018ebf9f32"},{url:"/_next/static/Vsc7_jLIvSZ-BKyHRSsrR/_buildManifest.js",revision:"046380ae5bc74b46b6d5eac3eed65355"},{url:"/_next/static/Vsc7_jLIvSZ-BKyHRSsrR/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/110-adb836a0730c35e7.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/154-de4a84fd5b2e0100.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/29-0844689411ca7d55.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/459-6bec40a8423cc309.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/51b697cb-f464f3017ac1ea30.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/682-d1dca8d17a3a8e6f.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/900-fb094d8873768e88.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/967-217cdcb80ae3beeb.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/998-568996670b543597.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/_not-found/page-ac328df06cf68f14.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/admin/page-d0def26e413c060d.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/douban/page-2d0023184aa37aff.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/layout-bd0bfbfdb401e15f.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/login/page-320c4f54724f3464.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/page-6a58e37ab3250691.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/play/page-63b2dae5d7950b37.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/search/page-63fe30b91e0539a7.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/app/warning/page-11cba4cf9332a238.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/c72274ce-06682d6fc8197e6d.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/da9543df-bf6da1a431d8604f.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/framework-6e06c675866dc992.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/main-95de9e33689c098a.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/main-app-dbd320e104e1a5dc.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/pages/_app-792b631a362c29e1.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/pages/_error-9fde6601392a2a99.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-17170f1d90853b2d.js",revision:"Vsc7_jLIvSZ-BKyHRSsrR"},{url:"/_next/static/css/23100062f5d4aac0.css",revision:"23100062f5d4aac0"},{url:"/_next/static/css/275ed64cc4367444.css",revision:"275ed64cc4367444"},{url:"/_next/static/css/f947920f7dec8442.css",revision:"f947920f7dec8442"},{url:"/_next/static/media/26a46d62cd723877-s.woff2",revision:"befd9c0fdfa3d8a645d5f95717ed6420"},{url:"/_next/static/media/55c55f0601d81cf3-s.woff2",revision:"43828e14271c77b87e3ed582dbff9f74"},{url:"/_next/static/media/581909926a08bbc8-s.woff2",revision:"f0b86e7c24f455280b8df606b89af891"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/97e0cb1ae144a2a9-s.woff2",revision:"e360c61c5bd8d90639fd4503c829c2dc"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/favicon.ico",revision:"c5de6e56c5664adda146825f75ea6ecf"},{url:"/icons/icon-192x192.png",revision:"4a56c090828a1ad254c903c7aec0389d"},{url:"/icons/icon-256x256.png",revision:"f6409eb1a001f754121e3a8281c0319c"},{url:"/icons/icon-384x384.png",revision:"f6efc3e357b9ffdf4e0d8c14b2ed0ac1"},{url:"/icons/icon-512x512.png",revision:"9c008cbbeb6a576fe07bb1284a83f4d2"},{url:"/logo.png",revision:"40de611b143c47c6291c7bdad2c959ca"},{url:"/manifest.json",revision:"7bd3dabc1cfbfe40f09577efca223d31"},{url:"/robots.txt",revision:"e2b2cd8514443456bc6fb9d77b3b1f3e"},{url:"/screenshot1.png",revision:"10572bfcea54dc93ac4c5f7c9057fc98"},{url:"/screenshot2.png",revision:"f815a8990973a221899976867365c239"},{url:"/screenshot3.png",revision:"49709e96345dfeeab1d8083821d4b44e"},{url:"/screenshot4.png",revision:"a76c751e41e37556048a487e4f8b8b1c"},{url:"/wechat.jpg",revision:"d0f601311802667cd6ca5a37dc69bfa7"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:c,state:n})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")});
|
||||
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()}).then(()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e}));self.define=(n,a)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let t={};const r=e=>s(e,c),o={module:{uri:c},exports:t,require:r};i[c]=Promise.all(n.map(e=>o[e]||r(e))).then(e=>(a(...e),t))}}define(["./workbox-e9849328"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"4d399308c75bded3ecad1eb3a215b56e"},{url:"/_next/static/W7ZEQpViKilkCqjHBEiQ-/_buildManifest.js",revision:"046380ae5bc74b46b6d5eac3eed65355"},{url:"/_next/static/W7ZEQpViKilkCqjHBEiQ-/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/110-cb68faf0f47f94e5.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/154-de4a84fd5b2e0100.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/29-0844689411ca7d55.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/459-6bec40a8423cc309.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/51b697cb-f464f3017ac1ea30.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/682-d1dca8d17a3a8e6f.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/900-fb094d8873768e88.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/967-217cdcb80ae3beeb.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/998-568996670b543597.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/_not-found/page-ac328df06cf68f14.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/admin/page-d0def26e413c060d.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/douban/page-2d0023184aa37aff.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/layout-bd0bfbfdb401e15f.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/login/page-6d62f8fe1814a4fb.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/page-6a58e37ab3250691.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/play/page-156d795a50abfa01.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/search/page-63fe30b91e0539a7.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/app/warning/page-11cba4cf9332a238.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/c72274ce-06682d6fc8197e6d.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/da9543df-bf6da1a431d8604f.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/framework-6e06c675866dc992.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/main-95de9e33689c098a.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/main-app-dbd320e104e1a5dc.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/pages/_app-792b631a362c29e1.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/pages/_error-9fde6601392a2a99.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-17170f1d90853b2d.js",revision:"W7ZEQpViKilkCqjHBEiQ-"},{url:"/_next/static/css/23100062f5d4aac0.css",revision:"23100062f5d4aac0"},{url:"/_next/static/css/275ed64cc4367444.css",revision:"275ed64cc4367444"},{url:"/_next/static/css/b96bc4d080879d1f.css",revision:"b96bc4d080879d1f"},{url:"/_next/static/media/26a46d62cd723877-s.woff2",revision:"befd9c0fdfa3d8a645d5f95717ed6420"},{url:"/_next/static/media/55c55f0601d81cf3-s.woff2",revision:"43828e14271c77b87e3ed582dbff9f74"},{url:"/_next/static/media/581909926a08bbc8-s.woff2",revision:"f0b86e7c24f455280b8df606b89af891"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/97e0cb1ae144a2a9-s.woff2",revision:"e360c61c5bd8d90639fd4503c829c2dc"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/favicon.ico",revision:"c5de6e56c5664adda146825f75ea6ecf"},{url:"/icons/icon-192x192.png",revision:"4a56c090828a1ad254c903c7aec0389d"},{url:"/icons/icon-256x256.png",revision:"f6409eb1a001f754121e3a8281c0319c"},{url:"/icons/icon-384x384.png",revision:"f6efc3e357b9ffdf4e0d8c14b2ed0ac1"},{url:"/icons/icon-512x512.png",revision:"9c008cbbeb6a576fe07bb1284a83f4d2"},{url:"/logo.png",revision:"40de611b143c47c6291c7bdad2c959ca"},{url:"/manifest.json",revision:"7bd3dabc1cfbfe40f09577efca223d31"},{url:"/robots.txt",revision:"e2b2cd8514443456bc6fb9d77b3b1f3e"},{url:"/screenshot1.png",revision:"10572bfcea54dc93ac4c5f7c9057fc98"},{url:"/screenshot2.png",revision:"f815a8990973a221899976867365c239"},{url:"/screenshot3.png",revision:"49709e96345dfeeab1d8083821d4b44e"},{url:"/screenshot4.png",revision:"a76c751e41e37556048a487e4f8b8b1c"},{url:"/wechat.jpg",revision:"d0f601311802667cd6ca5a37dc69bfa7"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:i,event:s,state:n})=>i&&"opaqueredirect"===i.type?new Response(i.body,{status:200,statusText:"OK",headers:i.headers}):i}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const i=e.pathname;return!i.startsWith("/api/auth/")&&!!i.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")});
|
||||
|
||||
@@ -314,6 +314,19 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
|
||||
<>
|
||||
{/* 分类标签 */}
|
||||
<div className='flex items-center gap-4 mb-4 border-b border-gray-300 dark:border-gray-700 -mx-6 px-6 flex-shrink-0'>
|
||||
{/* 左导航按钮 */}
|
||||
{currentPage > 0 && (
|
||||
<button
|
||||
onClick={() => handleCategoryClick(currentPage - 1)}
|
||||
className='flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-gradient-to-r from-blue-500 to-green-500 hover:from-blue-600 hover:to-green-600 text-white shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-105 active:scale-95'
|
||||
title='上一批'
|
||||
>
|
||||
<svg className='w-4 h-4' fill='none' stroke='currentColor' viewBox='0 0 24 24'>
|
||||
<path strokeLinecap='round' strokeLinejoin='round' strokeWidth='2' d='M15 19l-7-7 7-7' />
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
|
||||
<div className='flex-1 overflow-x-auto' ref={categoryContainerRef}>
|
||||
<div className='flex gap-2 min-w-max'>
|
||||
{categories.map((label, idx) => {
|
||||
@@ -342,6 +355,20 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 右导航按钮 */}
|
||||
{currentPage < pageCount - 1 && (
|
||||
<button
|
||||
onClick={() => handleCategoryClick(currentPage + 1)}
|
||||
className='flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-gradient-to-r from-green-500 to-blue-500 hover:from-green-600 hover:to-blue-600 text-white shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-105 active:scale-95'
|
||||
title='下一批'
|
||||
>
|
||||
<svg className='w-4 h-4' fill='none' stroke='currentColor' viewBox='0 0 24 24'>
|
||||
<path strokeLinecap='round' strokeLinejoin='round' strokeWidth='2' d='M9 5l7 7-7 7' />
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* 向上/向下按钮 */}
|
||||
<button
|
||||
className='flex-shrink-0 w-8 h-8 rounded-md flex items-center justify-center text-gray-700 hover:text-green-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:text-green-400 dark:hover:bg-white/20 transition-colors transform translate-y-[-4px]'
|
||||
@@ -366,31 +393,44 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* 集数网格 */}
|
||||
<div className='grid grid-cols-[repeat(auto-fill,minmax(40px,1fr))] auto-rows-[40px] gap-x-3 gap-y-3 overflow-y-auto h-full pb-4'>
|
||||
{(() => {
|
||||
const len = currentEnd - currentStart + 1;
|
||||
const episodes = Array.from({ length: len }, (_, i) =>
|
||||
descending ? currentEnd - i : currentStart + i
|
||||
);
|
||||
return episodes;
|
||||
})().map((episodeNumber) => {
|
||||
const isActive = episodeNumber === value;
|
||||
return (
|
||||
<button
|
||||
key={episodeNumber}
|
||||
onClick={() => handleEpisodeClick(episodeNumber - 1)}
|
||||
className={`h-10 flex items-center justify-center text-sm font-medium rounded-md transition-all duration-200
|
||||
${
|
||||
isActive
|
||||
? 'bg-green-500 text-white shadow-lg shadow-green-500/25 dark:bg-green-600'
|
||||
: 'bg-gray-200 text-gray-700 hover:bg-gray-300 hover:scale-105 dark:bg-white/10 dark:text-gray-300 dark:hover:bg-white/20'
|
||||
}`.trim()}
|
||||
>
|
||||
{episodeNumber}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
{/* 集数网格 - 智能响应式布局 */}
|
||||
<div className='overflow-y-auto h-full pb-4 px-1'>
|
||||
<div className='grid gap-2 sm:gap-3 md:gap-4 grid-cols-[repeat(auto-fill,minmax(36px,1fr))] xs:grid-cols-[repeat(auto-fill,minmax(40px,1fr))] sm:grid-cols-[repeat(auto-fill,minmax(44px,1fr))] md:grid-cols-[repeat(auto-fill,minmax(48px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(52px,1fr))] xl:grid-cols-[repeat(auto-fill,minmax(56px,1fr))] 2xl:grid-cols-[repeat(auto-fill,minmax(60px,1fr))]'>
|
||||
{(() => {
|
||||
const len = currentEnd - currentStart + 1;
|
||||
const episodes = Array.from({ length: len }, (_, i) =>
|
||||
descending ? currentEnd - i : currentStart + i
|
||||
);
|
||||
return episodes;
|
||||
})().map((episodeNumber) => {
|
||||
const isActive = episodeNumber === value;
|
||||
return (
|
||||
<button
|
||||
key={episodeNumber}
|
||||
onClick={() => handleEpisodeClick(episodeNumber - 1)}
|
||||
className={`
|
||||
aspect-square min-h-[36px] min-w-[36px] xs:min-h-[40px] xs:min-w-[40px] sm:min-h-[44px] sm:min-w-[44px] md:min-h-[48px] md:min-w-[48px] lg:min-h-[52px] lg:min-w-[52px] xl:min-h-[56px] xl:min-w-[56px] 2xl:min-h-[60px] 2xl:min-w-[60px]
|
||||
flex items-center justify-center text-xs sm:text-sm lg:text-base font-bold rounded-lg border-2
|
||||
transition-all duration-300 ease-out transform hover:scale-110 active:scale-95 hover:rotate-2 active:rotate-0
|
||||
relative overflow-hidden group
|
||||
${
|
||||
isActive
|
||||
? 'bg-gradient-to-br from-emerald-400 via-green-500 to-teal-600 text-white border-emerald-300 shadow-xl shadow-emerald-500/40 dark:from-emerald-500 dark:via-green-600 dark:to-teal-700 dark:border-emerald-400'
|
||||
: 'bg-gradient-to-br from-slate-100 via-gray-50 to-zinc-100 text-slate-700 border-slate-300 hover:from-blue-50 hover:via-indigo-50 hover:to-purple-50 hover:border-blue-400 hover:text-blue-700 hover:shadow-lg hover:shadow-blue-200/50 dark:from-slate-700 dark:via-gray-800 dark:to-zinc-800 dark:text-slate-200 dark:border-slate-600 dark:hover:from-blue-900/60 dark:hover:via-indigo-900/60 dark:hover:to-purple-900/60 dark:hover:border-blue-500 dark:hover:text-blue-300'
|
||||
}
|
||||
`.trim()}
|
||||
>
|
||||
<span className="relative z-10 font-extrabold tracking-tight">
|
||||
{episodeNumber}
|
||||
</span>
|
||||
{/* 光晕效果 */}
|
||||
<div className={`absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300 ${isActive ? 'bg-gradient-to-br from-white/20 to-transparent' : 'bg-gradient-to-br from-blue-400/20 via-indigo-400/20 to-purple-400/20'}`} />
|
||||
{/* 闪光效果 */}
|
||||
<div className="absolute -inset-x-full top-0 h-full bg-gradient-to-r from-transparent via-white/30 to-transparent transform -skew-x-12 group-hover:translate-x-full transition-transform duration-700 ease-in-out" />
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -11,6 +11,7 @@ const config: Config = {
|
||||
theme: {
|
||||
extend: {
|
||||
screens: {
|
||||
'xs': '475px',
|
||||
'mobile-landscape': {
|
||||
raw: '(orientation: landscape) and (max-height: 700px)',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user