-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Upstream 20.01.2025 (2) #1030
Conversation
## About The Pull Request Vending UI redesign, using ImageButton component. By default list layout is used, you can switch to grid if you want, unfortunately there is no setting yet ## Why It's Good For The Game You don't have to aim for the blue price button to buy/vend anything Plus, looks better and more cohesive, imho <details><summary> Comparison, everyone loves them though, right? </summary> | Before | After | Grid | | - | - | - | | ![image](https://github.com/user-attachments/assets/76742fe6-0500-453e-9c95-6766606c3f64) | ![image](https://github.com/user-attachments/assets/afe5d623-0953-4d94-a4aa-67bf82a0f9fb) | ![image](https://github.com/user-attachments/assets/8f2b7701-bda0-431a-9311-96c5221f8ebf) | </details> ## Changelog :cl: qol: Vending machines got new design with 2 layouts: List and Grid (List by default) /:cl:
## About The Pull Request On the 516, when hovering over the cropped text, the transposed text does not expand the background It's a small fix for that. | Before | After | | - | - | | ![image](https://github.com/user-attachments/assets/7fb94a56-5796-4652-92ba-a8ba6a0f9824) | ![image](https://github.com/user-attachments/assets/f7f17185-7d1d-4db7-8602-65c639faebb5) |
Reviewer's Guide by SourceryThis pull request merges the upstream master branch into the current branch. It includes a new vending machine layout with list and grid options. Class diagram for updated vending machine componentsclassDiagram
class Vending {
-width: number
-height: number
+render()
}
class UserDetails {
+render()
}
class ProductDisplay {
-stockSearch: string
-toggleLayout: boolean
+setToggleLayout()
+render()
}
class Product {
-colorable: boolean
-free: boolean
-discount: boolean
-remaining: number
+render()
}
class ProductGrid {
+render()
}
class ProductList {
+render()
}
Vending --> UserDetails
Vending --> ProductDisplay
ProductDisplay --> Product
Product --> ProductGrid
Product --> ProductList
note for Product "New component that handles both grid and list layouts"
note for ProductDisplay "Added layout toggle functionality"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. It seems to have been created by a bot (hey, ss220app[bot]!). We assume it knows what it's doing!
This PR causes following conflicts on translate branch: tgui/packages/tgui/interfaces/Vending.tsx++<<<<<<< HEAD
+ return (
+ <NoticeBox m={0} color={user && 'blue'}>
+ <Stack align="center">
+ <Stack.Item>
+ <Icon name="id-card" size={1.5} />
+ </Stack.Item>
+ <Stack.Item>
+ {user
+ ? `${user.name || 'Unknown'} | ${user.job}`
+ : 'No ID detected! Contact the Head of Personnel.'}
+ </Stack.Item>
+ </Stack>
+ </NoticeBox>
+ );
++||||||| aa82cd08971
++ if (!user) {
++ return (
++ <Section>
++ <NoticeBox>No ID detected! Contact the Head of Personnel.</NoticeBox>
++ </Section>
++ );
++ } else {
++ return (
++ <Section>
++ <Stack>
++ <Stack.Item>
++ <Icon name="id-card" size={3} mr={1} />
++ </Stack.Item>
++ <Stack.Item>
++ <LabeledList>
++ <LabeledList.Item label="User">{user.name}</LabeledList.Item>
++ <LabeledList.Item label="Occupation">
++ {user.job || 'Unemployed'}
++ </LabeledList.Item>
++ </LabeledList>
++ </Stack.Item>
++ </Stack>
++ </Section>
++ );
++ }
++=======
+ if (!user) {
+ return (
+ <Section>
+ <NoticeBox>
+ ID-карта не обнаружена! Обратитесь к главе персонала.
+ </NoticeBox>
+ </Section>
+ );
+ } else {
+ return (
+ <Section>
+ <Stack>
+ <Stack.Item>
+ <Icon name="id-card" size={3} mr={1} />
+ </Stack.Item>
+ <Stack.Item>
+ <LabeledList>
+ <LabeledList.Item label="Пользователь">
+ {user.name}
+ </LabeledList.Item>
+ <LabeledList.Item label="Должность">
+ {JOBS_RU[user.job] || user.job || 'Без работы'}
+ </LabeledList.Item>
+ </LabeledList>
+ </Stack.Item>
+ </Stack>
+ </Section>
+ );
+ }
++>>>>>>> origin/translate
++<<<<<<< HEAD
++||||||| aa82cd08971
++/** Displays a colored indicator for remaining stock */
++const ProductStock = (props) => {
++ const { custom, product, remaining } = props;
++
++ return (
++ <Box
++ color={
++ (remaining <= 0 && 'bad') ||
++ (!custom && remaining <= product.max_amount / 2 && 'average') ||
++ 'good'
++ }
++ >
++ {remaining} left
++ </Box>
++ );
++};
++
++=======
+ /** Displays a colored indicator for remaining stock */
+ const ProductStock = (props) => {
+ const { custom, product, remaining } = props;
+
+ return (
+ <Box
+ color={
+ (remaining <= 0 && 'bad') ||
+ (!custom && remaining <= product.max_amount / 2 && 'average') ||
+ 'good'
+ }
+ >
+ {remaining} ост.
+ </Box>
+ );
+ };
+
++>>>>>>> origin/translate
++<<<<<<< HEAD
+ standardPrice = 'Free';
++||||||| aa82cd08971
++ standardPrice = 'FREE';
++=======
+ standardPrice = 'БЕСПЛАТНО';
++>>>>>>> origin/translate
|
This pull request merges upstream/master. Resolve possible conflicts manually and make sure all the changes are applied correctly.
Changelog
🆑 tgstation
qol: Торговым автоматам добавлен новый дизайн с двумя вариантами расположения: Список и Сетка (по умолчанию используется Список).
/:cl:
Summary by Sourcery
New Features: