6ca94c2803
- CharacterSelect: componente reutilizable que colorea las opciones por clase (class="priest big-font"…) y el <select> con la clase seleccionada. Usado en unstuck, revive, gold, transfer, trade-points, servicios de pago y recruit. getGameCharacters ahora devuelve classCss. - /unstuck (+revive): diseño del original (info + NOTA, prompt, opciones coloreadas, botón "Desbloqueado"/"Revivido" con refresh). - /vote-points: seed de los 4 sitios con logos y URLs (sql/seed_votesites.sql); botón voted-button para sitios en cooldown; etiqueta "Nota:" separada. - account-info.png (imagen nueva) y CSS de los paneles de cuenta: se añade background-blend-mode: saturation y background-size en #account-settings y .account-fieldset para que la imagen salga como el original. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
import { getTranslations, setRequestLocale } from 'next-intl/server'
|
|
import { redirect } from '@/i18n/navigation'
|
|
import { getSession } from '@/lib/session'
|
|
import { getGameCharacters } from '@/lib/characters'
|
|
import { PageShell } from '@/components/PageShell'
|
|
import { ServiceBox } from '@/components/ServiceBox'
|
|
import { CharacterActionForm } from '@/components/CharacterActionForm'
|
|
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
export default async function UnstuckPage({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params
|
|
setRequestLocale(locale)
|
|
const t = await getTranslations('Services')
|
|
const session = await getSession()
|
|
if (!session.bnetId) redirect({ href: '/login', locale })
|
|
if (!session.username) redirect({ href: '/select-account', locale })
|
|
const chars = await getGameCharacters(session.accountId!)
|
|
|
|
return (
|
|
<PageShell title={t('unstuckTitle')}>
|
|
<ServiceBox>
|
|
<br />
|
|
<p>{t.rich('unstuckInfo1', { b: (c) => <span>{c}</span> })}</p>
|
|
<p>{t('unstuckInfo2')}</p>
|
|
<br />
|
|
<fieldset>
|
|
<legend>NOTA</legend>
|
|
<div className="separate2">
|
|
<p>{t('unstuckNote1')}</p>
|
|
<p>{t('unstuckNote2')}</p>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<CharacterActionForm
|
|
characters={chars.map((c) => ({ name: c.name, classCss: c.classCss }))}
|
|
endpoint="/api/character/unstuck"
|
|
actionLabel={t('unstuckAction')}
|
|
processingLabel={t('unstuckProcessing')}
|
|
doneLabel={t('unstuckDone')}
|
|
promptText={t('unstuckChoose')}
|
|
buttonClass="unstuck-button"
|
|
/>
|
|
</ServiceBox>
|
|
</PageShell>
|
|
)
|
|
}
|