This commit is contained in:
Bill 2022-02-23 00:37:30 -05:00
commit 91c8ac6bd9

View File

@ -65,12 +65,13 @@ export const NavigatorRoomCreatorView: FC<{}> = props =>
return ( return (
<Column overflow="hidden"> <Column overflow="hidden">
<Grid fullHeight={ false }> <Grid>
<Column size={ 6 } gap={ 1 }> <Column size={ 6 }>
<Column gap={ 1 }>
<Text>{ LocalizeText('navigator.createroom.roomnameinfo') }</Text> <Text>{ LocalizeText('navigator.createroom.roomnameinfo') }</Text>
<input type="text" className="form-control form-control-sm" onChange={ event => setName(event.target.value) } /> <input type="text" className="form-control form-control-sm" onChange={ event => setName(event.target.value) } />
</Column> </Column>
<Column size={ 6 } gap={ 1 }> <Column gap={ 1 }>
<Text>{ LocalizeText('navigator.category') }</Text> <Text>{ LocalizeText('navigator.category') }</Text>
<select className="form-select form-select-sm" onChange={ event => setCategory(Number(event.target.value)) }> <select className="form-select form-select-sm" onChange={ event => setCategory(Number(event.target.value)) }>
{ categories && categories.map(category => { categories && categories.map(category =>
@ -79,7 +80,7 @@ export const NavigatorRoomCreatorView: FC<{}> = props =>
}) } }) }
</select> </select>
</Column> </Column>
<Column size={ 6 } gap={ 1 }> <Column gap={ 1 }>
<Text>{ LocalizeText('navigator.maxvisitors') }</Text> <Text>{ LocalizeText('navigator.maxvisitors') }</Text>
<select className="form-select form-select-sm" onChange={ event => setVisitorsCount(Number(event.target.value)) }> <select className="form-select form-select-sm" onChange={ event => setVisitorsCount(Number(event.target.value)) }>
{ maxVisitorsList && maxVisitorsList.map(value => { maxVisitorsList && maxVisitorsList.map(value =>
@ -88,7 +89,7 @@ export const NavigatorRoomCreatorView: FC<{}> = props =>
}) } }) }
</select> </select>
</Column> </Column>
<Column size={ 6 } gap={ 1 }> <Column gap={ 1 }>
<Text>{ LocalizeText('navigator.tradesettings') }</Text> <Text>{ LocalizeText('navigator.tradesettings') }</Text>
<select className="form-select form-select-sm" onChange={ event => setTradesSetting(Number(event.target.value)) }> <select className="form-select form-select-sm" onChange={ event => setTradesSetting(Number(event.target.value)) }>
<option value="0">{ LocalizeText('navigator.roomsettings.trade_not_allowed') }</option> <option value="0">{ LocalizeText('navigator.roomsettings.trade_not_allowed') }</option>
@ -96,12 +97,12 @@ export const NavigatorRoomCreatorView: FC<{}> = props =>
<option value="2">{ LocalizeText('navigator.roomsettings.trade_allowed') }</option> <option value="2">{ LocalizeText('navigator.roomsettings.trade_allowed') }</option>
</select> </select>
</Column> </Column>
</Grid>
<Column gap={ 1 }> <Column gap={ 1 }>
<Text>{ LocalizeText('navigator.createroom.roomdescinfo') }</Text> <Text>{ LocalizeText('navigator.createroom.roomdescinfo') }</Text>
<input type="text" className="form-control form-control-sm" onChange={ event => setDescription(event.target.value) } /> <input type="text" className="form-control form-control-sm" onChange={ event => setDescription(event.target.value) } />
</Column> </Column>
<Flex overflow="auto" gap={ 1 }> </Column>
<Column size={ 6 } gap={ 1 } overflow="auto">
{ {
RoomModels.map(model => RoomModels.map(model =>
{ {
@ -114,8 +115,11 @@ export const NavigatorRoomCreatorView: FC<{}> = props =>
</LayoutGridItem>); </LayoutGridItem>);
}) })
} }
</Flex> </Column>
<Column size={ 12 }>
<Button variant="success" onClick={ createRoom } disabled={ (!name || (name.length < 3)) }>{ LocalizeText('navigator.createroom.create') }</Button> <Button variant="success" onClick={ createRoom } disabled={ (!name || (name.length < 3)) }>{ LocalizeText('navigator.createroom.create') }</Button>
</Column> </Column>
</Grid>
</Column>
); );
} }