mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +01:00
[MIRROR] More Smartvendor Buttons (#6937)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
co-authored by
Heroman3003
Raeschen
parent
a2078f7060
commit
455e462ead
@@ -6,7 +6,7 @@ import { Window } from '../layouts';
|
||||
export const SmartVend = (props, context) => {
|
||||
const { act, config, data } = useBackend(context);
|
||||
return (
|
||||
<Window width={440} height={550} resizable>
|
||||
<Window width={500} height={550} resizable>
|
||||
<Window.Content scrollable>
|
||||
<Section title="Storage">
|
||||
{(data.secure && (
|
||||
@@ -62,6 +62,26 @@ export const SmartVend = (props, context) => {
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
content="25"
|
||||
disabled={value.amount < 25}
|
||||
onClick={() =>
|
||||
act('Release', {
|
||||
index: value.index,
|
||||
amount: 25,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
content="50"
|
||||
disabled={value.amount < 50}
|
||||
onClick={() =>
|
||||
act('Release', {
|
||||
index: value.index,
|
||||
amount: 50,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
content="Custom"
|
||||
disabled={value.amount < 1}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Window } from '../layouts';
|
||||
export const SmartVend = (props, context) => {
|
||||
const { act, config, data } = useBackend(context);
|
||||
return (
|
||||
<Window width={440} height={550} resizable>
|
||||
<Window width={500} height={550} resizable>
|
||||
<Window.Content scrollable>
|
||||
<Section title="Storage">
|
||||
{(data.secure && (
|
||||
@@ -62,6 +62,26 @@ export const SmartVend = (props, context) => {
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
content="25"
|
||||
disabled={value.amount < 25}
|
||||
onClick={() =>
|
||||
act('Release', {
|
||||
index: value.index,
|
||||
amount: 25,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
content="50"
|
||||
disabled={value.amount < 50}
|
||||
onClick={() =>
|
||||
act('Release', {
|
||||
index: value.index,
|
||||
amount: 50,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
content="Custom"
|
||||
disabled={value.amount < 1}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user