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:
parent
8f3fd23e4f
commit
a65f89149f
4 changed files with 6 additions and 6 deletions
|
@ -277,7 +277,7 @@ function TimerDialog({
|
|||
<FlexRow align="left" spacing={1}>
|
||||
<InputBox
|
||||
id="timer-activity"
|
||||
value={minActivity}
|
||||
defaultValue={minActivity}
|
||||
type="number"
|
||||
css={{
|
||||
width: '5rem',
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue