Skip to content

Commit

Permalink
ThermoMachine
Browse files Browse the repository at this point in the history
  • Loading branch information
AyIong committed Jan 17, 2024
1 parent 600a744 commit 20b7d47
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 118 deletions.
1 change: 1 addition & 0 deletions tgui/packages/tgui-panel/Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const Panel = (props, context) => {
</Stack.Item>
<Stack.Item>
<Button
color="grey"
selected={audio.visible}
icon="music"
tooltip="Music player"
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/TEG.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const TEG = (props, context) => {
);
}
return (
<Window>
<Window width={500} height={400}>
<Window.Content>
<Section title={'Cold Loop (' + data.cold_dir + ')'}>
<LabeledList>
Expand Down
38 changes: 19 additions & 19 deletions tgui/packages/tgui/interfaces/ThermoMachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Window } from '../layouts';
export const ThermoMachine = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window width={300} height={255}>
<Window width={300} height={225}>
<Window.Content>
<Section title="Status">
<LabeledList>
Expand Down Expand Up @@ -44,20 +44,32 @@ export const ThermoMachine = (props, context) => {
}
>
<LabeledList>
<LabeledList.Item label="Setting">
<LabeledList.Item label="Setting" textAlign="center">
<Button
fluid
icon={data.cooling ? 'temperature-low' : 'temperature-high'}
content={data.cooling ? 'Cooling' : 'Heating'}
selected={data.cooling}
onClick={() => act('cooling')}
/>
</LabeledList.Item>
<LabeledList.Item label="Target Temperature">
<Button
icon="fast-backward"
disabled={data.target === data.min}
title="Minimum temperature"
onClick={() =>
act('target', {
target: data.min,
})
}
/>
<NumberInput
animated
value={Math.round(data.target)}
unit="K"
width="62px"
width={5.4}
lineHeight={1.4}
minValue={Math.round(data.min)}
maxValue={Math.round(data.max)}
step={5}
Expand All @@ -68,15 +80,13 @@ export const ThermoMachine = (props, context) => {
})
}
/>
</LabeledList.Item>
<LabeledList.Item label="Presets">
<Button
icon="fast-backward"
disabled={data.target === data.min}
title="Minimum temperature"
icon="fast-forward"
disabled={data.target === data.max}
title="Maximum Temperature"
onClick={() =>
act('target', {
target: data.min,
target: data.max,
})
}
/>
Expand All @@ -90,16 +100,6 @@ export const ThermoMachine = (props, context) => {
})
}
/>
<Button
icon="fast-forward"
disabled={data.target === data.max}
title="Maximum Temperature"
onClick={() =>
act('target', {
target: data.max,
})
}
/>
</LabeledList.Item>
</LabeledList>
</Section>
Expand Down
1 change: 0 additions & 1 deletion tgui/packages/tgui/interfaces/Vending.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const VendingRow = (props, context) => {
<img
src={`data:image/jpeg;base64,${productImage}`}
style={{
'background-color': 'red',
'vertical-align': 'middle',
width: '32px',
margin: '0px',
Expand Down
192 changes: 96 additions & 96 deletions tgui/public/tgui-panel.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tgui/public/tgui.bundle.js

Large diffs are not rendered by default.

0 comments on commit 20b7d47

Please sign in to comment.