diff --git a/src/components/help/HelpView.tsx b/src/components/help/HelpView.tsx index 01701be..0cfc7a7 100644 --- a/src/components/help/HelpView.tsx +++ b/src/components/help/HelpView.tsx @@ -12,22 +12,6 @@ import { SelectReportedUserView } from './views/SelectReportedUserView'; import { SelectTopicView } from './views/SelectTopicView'; import { NameChangeView } from './views/name-change/NameChangeView'; -// Scoped colour override for the Aiuto window: classic blue header + light grey -// body (the shared 'primary-slim' theme is teal + cream). Higher specificity -// (.nitro-card.nitro-help ...) than the theme so it wins. The body element -// renders `.nitro-card-content-shell`, NOT `.content-area`. -const HELP_STYLES = ` - .nitro-card.nitro-help .nitro-card-header { - background: linear-gradient(180deg, #5a80b8 0%, #3f63a0 100%); - border-color: #34548a; - } - .nitro-card.nitro-help, - .nitro-card.nitro-help .content-area, - .nitro-card.nitro-help .nitro-card-content-shell { - background: #ebebe3 !important; - } -`; - export const HelpView: FC<{}> = props => { const [ isVisible, setIsVisible ] = useState(false); @@ -115,7 +99,6 @@ export const HelpView: FC<{}> = props => - { activeReport ? diff --git a/src/components/help/views/HelpIndexView.tsx b/src/components/help/views/HelpIndexView.tsx index 36bfe85..eea952b 100644 --- a/src/components/help/views/HelpIndexView.tsx +++ b/src/components/help/views/HelpIndexView.tsx @@ -2,7 +2,7 @@ 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 { Button, Text } from '../../../common'; +import { Text } from '../../../common'; import { GuideToolEvent } from '../../../events'; import { useHelp } from '../../../hooks'; import helpDuck from '../../../assets/images/help/help-duck.png'; @@ -30,20 +30,20 @@ export const HelpIndexView: FC<{}> = props =>
- - + +
- - -
diff --git a/src/components/help/views/SanctionStatusView.tsx b/src/components/help/views/SanctionStatusView.tsx index 88beb43..a0106a5 100644 --- a/src/components/help/views/SanctionStatusView.tsx +++ b/src/components/help/views/SanctionStatusView.tsx @@ -1,6 +1,7 @@ import { FC } from 'react'; -import { LocalizeText } from '../../../api'; -import { Button, Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../common'; +import { FaArrowCircleRight } from 'react-icons/fa'; +import { CreateLinkEvent, LocalizeText } from '../../../api'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../common'; import { useHelp } from '../../../hooks'; export const SanctionSatusView: FC<{}> = props => @@ -37,38 +38,45 @@ export const SanctionSatusView: FC<{}> = props => if(!sanctionInfo) return null; return ( - + setSanctionInfo(null) } /> - - -
- - +
+
{ (sanctionInfo.sanctionReason === 'cfh.reason.EMPTY') - ?
{ LocalizeText('help.sanction.current.none') }
+ ?
{ LocalizeText('help.sanction.current.none') }
: <> { ((sanctionInfo.probationHoursLeft > 0) || (sanctionInfo.isSanctionActive)) && -
{ LocalizeText('help.sanction.probation.reminder') }
+
{ LocalizeText('help.sanction.probation.reminder') }
} -
+
{ LocalizeText('help.sanction.last.sanction') } { sanctionLocalization('current', sanctionInfo.sanctionName, sanctionInfo.sanctionLengthHours) }
-
{ LocalizeText('generic.start.time') } { sanctionInfo.sanctionCreationTime }
-
{ LocalizeText('generic.reason') } { sanctionInfo.sanctionReason }
-
{ LocalizeText('help.sanction.probation.days.left') } { Math.trunc((sanctionInfo.probationHoursLeft / 24)) + 1 }
+
{ LocalizeText('generic.start.time') } { sanctionInfo.sanctionCreationTime }
+
{ LocalizeText('generic.reason') } { sanctionInfo.sanctionReason }
+
{ LocalizeText('help.sanction.probation.days.left') } { Math.trunc((sanctionInfo.probationHoursLeft / 24)) + 1 }
} { ((sanctionInfo.hasCustomMute) && (!(sanctionInfo.isSanctionActive))) && -
{ LocalizeText('help.sanction.custom.mute') }
+
{ LocalizeText('help.sanction.custom.mute') }
} { (sanctionInfo.tradeLockExpiryTime && sanctionInfo.tradeLockExpiryTime.length > 0) && -
{ LocalizeText('trade.locked.until') } { sanctionInfo.tradeLockExpiryTime }
+
{ LocalizeText('trade.locked.until') } { sanctionInfo.tradeLockExpiryTime }
} -
{ sanctionLocalization('next', sanctionInfo.nextSanctionName, sanctionInfo.nextSanctionLengthHours) }
- - - + { (sanctionInfo.sanctionReason !== 'cfh.reason.EMPTY') && +
{ sanctionLocalization('next', sanctionInfo.nextSanctionName, sanctionInfo.nextSanctionLengthHours) }
+ } +
+
+ + +
+
); diff --git a/src/css/help/HelpView.css b/src/css/help/HelpView.css new file mode 100644 index 0000000..e05897e --- /dev/null +++ b/src/css/help/HelpView.css @@ -0,0 +1,83 @@ +/* Aiuto (Help) + Sanctions windows — custom hotel restyle. + Global (not an inline