web-next: panel HISTORIALES en /account (debajo de Opciones de personaje)
Tercer panel plegable «HISTORIALES» (id account-history) con 4 herramientas: Historial de PD y PV, transacciones, sanciones y seguridad (points-history/ trans-history/ban-history/security-history; iconos pointsh/dnth/banh/securityh). Arranca CERRADO como los otros dos (el usuario lo abre al click). Prop defaultOpen añadido a Panel (no usado aquí). Claves i18n en Account (es/en). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,17 +33,24 @@ export function AccountTools({ isAdmin }: { isAdmin: boolean }) {
|
||||
{ href: '/transfer', icon: 'tranfer-char-icon', label: t('svcTransfer'), desc: t('svcTransferDesc') },
|
||||
{ href: '/battlepay', icon: 'store-icon', label: t('svcStore'), desc: t('svcStoreDesc') },
|
||||
]
|
||||
const historyTools: Tool[] = [
|
||||
{ href: '/points-history', icon: 'pointsh-icon', label: t('svcPointsHistory'), desc: t('svcPointsHistoryDesc') },
|
||||
{ href: '/trans-history', icon: 'dnth-icon', label: t('svcTransHistory'), desc: t('svcTransHistoryDesc') },
|
||||
{ href: '/ban-history', icon: 'banh-icon', label: t('svcBanHistory'), desc: t('svcBanHistoryDesc') },
|
||||
{ href: '/security-history', icon: 'securityh-icon', label: t('svcSecurityHistory'), desc: t('svcSecurityHistoryDesc') },
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="body-box-content-account">
|
||||
<Panel id="account-settings" arrow="fa-arrow-down-account" title={t('accountOptions')} tools={accountTools} />
|
||||
<Panel id="character-settings" arrow="fa-arrow-down-character" title={t('characterOptions')} tools={characterTools} />
|
||||
<Panel id="account-history" arrow="fa-arrow-down-history" title={t('historyOptions')} tools={historyTools} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function Panel({ id, arrow, title, tools }: { id: string; arrow: string; title: string; tools: Tool[] }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
function Panel({ id, arrow, title, tools, defaultOpen = false }: { id: string; arrow: string; title: string; tools: Tool[]; defaultOpen?: boolean }) {
|
||||
const [open, setOpen] = useState(defaultOpen)
|
||||
const rows: Tool[][] = []
|
||||
for (let i = 0; i < tools.length; i += 2) rows.push(tools.slice(i, i + 2))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user