1
0
Fork 0
mirror of https://git.sr.ht/~ashkeel/strimertul synced 2024-09-18 01:50:50 +00:00

fix: mostly sane number input boxes

This commit is contained in:
Ash Keel 2023-04-23 13:35:01 +02:00
parent 8f3fd23e4f
commit a65f89149f
No known key found for this signature in database
GPG key ID: BAD8D93E7314ED3E
4 changed files with 6 additions and 6 deletions

View file

@ -277,7 +277,7 @@ function TimerDialog({
<FlexRow align="left" spacing={1}>
<InputBox
id="timer-activity"
value={minActivity}
defaultValue={minActivity}
type="number"
css={{
width: '5rem',

View file

@ -104,7 +104,7 @@ export default function LoyaltySettingsPage(): React.ReactElement {
id="reward"
placeholder={'0'}
css={{ maxWidth: '5rem' }}
value={config?.points?.amount ?? '0'}
defaultValue={config?.points?.amount}
disabled={!active || busy}
required={true}
onChange={(e) => {
@ -153,7 +153,7 @@ export default function LoyaltySettingsPage(): React.ReactElement {
type="number"
id="bonus"
placeholder={'0'}
value={config?.points?.activity_bonus ?? '0'}
defaultValue={config?.points?.activity_bonus}
disabled={!active || busy}
required={true}
onChange={(e) => {

View file

@ -454,7 +454,7 @@ function RewardsPage() {
id="reward-cost"
type="number"
required
value={dialogReward?.reward?.price ?? '0'}
defaultValue={dialogReward?.reward?.price}
onChange={(e) => {
setDialogReward({
...dialogReward,
@ -780,7 +780,7 @@ function GoalsPage() {
id="goal-cost"
type="number"
required
value={dialogGoal?.goal?.total ?? '0'}
defaultValue={dialogGoal?.goal?.total}
onChange={(e) => {
setDialogGoal({
...dialogGoal,

View file

@ -181,7 +181,7 @@ function TwitchBotSettings() {
id="bot-chat-history"
required={active}
disabled={disabled}
value={botConfig?.chat_history ?? ''}
defaultValue={botConfig?.chat_history}
onChange={(ev) =>
dispatch(
apiReducer.actions.twitchBotConfigChanged({