Files
Nitro-V3/src/components/help/views/HelpIndexView.tsx
T
simoleo89 4fa93cfaf3 fix(help): Habbo-green buttons + restyle sanctions box
Move the .nitro-help blue-header / grey-body override to global CSS so it also
covers the separate SanctionStatusView card (was an inline <style> in HelpView,
so the sanctions body stayed teal). Replace the flat 'success' buttons with the
beveled Habbo-green button (.habbo-btn-green) matching the reference. Restructure
the sanctions box to a single column: text on top, safety link (left) + green
'Ho capito' (right) pinned to the bottom.
2026-06-15 22:23:16 +02:00

53 lines
2.7 KiB
TypeScript

import { GetCfhStatusMessageComposer } from '@nitrots/nitro-renderer';
import { FC } from 'react';
import { FaArrowCircleRight } from 'react-icons/fa';
import { CreateLinkEvent, DispatchUiEvent, GetConfigurationValue, LocalizeText, ReportState, ReportType, SendMessageComposer } from '../../../api';
import { Text } from '../../../common';
import { GuideToolEvent } from '../../../events';
import { useHelp } from '../../../hooks';
import helpDuck from '../../../assets/images/help/help-duck.png';
export const HelpIndexView: FC<{}> = props =>
{
const { setActiveReport = null } = useHelp();
const onReportClick = () =>
{
setActiveReport(prevValue =>
{
const currentStep = ReportState.SELECT_USER;
const reportType = ReportType.BULLY;
return { ...prevValue, currentStep, reportType };
});
};
return (
<div className="flex flex-col gap-2 py-1">
<Text bold fontSize={ 3 }>{ LocalizeText('help.main.frame.title') }</Text>
<Text center className="text-[#5c5c5c]">{ LocalizeText('help.main.frame.description') }</Text>
<div className="flex justify-center py-1">
<img src={ helpDuck } alt="" className="h-[105px] w-auto [image-rendering:pixelated]" />
</div>
<div className="flex flex-col gap-1.5">
<button type="button" className="habbo-btn-green" onClick={ onReportClick }>{ LocalizeText('help.main.bully.subtitle') }</button>
<button type="button" className="habbo-btn-green" disabled={ !GetConfigurationValue('guides.enabled') } onClick={ () => DispatchUiEvent(new GuideToolEvent(GuideToolEvent.CREATE_HELP_REQUEST)) }>{ LocalizeText('help.main.help.title') }</button>
</div>
<div className="flex flex-col gap-1 pt-1">
<button type="button" className="help-link" onClick={ () => CreateLinkEvent('habbopages/help') }>
<FaArrowCircleRight className="help-link__icon" />
{ LocalizeText('help.main.faq.link.text') }
</button>
<button type="button" className="help-link" onClick={ () => SendMessageComposer(new GetCfhStatusMessageComposer(false)) }>
<FaArrowCircleRight className="help-link__icon" />
{ LocalizeText('help.main.my.sanction.status') }
</button>
<button type="button" className="help-link" onClick={ () => SendMessageComposer(new GetCfhStatusMessageComposer(true)) }>
<FaArrowCircleRight className="help-link__icon" />
{ LocalizeText('help.main.my.reports.status') }
</button>
</div>
</div>
);
};