feat: refine ios safari padding & enable reverse episodes order

This commit is contained in:
shinya
2025-06-28 21:56:30 +08:00
parent 2fc86c61b7
commit a9010bf6b5
3 changed files with 50 additions and 6 deletions

View File

@@ -82,6 +82,7 @@ function PlayPageClient() {
const [showShortcutHint, setShowShortcutHint] = useState(false);
const [shortcutText, setShortcutText] = useState('');
const [shortcutDirection, setShortcutDirection] = useState('');
const [reverseEpisodeOrder, setReverseEpisodeOrder] = useState(false);
const shortcutHintTimeoutRef = useRef<NodeJS.Timeout | null>(null);
// 换源相关状态
@@ -1435,7 +1436,22 @@ function PlayPageClient() {
>
<div className='p-6 h-full flex flex-col'>
<div className='flex items-center justify-between mb-6'>
<h3 className='text-white text-xl font-semibold'></h3>
<div className='flex items-center gap-4'>
<h3 className='text-white text-xl font-semibold'>
</h3>
{/* 倒序小字 */}
<span
onClick={() => setReverseEpisodeOrder((prev) => !prev)}
className={`text-sm cursor-pointer select-none transition-colors ${
reverseEpisodeOrder
? 'text-green-500'
: 'text-gray-400 hover:text-gray-500'
}`}
>
</span>
</div>
<button
onClick={() => {
setShowEpisodePanel(false);
@@ -1465,7 +1481,13 @@ function PlayPageClient() {
<div className='flex-1 overflow-y-auto'>
<div className='grid grid-cols-4 gap-3'>
{Array.from({ length: totalEpisodes }, (_, idx) => (
{(reverseEpisodeOrder
? Array.from(
{ length: totalEpisodes },
(_, i) => i
).reverse()
: Array.from({ length: totalEpisodes }, (_, i) => i)
).map((idx) => (
<button
key={idx}
onClick={() => handleEpisodeChange(idx)}