mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
🆙 Move CSS into componets as we use Tailwind
This commit is contained in:
@@ -74,9 +74,9 @@ export const ChatHistoryView: FC<{}> = props => {
|
||||
if (!isVisible) return null;
|
||||
|
||||
return (
|
||||
<NitroCardView className="nitro-chat-history" theme="primary-slim" uniqueKey="chat-history">
|
||||
<NitroCardView className="w-[400px] h-[400px] bg-[#f0f0f0]" theme="primary-slim" uniqueKey="chat-history">
|
||||
<NitroCardHeaderView headerText={LocalizeText('room.chathistory.button.text')} onCloseClick={event => setIsVisible(false)} />
|
||||
<NitroCardContentView className="nitro-card-content" gap={2} overflow="hidden" style={{ height: 'calc(100% - 40px)', display: 'flex', flexDirection: 'column' }}>
|
||||
<NitroCardContentView className="h-full bg-[#f0f0f0] bg-[url('@/assets/images/chat/chathistory_background.png')] bg-repeat bg-auto" gap={2} overflow="hidden" style={{ height: 'calc(100% - 40px)', display: 'flex', flexDirection: 'column' }}>
|
||||
<NitroInput placeholder={LocalizeText('generic.search')} type="text" value={searchText} onChange={event => setSearchText(event.target.value)} />
|
||||
<div ref={elementRef} style={{ flex: 1, overflowY: 'auto', background: 'inherit' }}>
|
||||
{filteredChatHistory.map((row, index) => (
|
||||
|
||||
@@ -142,7 +142,7 @@ export const FloorplanEditorView: FC<{}> = props =>
|
||||
return (
|
||||
<FloorplanEditorContextProvider value={ { originalFloorplanSettings: originalFloorplanSettings, setOriginalFloorplanSettings: setOriginalFloorplanSettings, visualizationSettings: visualizationSettings, setVisualizationSettings: setVisualizationSettings } }>
|
||||
{ isVisible &&
|
||||
<NitroCardView uniqueKey="floorpan-editor" className="nitro-floorplan-editor" theme="primary-slim">
|
||||
<NitroCardView uniqueKey="floorpan-editor" className="w-[760px] h-[500px]" theme="primary-slim">
|
||||
<NitroCardHeaderView headerText={ LocalizeText('floor.plan.editor.title') } onCloseClick={ () => setIsVisible(false) } />
|
||||
<NitroCardContentView overflow="hidden">
|
||||
<FloorplanOptionsView onCanvasScroll={ direction => canvasScrollHandler && canvasScrollHandler(direction) } />
|
||||
|
||||
@@ -37,7 +37,7 @@ export const FloorplanImportExportView: FC<FloorplanImportExportViewProps> = pro
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<NitroCardView theme="primary-slim" className="floorplan-import-export">
|
||||
<NitroCardView theme="primary-slim" className="w-[630px] h-[475px]">
|
||||
<NitroCardHeaderView headerText={ LocalizeText('floor.plan.editor.import.export') } onCloseClick={ onCloseClick } />
|
||||
<NitroCardContentView>
|
||||
<textarea className="h-100" value={ map } onChange={ event => setMap(event.target.value) } />
|
||||
|
||||
@@ -171,7 +171,7 @@ export const FloorplanOptionsView: FC<FloorplanOptionsViewProps> = props =>
|
||||
<Text bold>{ LocalizeText('floor.editor.wall.height') }</Text>
|
||||
<Flex alignItems="center" gap={ 1 }>
|
||||
<FaCaretLeft className="cursor-pointer fa-icon" onClick={ decreaseWallHeight } />
|
||||
<input type="number" className="form-control form-control-sm quantity-input" value={ visualizationSettings.wallHeight } onChange={ event => onWallHeightChange(event.target.valueAsNumber) } />
|
||||
<input type="number" className="form-control form-control-sm w-[49px]" value={ visualizationSettings.wallHeight } onChange={ event => onWallHeightChange(event.target.valueAsNumber) } />
|
||||
<FaCaretRight className="cursor-pointer fa-icon" onClick={ increaseWallHeight } />
|
||||
</Flex>
|
||||
</Column>
|
||||
|
||||
@@ -127,7 +127,7 @@ export const InventoryView: FC<{}> = props =>
|
||||
|
||||
return (
|
||||
<>
|
||||
<NitroCardView className="nitro-inventory" uniqueKey="inventory">
|
||||
<NitroCardView className="w-[528px] h-[420px] min-w-[528px] min-h-[420px]" uniqueKey="inventory">
|
||||
<NitroCardHeaderView
|
||||
headerText={ LocalizeText('inventory.title') }
|
||||
onCloseClick={ onClose } />
|
||||
|
||||
@@ -14,7 +14,7 @@ export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = p
|
||||
return (
|
||||
<Grid { ...rest }>
|
||||
<Column center overflow="hidden" size={ 5 }>
|
||||
<div className="empty-image" />
|
||||
<div className="w-[129px] h-[181px] bg-[url('@/assets/images/inventory/empty.png')] bg-no-repeat" />
|
||||
</Column>
|
||||
<Column justifyContent="center" overflow="hidden" size={ 7 }>
|
||||
<Text truncate fontSize={ 5 } fontWeight="bold" overflow="unset">{ title }</Text>
|
||||
|
||||
@@ -84,7 +84,7 @@ export const InventoryFurnitureDeleteView: FC<{}> = props =>
|
||||
className="cursor-pointer text-black fa-icon shrink-0"
|
||||
onClick={ () => updateAmount((amount - 1).toString()) } />
|
||||
<NitroInput
|
||||
className="quantity-input text-center py-0.5!"
|
||||
className="w-[49px] text-center py-0.5!"
|
||||
type="number"
|
||||
min={ 1 }
|
||||
max={ maxAmount }
|
||||
|
||||
@@ -189,7 +189,7 @@ export const InventoryTradeView: FC<InventoryTradeViewProps> = props =>
|
||||
return (
|
||||
<LayoutGridItem key={ index } className={ !count ? 'opacity-0-5 ' : '' } itemActive={ (groupItem === item) } itemCount={ count } itemImage={ item.iconUrl } itemUniqueNumber={ item.stuffData.uniqueNumber } onClick={ event => (count && setGroupItem(item)) } onDoubleClick={ event => attemptItemOffer(1) }>
|
||||
{ ((count > 0) && (groupItem === item)) &&
|
||||
<Button className="trade-button bottom-1 inset-e-1" position="absolute" variant="success" onClick={ event => attemptItemOffer(1) }>
|
||||
<Button className="bottom-1 inset-e-1 z-[5] min-h-0 text-[8px] px-[2px] py-[1px]" position="absolute" variant="success" onClick={ event => attemptItemOffer(1) }>
|
||||
<FaChevronRight className="fa-icon" />
|
||||
</Button>
|
||||
}
|
||||
@@ -200,7 +200,7 @@ export const InventoryTradeView: FC<InventoryTradeViewProps> = props =>
|
||||
<Column alignItems="end" gap={ 1 }>
|
||||
<Grid overflow="hidden">
|
||||
<Column overflow="hidden" size={ 6 }>
|
||||
<input className="min-h-[calc(1.5em+ .5rem+2px)] px-[.5rem] py-[.25rem] rounded-[.2rem] form-control-sm quantity-input" disabled={ !groupItem } placeholder={ LocalizeText('catalog.bundlewidget.spinner.select.amount') } type="number" value={ quantity } onChange={ event => setQuantity(event.target.valueAsNumber) } />
|
||||
<input className="w-[49px] min-h-[calc(1.5em+ .5rem+2px)] px-[.5rem] py-[.25rem] rounded-[.2rem] form-control-sm" disabled={ !groupItem } placeholder={ LocalizeText('catalog.bundlewidget.spinner.select.amount') } type="number" value={ quantity } onChange={ event => setQuantity(event.target.valueAsNumber) } />
|
||||
</Column>
|
||||
<Column overflow="hidden" size={ 6 }>
|
||||
<Button disabled={ !groupItem } variant="secondary" onClick={ event => changeCount(groupItem.getUnlockedCount()) }>{ LocalizeText('inventory.trading.areoffering') }</Button>
|
||||
@@ -229,7 +229,7 @@ export const InventoryTradeView: FC<InventoryTradeViewProps> = props =>
|
||||
return (
|
||||
<LayoutGridItem key={ i } itemActive={ (ownGroupItem === item) } itemCount={ item.getTotalCount() } itemImage={ item.iconUrl } itemUniqueNumber={ item.stuffData.uniqueNumber } onClick={ event => setOwnGroupItem(item) } onDoubleClick={ event => removeItem(item) }>
|
||||
{ (ownGroupItem === item) &&
|
||||
<Button className="trade-button bottom-1 inset-s-1" position="absolute" variant="danger" onClick={ event => removeItem(item) }>
|
||||
<Button className="bottom-1 inset-s-1 z-[5] min-h-0 text-[8px] px-[2px] py-[1px]" position="absolute" variant="danger" onClick={ event => removeItem(item) }>
|
||||
<FaChevronLeft className="fa-icon" />
|
||||
</Button> }
|
||||
</LayoutGridItem>
|
||||
|
||||
@@ -10,15 +10,15 @@ export const LoadingView: FC<LoadingViewProps> = props => {
|
||||
const { isError = false, message = '' } = props;
|
||||
|
||||
return (
|
||||
<Column fullHeight position="relative" className="nitro-loading">
|
||||
<Column fullHeight position="relative" className="relative z-[100] bg-[radial-gradient(#1d1a24,#003a6b)]">
|
||||
<Base fullHeight className="container h-100">
|
||||
<Column fullHeight alignItems="center" justifyContent="center">
|
||||
<Base className="nitro-loading_animation" />
|
||||
<Base className="nitro-loading_logo" />
|
||||
<Base className="absolute inset-0 m-auto w-[84px] h-[84px] [zoom:1.5] [image-rendering:pixelated] bg-[url('@/assets/images/loading/loading.gif')] bg-no-repeat bg-left-top" />
|
||||
<Base className="absolute top-[20px] left-[20px] z-[2] w-[150px] h-[100px] bg-[url('@/assets/images/notifications/coolui.png')] bg-no-repeat bg-left-top" />
|
||||
{ isError && (message && message.length) ?
|
||||
<Base className="fs-4 nitro-loading_text">{ message }</Base>
|
||||
<Base className="fs-4 absolute bottom-[20px] left-1/2 z-[3] -translate-x-1/2 [text-shadow:0px_4px_4px_rgba(0,0,0,0.25)]">{ message }</Base>
|
||||
:
|
||||
<Text fontSizeCustom={32} variant="white" className="nitro-loading_text">
|
||||
<Text fontSizeCustom={32} variant="white" className="absolute bottom-[20px] left-1/2 z-[3] -translate-x-1/2 [text-shadow:0px_4px_4px_rgba(0,0,0,0.25)]">
|
||||
The hotel is loading ...
|
||||
</Text>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user