[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:
CHOMPStation2
2023-09-10 09:45:35 +02:00
committed by GitHub
co-authored by Heroman3003 Raeschen
parent a2078f7060
commit 455e462ead
3 changed files with 43 additions and 3 deletions
+21 -1
View File
@@ -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}
+21 -1
View File
@@ -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