Fix number inputs (#29905)

* Fix NumberInputs

* Build /tg/ui (#38)

Co-authored-by: /tg/ui Builder <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Arthri <41360489+a@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Arthri
2025-07-29 02:53:26 +08:00
committed by GitHub
parent 71bdc1a1d2
commit f9016e65ff
17 changed files with 26 additions and 19 deletions
+2 -1
View File
@@ -38,7 +38,7 @@ export const AtmosMixer = (props) => {
minValue={0}
maxValue={max_pressure}
value={pressure}
onDrag={(value) =>
onChange={(value) =>
act('custom_pressure', {
pressure: value,
})
@@ -84,6 +84,7 @@ const NodeControls = (props) => {
unit="%"
width={6.1}
lineHeight={1.5}
step={1}
stepPixelSize={10}
minValue={0}
maxValue={100}
+1 -1
View File
@@ -38,7 +38,7 @@ export const AtmosPump = (props) => {
minValue={0}
maxValue={max_rate}
value={rate}
onDrag={(value) =>
onChange={(value) =>
act('custom_rate', {
rate: value,
})
@@ -65,7 +65,7 @@ export const AtmosTankControl = (props) => {
minValue={0}
maxValue={50}
value={inlet.rate}
onDrag={(value) =>
onChange={(value) =>
act('set_inlet_volume_rate', {
dev: inlet.uid,
val: value,
@@ -114,7 +114,7 @@ export const AtmosTankControl = (props) => {
minValue={0}
maxValue={5066}
value={outlet.rate}
onDrag={(value) =>
onChange={(value) =>
act('set_outlet_pressure', {
dev: outlet.uid,
val: value,
@@ -171,6 +171,7 @@ const Products = (props) => {
width="32px"
minValue={1}
maxValue={10}
step={1}
stepPixelSize={7}
onChange={(value) => setVendAmount(value)}
/>
@@ -123,9 +123,9 @@ export const BluespaceTap = (props) => {
<Stack.Item mx={1}>
<NumberInput
disabled={emagged}
minvalue={0}
minValue={0}
value={desiredMiningPower}
maxvalue={Infinity}
maxValue={Infinity}
step={1}
onChange={(value) =>
act('set', {
+1 -1
View File
@@ -54,7 +54,7 @@ const ChemHeaterSettings = (_properties) => {
value={round(targetTemp, 0)}
minValue={0}
maxValue={1000}
onDrag={(value) =>
onChange={(value) =>
act('adjust_temperature', {
target: value,
})
@@ -208,7 +208,7 @@ const TextSetter = ({
step={1}
minValue={min}
maxValue={max}
onDrag={callback}
onChange={callback}
unit={unit}
/>
);
@@ -109,6 +109,7 @@ export const CompostBin = (props) => {
width="32px"
minValue={1}
maxValue={10}
step={1}
stepPixelSize={7}
onChange={(value) => setVendAmount(value)}
/>
@@ -33,7 +33,7 @@ export const HealthSensor = (props) => {
value={alarm_health}
format={(value) => toFixed(value, 1)}
width="80px"
onDrag={(value) =>
onChange={(value) =>
act('alarm_health', {
alarm_health: value,
})
@@ -178,6 +178,7 @@ const SheetLine = (properties) => {
value={0}
minValue={0}
maxValue={Math.min(ore.amount, 50)}
step={1}
stepPixelSize={6}
onChange={(value) =>
act(ore.value ? 'sheet' : 'alloy', {
@@ -227,6 +228,7 @@ const AlloyLine = (properties) => {
minValue={0}
maxValue={Math.min(ore.amount, 50)}
stepPixelSize={6}
step={1}
onChange={(value) =>
act(ore.value ? 'sheet' : 'alloy', {
'id': ore.id,
+1 -1
View File
@@ -68,7 +68,7 @@ export const Pacman = (props) => {
maxValue={output_max * (emagged ? 2.5 : 1)}
step={1}
className="mt-1"
onDrag={(value) =>
onChange={(value) =>
act('change_power', {
change_power: value,
})
@@ -82,7 +82,7 @@ export const SolarControl = (props) => {
minValue={0}
maxValue={359}
value={cdir}
onDrag={(cdir) => act('cdir', { cdir })}
onChange={(cdir) => act('cdir', { cdir })}
/>
)}
{tracking_state === TRACKER_AUTO && <Box lineHeight="19px"> Automated </Box>}
@@ -121,7 +121,7 @@ export const SolarControl = (props) => {
const sign = Math.sign(tracking_rate) > 0 ? '+' : '-';
return sign + Math.abs(tracking_rate);
}}
onDrag={(tdir) => act('tdir', { tdir })}
onChange={(tdir) => act('tdir', { tdir })}
/>
)}
{tracking_state === TRACKER_OFF && <Box lineHeight="19px"> Tracker offline </Box>}
@@ -51,8 +51,10 @@ export const TelescienceConsole = (properties) => {
maxValue={360}
disabled={working}
value={current_bearing}
onDrag={(value) => setDummyRot(value)}
onChange={(value) => act('setbear', { bear: value })}
onChange={(value) => {
setDummyRot(value);
act('setbear', { bear: value });
}}
/>
<Icon ml={1} size={1} name="arrow-up" rotation={dummyRot} />
</Box>
+1 -1
View File
@@ -24,7 +24,7 @@ export const TempGun = (props) => {
value={target_temperature}
format={(value) => toFixed(value, 2)}
width="50px"
onDrag={(value) =>
onChange={(value) =>
act('target_temperature', {
target_temperature: value,
})
@@ -63,7 +63,7 @@ export const ThermoMachine = (props) => {
maxValue={Math.round(data.max)}
step={5}
stepPixelSize={3}
onDrag={(value) =>
onChange={(value) =>
act('target', {
target: value,
})
@@ -19,7 +19,7 @@ export const Signaler = (props) => {
value={frequency / 10}
format={(value) => toFixed(value, 1)}
width="80px"
onDrag={(value) =>
onChange={(value) =>
act('freq', {
freq: value,
})
@@ -35,7 +35,7 @@ export const Signaler = (props) => {
maxValue={100}
value={code}
width="80px"
onDrag={(value) =>
onChange={(value) =>
act('code', {
code: value,
})
File diff suppressed because one or more lines are too long