wider velocity threshold input, shows Auto when zero
This commit is contained in:
@@ -73,6 +73,7 @@ export default function NumberInput({
|
||||
max = 999,
|
||||
step = 1,
|
||||
style,
|
||||
placeholder,
|
||||
'aria-label': ariaLabel,
|
||||
}: {
|
||||
value: number
|
||||
@@ -81,6 +82,7 @@ export default function NumberInput({
|
||||
max?: number
|
||||
step?: number
|
||||
style?: React.CSSProperties
|
||||
placeholder?: string
|
||||
'aria-label'?: string
|
||||
}) {
|
||||
const valueRef = useRef(value)
|
||||
@@ -113,16 +115,18 @@ export default function NumberInput({
|
||||
<input
|
||||
type="text"
|
||||
inputMode="numeric"
|
||||
value={value}
|
||||
value={value === 0 && placeholder ? '' : value}
|
||||
placeholder={placeholder}
|
||||
aria-label={ariaLabel}
|
||||
onChange={(e) => {
|
||||
if (e.target.value === '') { onChange(0); return }
|
||||
const n = parseInt(e.target.value)
|
||||
if (!isNaN(n)) onChange(clamp(n))
|
||||
}}
|
||||
style={{
|
||||
flex: 1,
|
||||
minWidth: 0,
|
||||
padding: '8px 4px',
|
||||
padding: '8px 8px',
|
||||
background: 'transparent',
|
||||
border: 'none',
|
||||
outline: 'none',
|
||||
|
||||
@@ -727,7 +727,7 @@ function BoardSecurityCard({ board, selected, onToggleSelect }: { board: BoardSu
|
||||
aria-label="Sensitivity level"
|
||||
/>
|
||||
</div>
|
||||
<div style={{ width: 100 }}>
|
||||
<div style={{ minWidth: 140 }}>
|
||||
<label style={{ display: 'block', color: 'var(--text-tertiary)', fontSize: 'var(--text-xs)', marginBottom: 4 }}>
|
||||
Velocity threshold
|
||||
</label>
|
||||
@@ -737,6 +737,7 @@ function BoardSecurityCard({ board, selected, onToggleSelect }: { board: BoardSu
|
||||
min={0}
|
||||
max={1000}
|
||||
step={5}
|
||||
placeholder="Auto"
|
||||
/>
|
||||
</div>
|
||||
<label
|
||||
|
||||
Reference in New Issue
Block a user