@@ -2,7 +2,7 @@ import { storage } from 'common/storage';
22import { capitalize } from 'common/string' ;
33import { Fragment } from 'inferno' ;
44import { useBackend , useLocalState } from '../backend' ;
5- import { Button , Section , Table , Tabs , Box , TextArea , Stack , Tooltip , Flex } from '../components' ;
5+ import { Button , Section , Table , Tabs , Box , TextArea , Stack , Tooltip , Flex , ProgressBar } from '../components' ;
66import { Window } from '../layouts' ;
77import { resolveAsset } from './../assets' ;
88
@@ -15,7 +15,7 @@ type Tab = {
1515 food : FoodStats [ ] ;
1616 mainDrinks : MainDrinkStats [ ] ;
1717 mixerDrinks : MixerDrinkStats [ ] ;
18- storage : StorageStats [ ] ;
18+ storage : StorageStats ;
1919}
2020
2121// Stats for food item
@@ -370,10 +370,11 @@ const MainDrinkRow = (props, context) => {
370370 { /* Get name */ }
371371 { capitalize ( reagent . drink_name ) }
372372 </ Table . Cell >
373- < Table . Cell
374- textAlign = "left" >
375- { /* Get amount of reagent in storage */ }
376- { reagent . drink_quantity } u
373+ < Table . Cell >
374+ < ProgressBar
375+ value = { reagent . drink_quantity / 200 } >
376+ { reagent . drink_quantity } u
377+ </ ProgressBar >
377378 </ Table . Cell >
378379 < Table . Cell
379380 // Limit width for
@@ -517,33 +518,35 @@ const MixerDrinkRow1 = (props, context) => {
517518 if ( mixerDrinks . length > 0 ) {
518519 return (
519520 // Create Table for horizontal format
520- < Flex
521- direction = "column" >
522- { /* Use map to create dynamic rows based on the contents of drinks, with drink being the individual item and its stats */ }
521+ < Stack
522+ direction = "column"
523+ justify = "space-around"
524+ fontSize = "14px" >
525+ { /* Use map to create dynamic rows based on the contents of drinks, with drink being the individual item and its stats */ }
523526 { mixerDrinks . map ( reagent => (
524527 // Start row for holding ui elements and given data
525528 < Stack
526- key = { reagent . drink_name }
527- justify = "space-around"
528- fontSize = "14px" >
529+ key = { reagent . drink_name }
530+ direction = "row"
531+ justify = "space-around"
532+ fill >
529533 < Stack . Item
530- textAlign = "left"
531- bold >
534+ bold
535+ align = "right" >
532536 { /* Get name */ }
533- { capitalize ( reagent . drink_name ) }
537+ { capitalize ( reagent . drink_name ) }
534538 </ Stack . Item >
535539 < Stack . Item >
536540 { /* Get amount of reagent in storage */ }
537541 { reagent . drink_quantity } u
538542 </ Stack . Item >
539- < Stack . Item >
543+ < Stack . Item
544+ justify = "left" >
540545 { /* Make dispense button */ }
541546 < Button
542547 fluid
543548 content = "Transfer Back"
544- textAlign = "center"
545549 fontSize = "16px"
546- width = "175px"
547550 // Disable if there is none of the reagent in storage
548551 disabled = { (
549552 reagent . drink_quantity === 0
@@ -555,19 +558,16 @@ const MixerDrinkRow1 = (props, context) => {
555558 </ Stack . Item >
556559 </ Stack >
557560 ) ) }
558- < Table . Row
559- justify = "center" >
560- < Table . Cell >
561- < Button
562- fluid
563- content = "Pour glass"
564- textAlign = "center"
565- fontSize = "16px"
566- onClick = { ( ) => act ( "pour" ) }
567- />
568- </ Table . Cell >
569- </ Table . Row >
570- </ Flex >
561+ < Stack . Item >
562+ < Button
563+ fluid
564+ content = "Pour glass"
565+ textAlign = "center"
566+ fontSize = "16px"
567+ onClick = { ( ) => act ( "pour" ) }
568+ />
569+ </ Stack . Item >
570+ </ Stack >
571571 ) ;
572572 } else {
573573 return (
0 commit comments