Refactor service worker and remove test page

- Updated service worker (sw.js) to improve caching strategies and update asset revisions.
- Deleted the test page (page.tsx) as it is no longer needed.
- Refactored EpisodeSelector component to simplify logic and improve performance.
- Added a .dockerignore file to exclude unnecessary files from Docker builds.
This commit is contained in:
katelya
2025-09-02 17:08:23 +08:00
parent f545058bf8
commit fa958d0987
4 changed files with 101 additions and 265 deletions
-43
View File
@@ -1,43 +0,0 @@
'use client';
import React from 'react';
import EpisodeSelector from '@/components/EpisodeSelector';
export default function TestPage() {
return (
<div className="p-8 min-h-screen bg-gray-100 dark:bg-gray-900">
<h1 className="text-3xl font-bold mb-8 text-center text-gray-900 dark:text-white">
🧪
</h1>
<div className="max-w-4xl mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
<div className="h-96">
<EpisodeSelector
totalEpisodes={50}
episodesPerPage={10}
value={5}
onChange={(_episode) => {
// 选择了第 {_episode + 1} 集
}}
availableSources={[]}
sourceSearchLoading={false}
sourceSearchError={null}
/>
</div>
</div>
<div className="max-w-4xl mx-auto mt-8 p-4 bg-blue-100 dark:bg-blue-900 rounded-lg">
<h2 className="text-lg font-bold text-blue-900 dark:text-blue-100 mb-2">:</h2>
<ul className="text-blue-800 dark:text-blue-200 space-y-1">
<li> </li>
<li> </li>
<li> </li>
<li> ()</li>
<li> </li>
<li> </li>
</ul>
</div>
</div>
);
}