fix: 修复选集点击偏移问题,调整跳过配置面板位置以避免覆盖

This commit is contained in:
katelya
2025-09-03 21:52:08 +08:00
parent 9aeef4bc63
commit f0bbcf00dc
4 changed files with 87 additions and 12 deletions
+3 -8
View File
@@ -321,7 +321,7 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
</div>
{/* 集数网格 */}
<div className='flex flex-wrap justify-start gap-3 overflow-y-auto h-full pb-4'>
<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) =>
@@ -333,18 +333,13 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
return (
<button
key={episodeNumber}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
handleEpisodeClick(episodeNumber);
}}
className={`w-12 h-10 flex items-center justify-center text-sm font-medium rounded-md transition-all duration-200 cursor-pointer border-0 outline-none focus:ring-2 focus:ring-green-400 flex-shrink-0
onClick={() => handleEpisodeClick(episodeNumber)}
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()}
type="button"
>
{episodeNumber}
</button>
+1 -1
View File
@@ -763,7 +763,7 @@ export default function SkipController({
{/* 管理已有片段 - 优化布局避免重叠 */}
{skipConfig && skipConfig.segments && skipConfig.segments.length > 0 && !isSettingMode && (
<div className="fixed bottom-4 right-4 z-[9998] max-w-sm bg-white/95 dark:bg-gray-800/95 backdrop-blur-sm rounded-lg shadow-lg border border-gray-200 dark:border-gray-600 animate-fade-in">
<div className="fixed bottom-4 left-4 z-[9998] max-w-sm bg-white/95 dark:bg-gray-800/95 backdrop-blur-sm rounded-lg shadow-lg border border-gray-200 dark:border-gray-600 animate-fade-in">
<div className="p-3">
<h4 className="font-medium mb-2 text-gray-900 dark:text-gray-100 text-sm flex items-center">
<svg className="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">