diff --git a/tgui/packages/tgui-bench/package.json b/tgui/packages/tgui-bench/package.json index 6a42b87af9f..9a99745a5cb 100644 --- a/tgui/packages/tgui-bench/package.json +++ b/tgui/packages/tgui-bench/package.json @@ -12,6 +12,6 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "tgui": "workspace:*", - "tgui-core": "^1.7.2" + "tgui-core": "^1.7.4" } } diff --git a/tgui/packages/tgui-panel/package.json b/tgui/packages/tgui-panel/package.json index 4b521d06185..4f031304586 100644 --- a/tgui/packages/tgui-panel/package.json +++ b/tgui/packages/tgui-panel/package.json @@ -10,7 +10,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "tgui": "workspace:*", - "tgui-core": "^1.7.2", + "tgui-core": "^1.7.4", "tgui-dev-server": "workspace:*", "tgui-polyfill": "workspace:*" } diff --git a/tgui/packages/tgui-say/package.json b/tgui/packages/tgui-say/package.json index b535dbccad6..6d3fb9f7bf9 100644 --- a/tgui/packages/tgui-say/package.json +++ b/tgui/packages/tgui-say/package.json @@ -9,7 +9,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "tgui": "workspace:*", - "tgui-core": "^1.7.2", + "tgui-core": "^1.7.4", "tgui-polyfill": "workspace:*" } } diff --git a/tgui/packages/tgui/interfaces/SmartVend.tsx b/tgui/packages/tgui/interfaces/SmartVend.tsx index 01be12bbf2e..0937095a9d1 100644 --- a/tgui/packages/tgui/interfaces/SmartVend.tsx +++ b/tgui/packages/tgui/interfaces/SmartVend.tsx @@ -1,8 +1,7 @@ import { useState } from 'react'; -import { DmIcon, Icon } from 'tgui-core/components'; import { - Box, Button, + ImageButton, Input, NoticeBox, NumberInput, @@ -48,44 +47,57 @@ export const SmartVend = (props) => { ? Object.values(data.contents).filter(search) : Object.values(data.contents); return ( - +
act('Dry')} - > - {data.drying ? 'Stop drying' : 'Dry'} - - ) : ( - <> - setSearchText(value)} - /> + <> + {data.isdryer ? ( + ) : ( + <> + setSearchText(value)} + /> + - - {item.name} - - + 1 && ( + { + act('Release', { + path: item.path, + amount: value, + }); + }} + /> + ) + } + buttonsAlt={ + + + + x{item.amount} + + + } + onClick={() => + act('Release', { + path: item.path, + amount: 1, + }) + } + onRightClick={() => + act('Release', { + path: item.path, + amount: item.amount, + }) + } + > + {item.name} + ) as any; }; const ItemList = ({ item }) => { const { act } = useBackend(); - const fallback = ( - - ); - const [itemCount, setItemCount] = useState(1); + const disabled = item.amount <= 1; return ( - - - - - - {item.name} - - - - - {item.amount > 1 && ( - - {`x${item.amount}`} + + } + onClick={() => + act('Release', { + path: item.path, + amount: 1, + }) + } + onRightClick={() => + act('Release', { + path: item.path, + amount: item.amount, + }) + } + > + + {item.name} + + x{item.amount} - )} - - - setItemCount(value)} - /> - - + + ) as any; }; diff --git a/tgui/packages/tgui/package.json b/tgui/packages/tgui/package.json index 3e9ef3c02cf..c8fa431eaa0 100644 --- a/tgui/packages/tgui/package.json +++ b/tgui/packages/tgui/package.json @@ -18,7 +18,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-popper": "^2.3.0", - "tgui-core": "^1.7.2", + "tgui-core": "^1.7.4", "tgui-dev-server": "workspace:*", "tgui-polyfill": "workspace:*" } diff --git a/tgui/yarn.lock b/tgui/yarn.lock index b080e0484a3..4f425cb8bd6 100644 --- a/tgui/yarn.lock +++ b/tgui/yarn.lock @@ -18723,17 +18723,17 @@ __metadata: react: "npm:^18.3.1" react-dom: "npm:^18.3.1" tgui: "workspace:*" - tgui-core: "npm:^1.7.2" + tgui-core: "npm:^1.7.4" languageName: unknown linkType: soft -"tgui-core@npm:^1.7.2": - version: 1.7.2 - resolution: "tgui-core@npm:1.7.2" +"tgui-core@npm:^1.7.4": + version: 1.7.4 + resolution: "tgui-core@npm:1.7.4" peerDependencies: react: ^18.2.0 react-dom: ^18.2.0 - checksum: 10c0/401102042d4d0ede4f8658160124cd523c4ffc44492e0f7d0500d25e0b8a085be2b6f829c89b81eb706c369af16d6d57375704337d7bcc813480caa749c258d4 + checksum: 10c0/06b9d8702d6ae170383b28725bf6308cd320499367ea8ea1f9dd5039ab371cfe34419a7d3d1e0e2b86884326e8d4ab116e5601208d2f85d215b7c464fd32fdbf languageName: node linkType: hard @@ -18761,7 +18761,7 @@ __metadata: react: "npm:^18.3.1" react-dom: "npm:^18.3.1" tgui: "workspace:*" - tgui-core: "npm:^1.7.2" + tgui-core: "npm:^1.7.4" tgui-dev-server: "workspace:*" tgui-polyfill: "workspace:*" languageName: unknown @@ -18788,7 +18788,7 @@ __metadata: react: "npm:^18.3.1" react-dom: "npm:^18.3.1" tgui: "workspace:*" - tgui-core: "npm:^1.7.2" + tgui-core: "npm:^1.7.4" tgui-polyfill: "workspace:*" languageName: unknown linkType: soft @@ -18850,7 +18850,7 @@ __metadata: react: "npm:^18.3.1" react-dom: "npm:^18.3.1" react-popper: "npm:^2.3.0" - tgui-core: "npm:^1.7.2" + tgui-core: "npm:^1.7.4" tgui-dev-server: "workspace:*" tgui-polyfill: "workspace:*" languageName: unknown