import React, { useRef, useState } from "react"; import { ScreenId, AppState } from "../types"; import { Search, PlayCircle, Star, Landmark } from "lucide-react"; interface GameCenterViewProps { state: AppState; onNavigate: (screen: ScreenId) => void; } interface GameItem { id: string; title: string; provider: string; tag: "Hot" | "New" | "Jackpot" | "Trend"; image: string; categories: string[]; } const ALL_GAMES: GameItem[] = [ // PG Soft { id: "god-wealth", title: "财神到 (God of Wealth)", provider: "PG Soft", tag: "Hot", image: "https://lh3.googleusercontent.com/aida-public/AB6AXuCvCZ9nLkoHEJdij0ZYoQP7lB_J_xWMlTcTteA3SX8HGD7anTwlbvxteqV1CMtwm2Ux1uYCLDQhFmwOtNlhp_FUzQnwgP_RkqC_87SMxDuqWzVWGQ6JH2n0OmZo8M9mmV-sXcC3SVBUXw7ufHGXszztiqtLSpyOzO8fR-nVXRnW_t0k5oTKvMWb7EdBG4rqE3llMt6MAJEIBwqDDeebjAdKEbOi1Jfj34J_3-l9CbMNkGWGHPbO4kTaiN86vVhvhFxYO-aHjfxW9YK_", categories: ["电子"] }, { id: "cyberpunk", title: "赛博朋克:急速狂飙", provider: "PG Soft", tag: "New", image: "https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "mahjong-ways", title: "麻将胡了 2 (Mahjong Ways)", provider: "PG Soft", tag: "Hot", image: "https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "wild-bandito", title: "寻宝黄金城 (Wild Bandito)", provider: "PG Soft", tag: "Trend", image: "https://images.unsplash.com/photo-1614064641938-3bbee52942c7?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "double-fortune", title: "双喜临门 (Double Fortune)", provider: "PG Soft", tag: "Jackpot", image: "https://images.unsplash.com/photo-1596838132731-3301c3fd4317?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // Pragmatic Play (PP) { id: "classic-fruits", title: "经典玛丽水果机 (Fruit Slots)", provider: "Pragmatic Play", tag: "Trend", image: "https://lh3.googleusercontent.com/aida-public/AB6AXuCUOPzY0f0cN85nT2OZlnuBdQrdP8sIGwLlLO_8susMpMWkXB-aibDGbWaDnZaWBlbahzkdnUyY0l0G8guuVjey0SuNDkV4ltkrHm2IadXAqtq_NzPPuJl9S7ueFDdA2l4Bz-WE9msi2Ccby2LeiV0xoAN-8Jz3xp7O49zvjuWQ1fYi87CbSvsCOEtkz1k72Gc_dXsJG95_d3QSWHPqnfKcGdxJsAJOwQ13A7i5Es-M1srCbhRY2qBM3PFrsdtmEg5-HISozrKTHgpr", categories: ["电子"] }, { id: "gates-olympus", title: "奥林匹斯之门 (Gates of Olympus)", provider: "Pragmatic Play", tag: "Jackpot", image: "https://images.unsplash.com/photo-1606167668584-78701c57f13d?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "sweet-bonanza", title: "甜心炸弹 (Sweet Bonanza)", provider: "Pragmatic Play", tag: "Hot", image: "https://images.unsplash.com/photo-1581798459219-318e76aecc7b?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "sugar-rush", title: "极速糖果 (Sugar Rush)", provider: "Pragmatic Play", tag: "New", image: "https://images.unsplash.com/photo-1534080564583-6be75777b70a?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // CQ9 { id: "dragon-story", title: "巨龙传说:黄金帝国", provider: "CQ9", tag: "Hot", image: "https://images.unsplash.com/photo-1508739773434-c26b3d09e071?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "jump-high", title: "极速跳高高 (Jump High)", provider: "CQ9", tag: "Trend", image: "https://images.unsplash.com/photo-1553481187-be93c21490a9?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "good-fortune", title: "鸿运当头 (Good Fortune)", provider: "CQ9", tag: "Jackpot", image: "https://images.unsplash.com/photo-1534447677768-be436bb09401?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "disco-gold", title: "黄金迪斯科 (Disco Gold)", provider: "CQ9", tag: "New", image: "https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // JDB { id: "caishen-jdb", title: "金鸡报喜 (JBD Birds)", provider: "JDB", tag: "New", image: "https://images.unsplash.com/photo-1518133910546-b6c2fb7d79e3?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "open-sesame", title: "芝麻开门 (Open Sesame)", provider: "JDB", tag: "Hot", image: "https://images.unsplash.com/photo-1518133910546-b6c2fb7d79e3?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "dragon-king", title: "龙王传说 (Dragon King)", provider: "JDB", tag: "Trend", image: "https://images.unsplash.com/photo-1607604276583-eef5d076aa5f?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "face-change", title: "川剧变脸 (Face Change)", provider: "JDB", tag: "Jackpot", image: "https://images.unsplash.com/photo-1509248961158-e54f6934749c?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // FC { id: "fa-fa-fa", title: "发发发发 (Fa Fa Fa)", provider: "FC", tag: "Hot", image: "https://images.unsplash.com/photo-1596838132731-3301c3fd4317?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "golden-panther", title: "黄金黑豹 (Golden Panther)", provider: "FC", tag: "Trend", image: "https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "bao-boon-chin", title: "百倍暴龙 (Bao Boon Chin)", provider: "FC", tag: "New", image: "https://images.unsplash.com/photo-1563089145-599997674d42?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "dragon-gate", title: "黄金鲤鱼跃龙门 (Dragon Gate)", provider: "FC", tag: "Jackpot", image: "https://images.unsplash.com/photo-1508739773434-c26b3d09e071?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // JILI Gaming { id: "faraoh-treasure", title: "法老王的宝藏 (Faraoh's Gold)", provider: "JILI Gaming", tag: "Jackpot", image: "https://lh3.googleusercontent.com/aida-public/AB6AXuALk4ZWUmQ0U7ymNLwjMAfWY4huZ-X-_zq1l_CYklO-2OZv3s4u3TkBbTRpeuUKWV0t-Y19q_nfEEQOrwCkyPUQgtEF9xSwmqqVMuyCgzP1k9tLB8Mhg2SpWgl5BoecA0SMq5pn-1w3hccl5A24dpr7L8TmZbT8eRkSBj2_S9NPG1H33_oYksl862fPJsNgO1dW28r8JEYeomBrvV7iSVYFHsyf_zMJdeinitT7CRjcNZbokiLJoChgZ4Lptce3yv9diLJc6qYAeV6X", categories: ["电子"] }, { id: "boxing-king", title: "拳王争霸 (Boxing King)", provider: "JILI Gaming", tag: "Hot", image: "https://images.unsplash.com/photo-1517649763962-0c623066013b?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "roma-gold", title: "罗马帝国 (Roma Gold)", provider: "JILI Gaming", tag: "Trend", image: "https://images.unsplash.com/photo-1552820728-8b83bb6b773f?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "super-rich", title: "聚宝盆 (Super Rich)", provider: "JILI Gaming", tag: "New", image: "https://images.unsplash.com/photo-1579621970563-ebec7560ff3e?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // NoLimit City { id: "mental-slots", title: "精神病医院 (Mental)", provider: "NoLimit City", tag: "Trend", image: "https://images.unsplash.com/photo-1509248961158-e54f6934749c?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "tombstone-rip", title: "墓碑特区 (Tombstone R.I.P)", provider: "NoLimit City", tag: "Hot", image: "https://images.unsplash.com/photo-1509248961158-e54f6934749c?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "san-quentin", title: "圣贤监狱 (San Quentin xWays)", provider: "NoLimit City", tag: "Jackpot", image: "https://images.unsplash.com/photo-1589829545856-d10d557cf95f?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // Hacksaw Gaming { id: "chaos-crew", title: "混沌骷髅 (Chaos Crew 2)", provider: "Hacksaw Gaming", tag: "Hot", image: "https://images.unsplash.com/photo-1563089145-599997674d42?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "wanted-dead", title: "死亡之手 (Wanted Dead or a Wild)", provider: "Hacksaw Gaming", tag: "Jackpot", image: "https://images.unsplash.com/photo-1518895949257-7621c3c786d7?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, { id: "rotten-gear", title: "齿轮僵尸 (Rotten)", provider: "Hacksaw Gaming", tag: "Trend", image: "https://images.unsplash.com/photo-1563089145-599997674d42?auto=format&fit=crop&w=300&q=80", categories: ["电子"] }, // Live casino (视讯) { id: "liveroulette", title: "视讯:异国急速百家乐 (Live Baccarat)", provider: "Evolution Gaming", tag: "Hot", image: "https://images.unsplash.com/photo-1596838132731-3301c3fd4317?auto=format&fit=crop&w=300&q=80", categories: ["视讯"] }, { id: "dragon-tiger", title: "真人:龙虎争霸 (Dragon-Tiger Live)", provider: "Evolution Gaming", tag: "Trend", image: "https://images.unsplash.com/photo-1518133910546-b6c2fb7d79e3?auto=format&fit=crop&w=300&q=80", categories: ["视讯"] }, { id: "live-sicbo", title: "真人:极速骰宝 (Live SicBo)", provider: "Evolution Gaming", tag: "Hot", image: "https://images.unsplash.com/photo-1518133910546-b6c2fb7d79e3?auto=format&fit=crop&w=300&q=80", categories: ["视讯"] }, // Fishing (捕鱼) { id: "fishing-master", title: "经典欢乐捕鱼达人 (Fishing Master)", provider: "JILI Gaming", tag: "Hot", image: "https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=300&q=80", categories: ["捕鱼"] }, { id: "ocean-king", title: "真人:深海捕鱼王 (Ocean King)", provider: "JILI Gaming", tag: "Hot", image: "https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=300&q=80", categories: ["捕鱼"] }, { id: "shark-hunter", title: "3D:猎鲨风暴 (Shark Hunter)", provider: "JILI Gaming", tag: "New", image: "https://images.unsplash.com/photo-1544551763-46a013bb70d5?auto=format&fit=crop&w=300&q=80", categories: ["捕鱼"] }, // Lottery (彩票) { id: "hk-lotto-six", title: "香港六合彩 (Hong Kong Mark Six)", provider: "HY Lottery", tag: "Jackpot", image: "https://images.unsplash.com/photo-1606167668584-78701c57f13d?auto=format&fit=crop&w=300&q=80", categories: ["彩票"] }, { id: "canada-lotto", title: "加拿大 PC28 极速开奖", provider: "HY Lottery", tag: "Trend", image: "https://images.unsplash.com/photo-1605810230434-7631ac76ec81?auto=format&fit=crop&w=300&q=80", categories: ["彩票"] }, { id: "bj-k3", title: "北京快三 (Beijing K3)", provider: "HY Lottery", tag: "Hot", image: "https://images.unsplash.com/photo-1605810230434-7631ac76ec81?auto=format&fit=crop&w=300&q=80", categories: ["彩票"] }, // Sports (体育) { id: "pl-football", title: "英超/西甲极速亚洲盘", provider: "SABAH Sports", tag: "Hot", image: "https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=300&q=80", categories: ["体育"] }, { id: "nba-esports", title: "美职篮篮球滚盘 (NBA Basketball Live)", provider: "IM Sports", tag: "New", image: "https://images.unsplash.com/photo-1546519638-68e109498ffc?auto=format&fit=crop&w=300&q=80", categories: ["体育"] }, { id: "wbc-boxing", title: "世界拳击锦标赛 (WBC Boxing)", provider: "IM Sports", tag: "Hot", image: "https://images.unsplash.com/photo-1517649763962-0c623066013b?auto=format&fit=crop&w=300&q=80", categories: ["体育"] }, // Poker (棋牌) { id: "poker-king", title: "金牌急速斗地主 (Poker King)", provider: "King Maker", tag: "Hot", image: "https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=300&q=80", categories: ["棋牌"] }, { id: "rich-landlord", title: "极速斗地主 (Rich Landlord)", provider: "King Maker", tag: "Hot", image: "https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=300&q=80", categories: ["棋牌"] }, { id: "texas-holdem", title: "德州扑克大师赛 (Texas Hold'em)", provider: "King Maker", tag: "Trend", image: "https://images.unsplash.com/photo-1596838132731-3301c3fd4317?auto=format&fit=crop&w=300&q=80", categories: ["棋牌"] } ]; const matchesProvider = (gameProvider: string, filter: string) => { if (filter === "全部") return true; if (filter === "PG") return gameProvider === "PG Soft"; if (filter === "PP") return gameProvider === "Pragmatic Play"; if (filter === "CQ9") return gameProvider === "CQ9"; if (filter === "JDB") return gameProvider === "JDB"; if (filter === "FC") return gameProvider === "FC"; if (filter === "JILI") return gameProvider === "JILI Gaming"; if (filter === "nolimit") return gameProvider === "NoLimit City"; if (filter === "hacksaw") return gameProvider === "Hacksaw Gaming"; return false; }; const PROVIDERS_LIST = [ "PG Soft", "Pragmatic Play", "CQ9", "JDB", "FC", "JILI Gaming", "NoLimit City", "Hacksaw Gaming", "Evolution Gaming", "HY Lottery", "SABAH Sports", "IM Sports", "King Maker" ]; export const GameCenterView: React.FC = ({ state, onNavigate }) => { const [searchQuery, setSearchQuery] = useState(""); const [activeTab, setActiveTab] = useState("热门推荐"); const [selectedProvider, setSelectedProvider] = useState("全部"); const [showAdminSettings, setShowAdminSettings] = useState(false); const tabScrollRef = useRef(null); const tabDragRef = useRef({ active: false, dragged: false, startX: 0, scrollLeft: 0 }); // Recommended list loaded from default config, can be toggled by settings const [recommendedGameIds, setRecommendedGameIds] = useState([ "god-wealth", "faraoh-treasure", "cyberpunk", "dragon-story" ]); const tabs = ["热门推荐", "电子", "视讯", "捕鱼", "彩票", "体育", "棋牌"]; const filteredGames = ALL_GAMES.filter((g) => { // Check search query const matchesQuery = searchQuery ? g.title.toLowerCase().includes(searchQuery.toLowerCase()) || g.provider.toLowerCase().includes(searchQuery.toLowerCase()) : true; if (!matchesQuery) return false; // Check custom recommendation logic if (activeTab === "热门推荐") { return recommendedGameIds.includes(g.id); } const matchesCategory = g.categories.includes(activeTab); if (!matchesCategory) return false; // Additional provider filter for slots if (activeTab === "电子") { return matchesProvider(g.provider, selectedProvider); } return true; }); const getTagStyle = (tag: string) => { switch(tag) { case "Hot": return "bg-red-500/20 text-red-400 border border-red-500/30"; case "New": return "bg-blue-500/20 text-blue-400 border border-blue-500/30"; case "Jackpot": return "bg-amber-500/20 text-amber-400 border border-amber-500/30 font-bold"; default: return "bg-teal-500/20 text-teal-400 border border-teal-500/30"; } }; const handleTabPointerDown = (event: React.PointerEvent) => { const el = tabScrollRef.current; if (!el) return; tabDragRef.current = { active: true, dragged: false, startX: event.clientX, scrollLeft: el.scrollLeft }; el.setPointerCapture(event.pointerId); }; const handleTabPointerMove = (event: React.PointerEvent) => { const el = tabScrollRef.current; const drag = tabDragRef.current; if (!el || !drag.active) return; const deltaX = event.clientX - drag.startX; if (Math.abs(deltaX) > 4) { drag.dragged = true; } el.scrollLeft = drag.scrollLeft - deltaX; }; const handleTabPointerEnd = (event: React.PointerEvent) => { const el = tabScrollRef.current; if (el?.hasPointerCapture(event.pointerId)) { el.releasePointerCapture(event.pointerId); } tabDragRef.current.active = false; }; const handleTabClick = (tab: string) => { if (tabDragRef.current.dragged) { tabDragRef.current.dragged = false; return; } setActiveTab(tab); setSearchQuery(""); if (tab === "电子") { setSelectedProvider("PG"); } else if (tab === "热门推荐") { setSelectedProvider("全部"); } else { setSelectedProvider("厂商 A"); } }; return (
{/* Header */}

onNavigate(ScreenId.HOME)} > sdyl.ph/游戏中心

{/* Admin Configuration toggle button */}
{/* Admin Settings Panel */} {showAdminSettings && (

⚙️ 模拟后台:热门推荐配置 (按厂商分组)

在模拟后台中勾选指定厂商的某款游戏为“热门推荐”,前台“热门推荐”页将实时同步呈现。

{PROVIDERS_LIST.map((provider) => { const providerGames = ALL_GAMES.filter(g => g.provider === provider); if (providerGames.length === 0) return null; return (

{provider}

{providerGames.map((game) => { const isHot = recommendedGameIds.includes(game.id); return ( ); })}
); })}
)} {/* Search Bar */}
setSearchQuery(e.target.value)} placeholder="搜索您喜爱的游戏或供应商..." className="w-full bg-[#0b2135] border border-white/5 rounded-full py-2.5 pl-11 pr-4 text-xs text-white placeholder-slate-500 focus:outline-none focus:border-[#528dff]" />
{/* Horizontal Category Tab Selector */}
{tabs.map((tab) => ( ))}
{/* Games List Display Grid */}
{filteredGames.length === 0 ? (
暂无符合当前“{activeTab}”分类的游戏记录,请尝试其他分类。
) : ( activeTab === "热门推荐" ? ( /* Popular Recommendations Grid (No sidebar, full width) */
{filteredGames.map((game) => (
{ if (game.id === "god-wealth" || game.provider === "PG Soft") { onNavigate(ScreenId.GAME_DETAILS); } else { onNavigate(ScreenId.GAME_RECOMMENDATIONS); } }} className="bg-[#0b2135] border border-white/5 rounded-2xl overflow-hidden shadow-lg group active:scale-[0.98] transition-all cursor-pointer flex flex-col justify-between" >
{game.title}
{game.tag}

{game.title}

{game.provider} 9.8
))}
) : ( /* Sidebar-enabled categories (电子, 视讯, 捕鱼, 彩票, 体育, 棋牌) */
{/* Left Sidebar */}
厂商筛选 {activeTab === "电子" ? ( /* Slots real vendors */ ["PG", "PP", "CQ9", "JDB", "FC", "JILI", "nolimit", "hacksaw"].map((prov) => ( )) ) : ( /* Other categories: Placeholder vendors */ ["厂商 A", "厂商 B", "厂商 C"].map((placeholder) => ( )) )}
{/* Right Game Grid (2-column, shrunk icons) */}
{filteredGames.map((game) => (
{ if (game.id === "god-wealth" || game.provider === "PG Soft") { onNavigate(ScreenId.GAME_DETAILS); } else { onNavigate(ScreenId.GAME_RECOMMENDATIONS); } }} className="bg-[#0b2135] border border-white/5 rounded-xl overflow-hidden shadow-md group active:scale-[0.98] transition-all cursor-pointer flex flex-col justify-between" >
{game.title}
{game.tag}

{game.title}

{game.provider} 9.8
))}
) )}
{/* Floating Recharge Access FAB */}
{/* Bottom Nav Bar */}
); };