'use client' import { useRef, useState } from 'react' import { useTranslations } from 'next-intl' // Lista de trackers común a todos los magnet (idéntica en el original). const TRACKERS = '&tr=http%3A%2F%2F184.105.151.164%3A6969%2Fannounce&tr=http%3A%2F%2F184.105.151.164%3A6969%2Fannounce&tr=http%3A%2F%2F182.150.53.61%3A8080%2Fannounce&tr=http%3A%2F%2F62.210.202.61%3A80%2Fannounce&tr=http%3A%2F%2F78.30.254.12%3A2710%2Fannounce&tr=http%3A%2F%2F91.207.136.85%3A80%2Fannounce&tr=http%3A%2F%2F176.113.71.19%3A6961%2Fannounce&tr=http%3A%2F%2F34.92.10.197%3A6789%2Fannounce&tr=http%3A%2F%2F80.209.252.132%3A1337%2Fannounce&tr=udp%3A%2F%2F62.138.0.158%3A6969%2Fannounce&tr=udp%3A%2F%2F188.241.58.209%3A6969%2Fannounce&tr=udp%3A%2F%2F93.158.213.92%3A1337%2Fannounce&tr=udp%3A%2F%2F62.210.97.59%3A1337%2Fannounce&tr=udp%3A%2F%2F151.80.120.112%3A2710%2Fannounce&tr=udp%3A%2F%2F80.209.252.132%3A1337%2Fannounce' // Hash btih por idioma (Windows y Mac OS Catalina comparten el mismo torrent). const BTIH: Record = { wotlkeses: 'AIV765TUMAIZSGLSVGN7MRYASNJW6UPD', wotlkesmx: 'EL64Q3QUXM42PBGJC4TUHNAH2UUTAJXB', wotlkenus: 'XAJ4DBISLXFEV2N74IIUZLA5XXVGVRG7', wotlkengb: '7U3ATWR7YN2IR63L53EFPPHZ4SI4RZKX', } function magnetFor(lang: string): string { return `magnet:?xt=urn:btih:${BTIH[lang]}${TRACKERS}` } const LANG_INFO_KEY: Record = { wotlkeses: 'clientDownload.langEses', wotlkesmx: 'clientDownload.langEsmx', wotlkenus: 'clientDownload.langEnus', wotlkengb: 'clientDownload.langEngb', } export function ClientDownload() { const t = useTranslations('UI') const [lang, setLang] = useState('') const [os, setOs] = useState('') const [error, setError] = useState(false) const timer = useRef | null>(null) function handleSubmit(e: React.FormEvent) { e.preventDefault() if (!lang || !os) { setError(true) if (timer.current) clearTimeout(timer.current) timer.current = setTimeout(() => setError(false), 5000) return } window.location.href = magnetFor(lang) } return ( <>

{t('clientDownload.torrentTitle')}

{t('clientDownload.infoLabel')}

{t('clientDownload.info1')}

{t('clientDownload.info2')}

{t('clientDownload.info3')}


{t('clientDownload.requirementsLabel')}

{t('clientDownload.requirementsText')}

{t('clientDownload.popupNote')}


{t('clientDownload.stepByStep')}

{t.rich('clientDownload.stepOptional', { winrar: (c) => {c} })}

{t.rich('clientDownload.step1', { qbit: (c) => {c} })}

{t('clientDownload.step2')}

{t('clientDownload.step3')}

{t('clientDownload.step4')}

{t('clientDownload.step5')}

{t('clientDownload.step6')}

{t('clientDownload.step7')}

{t('clientDownload.step8')}

{t('clientDownload.step9')}

{t('clientDownload.step10')}

{t('clientDownload.step11')}

{t('clientDownload.step12')}

{t('clientDownload.step13')}

{t('clientDownload.step14')}

{t('clientDownload.step15')}




{t('clientDownload.languageLabel')}


{lang && (

{lang ? t(LANG_INFO_KEY[lang]) :' '}


{t('clientDownload.osLabel')}



)}


{error ? t('clientDownload.errorChoose') : ''}

{os === 'macosc' && (

{t('clientDownload.macGuideTitle')}

{t('clientDownload.mac1')}

{t('clientDownload.mac2')}


{t('clientDownload.macInstructions')} {/* CrossOver oficial de CodeWeavers (tiene prueba gratuita). Antes esto apuntaba a insmac.org, un repositorio de software de pago pirateado: riesgo de malware para el jugador y, de paso, infracción de copyright en una web que quiere servir anuncios. */}

{t.rich('clientDownload.macStep1', { crossover: (c) => {c} })}

{t('clientDownload.macStep2')}

{t('clientDownload.macStep3')}

{t('clientDownload.macStep4')}

{t('clientDownload.macStep5')}

{t('clientDownload.macStep6')}

{t('clientDownload.macStep7')}

{t('clientDownload.macStep8')}

{t('clientDownload.macStep9')}

{t('clientDownload.macStep10')}

{t('clientDownload.macStep11')}

)}
) }