eslint fix
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
'use client';
|
||||
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { Bot, Loader2, Send, Sparkles, Trash2,X } from 'lucide-react';
|
||||
import React, { useEffect,useRef, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { X, Send, Bot, Loader2, Sparkles, Trash2 } from 'lucide-react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
|
||||
import { VideoContext } from '@/lib/ai-orchestrator';
|
||||
|
||||
interface ChatMessage {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
'use client';
|
||||
|
||||
import { AlertCircle, Download, ExternalLink, Loader2 } from 'lucide-react';
|
||||
import { useEffect, useState, useRef, useCallback } from 'react';
|
||||
import { useCallback,useEffect, useRef, useState } from 'react';
|
||||
|
||||
import Toast, { ToastProps } from '@/components/Toast';
|
||||
import CapsuleSwitch from '@/components/CapsuleSwitch';
|
||||
import Toast, { ToastProps } from '@/components/Toast';
|
||||
|
||||
interface AcgSearchItem {
|
||||
title: string;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState, useCallback, useRef } from 'react';
|
||||
import { ChevronLeft, ChevronRight, Play } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { getTMDBImageUrl, getGenreNames, type TMDBItem } from '@/lib/tmdb.client';
|
||||
import { useCallback, useEffect, useRef,useState } from 'react';
|
||||
|
||||
import { type TMDBItem,getGenreNames, getTMDBImageUrl } from '@/lib/tmdb.client';
|
||||
import { processImageUrl } from '@/lib/utils';
|
||||
import { ChevronLeft, ChevronRight, Play } from 'lucide-react';
|
||||
|
||||
interface BannerCarouselProps {
|
||||
autoPlayInterval?: number; // 自动播放间隔(毫秒)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-console */
|
||||
'use client';
|
||||
|
||||
import { AlertTriangle } from 'lucide-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { AlertTriangle } from 'lucide-react';
|
||||
|
||||
import type { PlayRecord } from '@/lib/db.client';
|
||||
import {
|
||||
|
||||
@@ -225,7 +225,7 @@ export default function CorrectDialog({
|
||||
try {
|
||||
// 构建标题和ID:如果是第二季及以后,在标题后加上季度名称,并使用季度ID
|
||||
let finalTitle = result.title || result.name;
|
||||
let finalTmdbId = result.id;
|
||||
const finalTmdbId = result.id;
|
||||
|
||||
if (season && season.season_number > 1) {
|
||||
finalTitle = `${finalTitle} ${season.name}`;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
||||
import React, { useCallback,useEffect, useRef, useState } from 'react';
|
||||
|
||||
interface DanmakuData {
|
||||
time: number;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { initDanmakuModule } from '@/lib/danmaku/api';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { X, Plus, Trash2, ToggleLeft, ToggleRight } from 'lucide-react';
|
||||
import { DanmakuFilterConfig, DanmakuFilterRule } from '@/lib/types';
|
||||
import { Plus, ToggleLeft, ToggleRight,Trash2, X } from 'lucide-react';
|
||||
import { useEffect, useRef,useState } from 'react';
|
||||
|
||||
import { getDanmakuFilterConfig, saveDanmakuFilterConfig } from '@/lib/db.client';
|
||||
import { DanmakuFilterConfig, DanmakuFilterRule } from '@/lib/types';
|
||||
|
||||
interface DanmakuFilterSettingsProps {
|
||||
isOpen: boolean;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { MagnifyingGlassIcon } from '@heroicons/react/24/outline';
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { getEpisodes, searchAnime } from '@/lib/danmaku/api';
|
||||
import type {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { X, Calendar, Star, Clock, Tag, Users, Globe, Film } from 'lucide-react';
|
||||
import { Calendar, Clock, Film,Globe, Star, Tag, Users, X } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
import { getTMDBImageUrl } from '@/lib/tmdb.client';
|
||||
import { processImageUrl } from '@/lib/utils';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState, useCallback } from 'react';
|
||||
import { useCallback,useEffect, useState } from 'react';
|
||||
|
||||
import { useEnableComments } from '@/hooks/useEnableComments';
|
||||
|
||||
interface DoubanComment {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState, useCallback } from 'react';
|
||||
import { useCallback,useEffect, useState } from 'react';
|
||||
|
||||
import { useEnableComments } from '@/hooks/useEnableComments';
|
||||
import VideoCard from '@/components/VideoCard';
|
||||
|
||||
import ScrollableRow from '@/components/ScrollableRow';
|
||||
import VideoCard from '@/components/VideoCard';
|
||||
|
||||
interface DoubanRecommendation {
|
||||
doubanId: string;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { useDownload } from '@/contexts/DownloadContext';
|
||||
|
||||
export function DownloadBubble() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
|
||||
import React, { useState, useMemo } from 'react';
|
||||
import React, { useMemo,useState } from 'react';
|
||||
|
||||
interface DownloadEpisodeSelectorProps {
|
||||
/** 是否显示弹窗 */
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { useDownload } from '@/contexts/DownloadContext';
|
||||
|
||||
import { M3U8DownloadTask } from '@/lib/m3u8-downloader';
|
||||
|
||||
import { useDownload } from '@/contexts/DownloadContext';
|
||||
|
||||
export function DownloadPanel() {
|
||||
const { tasks, showDownloadPanel, setShowDownloadPanel, startTask, pauseTask, cancelTask, retryFailedSegments, getProgress } = useDownload();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
|
||||
import { Clock, Target, Tv, List, BarChart3 } from 'lucide-react';
|
||||
import { BarChart3,Clock, List, Target, Tv } from 'lucide-react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { formatTimeToHHMM, parseCustomTimeFormat } from '@/lib/time';
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { X, Plus, Trash2, ToggleLeft, ToggleRight } from 'lucide-react';
|
||||
import { EpisodeFilterConfig, EpisodeFilterRule } from '@/lib/types';
|
||||
import { Plus, ToggleLeft, ToggleRight,Trash2, X } from 'lucide-react';
|
||||
import { useEffect, useRef,useState } from 'react';
|
||||
|
||||
import { getEpisodeFilterConfig, saveEpisodeFilterConfig } from '@/lib/db.client';
|
||||
import { EpisodeFilterConfig, EpisodeFilterRule } from '@/lib/types';
|
||||
|
||||
interface EpisodeFilterSettingsProps {
|
||||
isOpen: boolean;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
|
||||
import { Settings } from 'lucide-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React, {
|
||||
useCallback,
|
||||
@@ -8,13 +9,13 @@ import React, {
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Settings } from 'lucide-react';
|
||||
|
||||
import type { DanmakuComment,DanmakuSelection } from '@/lib/danmaku/types';
|
||||
import { EpisodeFilterConfig,SearchResult } from '@/lib/types';
|
||||
import { getVideoResolutionFromM3u8, processImageUrl } from '@/lib/utils';
|
||||
|
||||
import DanmakuPanel from '@/components/DanmakuPanel';
|
||||
import EpisodeFilterSettings from '@/components/EpisodeFilterSettings';
|
||||
import type { DanmakuSelection, DanmakuComment } from '@/lib/danmaku/types';
|
||||
import { SearchResult, EpisodeFilterConfig } from '@/lib/types';
|
||||
import { getVideoResolutionFromM3u8, processImageUrl } from '@/lib/utils';
|
||||
|
||||
// 定义视频信息类型
|
||||
interface VideoInfo {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
'use client';
|
||||
|
||||
import { Star, X, AlertTriangle } from 'lucide-react';
|
||||
import { AlertTriangle,Star, X } from 'lucide-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
getAllPlayRecords,
|
||||
subscribeToDataUpdates,
|
||||
} from '@/lib/db.client';
|
||||
|
||||
import VideoCard from '@/components/VideoCard';
|
||||
|
||||
interface FavoriteItem {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { AlertTriangle } from 'lucide-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
import { getAuthInfoFromBrowserCookie } from '@/lib/auth';
|
||||
|
||||
interface HttpWarningDialogProps {
|
||||
|
||||
@@ -66,7 +66,7 @@ const MobileBottomNav = ({ activePath }: MobileBottomNavProps) => {
|
||||
const runtimeConfig = (window as any).RUNTIME_CONFIG;
|
||||
|
||||
// 基础导航项(不包括观影室)
|
||||
let items = [
|
||||
const items = [
|
||||
{ icon: Home, label: '首页', href: '/' },
|
||||
{
|
||||
icon: Film,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
'use client';
|
||||
|
||||
import { Bell, Check, Trash2, X } from 'lucide-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { Notification } from '@/lib/types';
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => {
|
||||
const runtimeConfig = (window as any).RUNTIME_CONFIG;
|
||||
|
||||
// 基础菜单项(不包括观影室)
|
||||
let items = [
|
||||
const items = [
|
||||
{
|
||||
icon: Film,
|
||||
label: '电影',
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState, useCallback } from 'react';
|
||||
import { useCallback,useEffect, useState } from 'react';
|
||||
|
||||
import { useEnableComments } from '@/hooks/useEnableComments';
|
||||
import { useRecommendationDataSource } from '@/hooks/useRecommendationDataSource';
|
||||
import VideoCard from '@/components/VideoCard';
|
||||
|
||||
import ScrollableRow from '@/components/ScrollableRow';
|
||||
import VideoCard from '@/components/VideoCard';
|
||||
|
||||
interface Recommendation {
|
||||
doubanId?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { CheckCircle, Info, X,XCircle } from 'lucide-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { CheckCircle, XCircle, Info, X } from 'lucide-react';
|
||||
|
||||
export interface ToastProps {
|
||||
message: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { usePathname, useSearchParams, useRouter } from 'next/navigation';
|
||||
import { usePathname, useRouter,useSearchParams } from 'next/navigation';
|
||||
import NProgress from 'nprogress';
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
// 创建全局钩子来拦截 router
|
||||
let globalRouterRef: any = null;
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
import { getAuthInfoFromBrowserCookie } from '@/lib/auth';
|
||||
@@ -38,11 +38,11 @@ import { clearAllDanmakuCache } from '@/lib/danmaku/api';
|
||||
import { CURRENT_VERSION } from '@/lib/version';
|
||||
import { UpdateStatus } from '@/lib/version_check';
|
||||
|
||||
import { FavoritesPanel } from './FavoritesPanel';
|
||||
import { NotificationPanel } from './NotificationPanel';
|
||||
import { OfflineDownloadPanel } from './OfflineDownloadPanel';
|
||||
import { useVersionCheck } from './VersionCheckProvider';
|
||||
import { VersionPanel } from './VersionPanel';
|
||||
import { OfflineDownloadPanel } from './OfflineDownloadPanel';
|
||||
import { NotificationPanel } from './NotificationPanel';
|
||||
import { FavoritesPanel } from './FavoritesPanel';
|
||||
|
||||
interface AuthInfo {
|
||||
username?: string;
|
||||
|
||||
@@ -24,10 +24,10 @@ import {
|
||||
import { processImageUrl } from '@/lib/utils';
|
||||
import { useLongPress } from '@/hooks/useLongPress';
|
||||
|
||||
import { ImagePlaceholder } from '@/components/ImagePlaceholder';
|
||||
import MobileActionSheet from '@/components/MobileActionSheet';
|
||||
import AIChatPanel from '@/components/AIChatPanel';
|
||||
import DetailPanel from '@/components/DetailPanel';
|
||||
import { ImagePlaceholder } from '@/components/ImagePlaceholder';
|
||||
import MobileActionSheet from '@/components/MobileActionSheet';
|
||||
|
||||
export interface VideoCardProps {
|
||||
id?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useRef, useEffect, useState } from 'react';
|
||||
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
interface VirtualScrollableRowProps {
|
||||
children: React.ReactNode[];
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
// WatchRoom 全局状态管理 Provider
|
||||
'use client';
|
||||
|
||||
import React, { createContext, useContext, useEffect, useState, useCallback } from 'react';
|
||||
import React, { createContext, useCallback,useContext, useEffect, useState } from 'react';
|
||||
|
||||
import { useWatchRoom } from '@/hooks/useWatchRoom';
|
||||
import type { Room, Member, ChatMessage, WatchRoomConfig } from '@/types/watch-room';
|
||||
|
||||
import Toast, { ToastProps } from '@/components/Toast';
|
||||
|
||||
import type { ChatMessage, Member, Room, WatchRoomConfig } from '@/types/watch-room';
|
||||
|
||||
// Import type from watch-room-socket
|
||||
type WatchRoomSocket = import('@/lib/watch-room-socket').WatchRoomSocket;
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
// 全局聊天悬浮窗和房间信息按钮
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { MessageCircle, X, Send, Smile, Minimize2, Maximize2, Info, Users, LogOut, XCircle, Mic, MicOff, Volume2, VolumeX, AlertCircle } from 'lucide-react';
|
||||
import { useWatchRoomContextSafe } from '@/components/WatchRoomProvider';
|
||||
import { AlertCircle,Info, LogOut, Maximize2, MessageCircle, Mic, MicOff, Minimize2, Send, Smile, Users, Volume2, VolumeX, X, XCircle } from 'lucide-react';
|
||||
import { useEffect, useRef,useState } from 'react';
|
||||
|
||||
import { useVoiceChat } from '@/hooks/useVoiceChat';
|
||||
|
||||
import { useWatchRoomContextSafe } from '@/components/WatchRoomProvider';
|
||||
|
||||
const EMOJI_LIST = ['😀', '😂', '😍', '🥰', '😎', '🤔', '👍', '👏', '🎉', '❤️', '🔥', '⭐'];
|
||||
|
||||
export default function ChatFloatingWindow() {
|
||||
|
||||
Reference in New Issue
Block a user