Disable MinSuper if MinTip is set.

This commit is contained in:
infinite-persistence 2021-08-11 14:54:06 +08:00
parent 0ebb9420ef
commit 926de0959e
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -344,15 +344,25 @@ export default function SettingsCreatorPage(props: Props) {
label={
<I18nMessage tokens={{ lbc: <LbcSymbol /> }}>Minimum %lbc% tip amount for hyperchats</I18nMessage>
}
helper={__(
helper={
<>
{__(
'Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.'
)}
{minTipAmountComment !== 0 && (
<p className="help--inline">
<em>{__('(This settings is not applicable if all comments require a tip.)')}</em>
</p>
)}
</>
}
className="form-field--price-amount"
min={0}
step="any"
type="number"
placeholder="1"
value={minTipAmountSuperChat}
disabled={minTipAmountComment !== 0}
onChange={(e) => setSettings({ min_tip_amount_super_chat: parseFloat(e.target.value) })}
/>
</>