From 1c8def783743b9fb897c2ffc9129156bd64489c0 Mon Sep 17 00:00:00 2001
From: Aylong <69762909+AyIong@users.noreply.github.com>
Date: Sat, 18 Jan 2025 04:20:48 +0200
Subject: [PATCH] Another SmartFridge restyle (#89013)
## About The Pull Request
Another SmartFridge restyle aimed at improving the UI/UX.
Finally used the new component (ImageButton) as I originally wanted to,
but I kept failing.
If you need to get a certain amount of fruit, you don't have to type in
how much you need and then click on the fruit, just type it in and the
fruit will be dispensed immediately, example in the video below.
There are a total of 3 options to get what you need with SmartFridge:
1. Just click on the product, you will get 1 unit, nothing new.
2. Enter the required value, this was already there but it became a bit
more convenient because you don't have to click on the product after
entering it.
3. Press Right Mouse Button to get everything at once.
## Why It's Good For The Game
Better UI/UX (No offense to those who made the past variations, they
tried their best, but now there is a special component for such
purposes, which makes it very much easier)
## Demonstration
Comparison screenshots
| Old (Grid) | New (Grid) |
| - | - |
|

|

|
| Old (List) | New (List)
| - | - |
|

|

|
Video
https://github.com/user-attachments/assets/c8788707-5947-4f1e-8a3c-6a56ac983e98
## Changelog
:cl:
qol: SmartFridge got another redesign, and you can dispense all amount
of product in one click (RMB on product)
/:cl:
---
tgui/packages/tgui-bench/package.json | 2 +-
tgui/packages/tgui-panel/package.json | 2 +-
tgui/packages/tgui-say/package.json | 2 +-
tgui/packages/tgui/interfaces/SmartVend.tsx | 328 ++++++++------------
tgui/packages/tgui/package.json | 2 +-
tgui/yarn.lock | 16 +-
6 files changed, 149 insertions(+), 203 deletions(-)
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)}
+ />
+