mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-31 02:12:36 +01:00
Move LayoutCurrencyIcon
This commit is contained in:
parent
eb8ba913b8
commit
8bef2096f1
@ -18,6 +18,8 @@ $nitro-card-tabs-height: 33px;
|
||||
background-color: $primary;
|
||||
|
||||
&.bg-tertiary-split {
|
||||
min-height: 28px;
|
||||
max-height: 28px;
|
||||
position: relative;
|
||||
border-bottom: 2px solid darken($quaternary, 5);
|
||||
box-shadow: 0 2px white;
|
||||
@ -33,6 +35,12 @@ $nitro-card-tabs-height: 33px;
|
||||
height: 2px;
|
||||
background-color: rgba($white, 0.3);
|
||||
}
|
||||
|
||||
.nitro-card-header-text {
|
||||
color: $white;
|
||||
text-shadow: 0px 4px 4px rgba($black, 0.25);
|
||||
@include font-size($h5-font-size);
|
||||
}
|
||||
}
|
||||
|
||||
.nitro-card-header-text {
|
||||
@ -72,6 +80,7 @@ $nitro-card-tabs-height: 33px;
|
||||
}
|
||||
|
||||
.nitro-card-header {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.header-close {
|
||||
|
@ -253,4 +253,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.nitro-currency-icon {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
@import './card/NitroCardView';
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { CSSProperties, FC, useMemo } from 'react';
|
||||
import { GetConfiguration } from '../../../api';
|
||||
import { Base, BaseProps } from '../../../common/Base';
|
||||
import { GetConfiguration } from '../../api';
|
||||
import { Base, BaseProps } from '../Base';
|
||||
|
||||
export interface CurrencyIconProps extends BaseProps<HTMLDivElement>
|
||||
{
|
||||
type: number | string;
|
||||
}
|
||||
|
||||
export const CurrencyIcon: FC<CurrencyIconProps> = props =>
|
||||
export const LayoutCurrencyIcon: FC<CurrencyIconProps> = props =>
|
||||
{
|
||||
const { type = '', classNames = [], style = {}, ...rest } = props;
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './LayoutCurrencyIcon';
|
||||
export * from './LayoutGiftTagView';
|
||||
export * from './LayoutGridItem';
|
||||
export * from './LayoutImage';
|
||||
|
@ -1,11 +1,7 @@
|
||||
import { AchievementData } from '@nitrots/nitro-renderer';
|
||||
import { FC } from 'react';
|
||||
import { LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../../../api';
|
||||
import { Base } from '../../../../common/Base';
|
||||
import { Column } from '../../../../common/Column';
|
||||
import { Flex } from '../../../../common/Flex';
|
||||
import { Text } from '../../../../common/Text';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { Base, Column, Flex, LayoutCurrencyIcon, Text } from '../../../../common';
|
||||
import { AchievementUtilities } from '../../common/AchievementUtilities';
|
||||
import { GetAchievementLevel } from '../../common/GetAchievementLevel';
|
||||
import { GetScaledProgressPercent } from '../../common/GetScaledProgressPercent';
|
||||
@ -51,7 +47,7 @@ export const AchievementDetailsView: FC<AchievementDetailsViewProps> = props =>
|
||||
</Text>
|
||||
<Flex center className="fw-bold small" gap={ 1 }>
|
||||
{ achievement.levelRewardPoints }
|
||||
<CurrencyIcon type={ achievement.levelRewardPointType } />
|
||||
<LayoutCurrencyIcon type={ achievement.levelRewardPointType } />
|
||||
</Flex>
|
||||
</Flex> }
|
||||
{ (achievement.scoreLimit > 0) &&
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { LayoutGridItem, LayoutGridItemProps } from '../../../../common/layout/LayoutGridItem';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { LayoutCurrencyIcon, LayoutGridItem, LayoutGridItemProps } from '../../../../common';
|
||||
import { AvatarEditorGridPartItem } from '../../common/AvatarEditorGridPartItem';
|
||||
import { AvatarEditorIcon } from '../AvatarEditorIcon';
|
||||
|
||||
@ -31,7 +30,7 @@ export const AvatarEditorFigureSetItemView: FC<AvatarEditorFigureSetItemViewProp
|
||||
|
||||
return (
|
||||
<LayoutGridItem itemImage={ (partItem.isClear ? undefined : partItem.imageUrl) } itemActive={ partItem.isSelected } { ...rest }>
|
||||
{ partItem.isHC && <CurrencyIcon className="position-absolute end-1 bottom-1" type={ 'hc' } /> }
|
||||
{ partItem.isHC && <LayoutCurrencyIcon className="position-absolute end-1 bottom-1" type={ 'hc' } /> }
|
||||
{ partItem.isClear && <AvatarEditorIcon icon="clear" /> }
|
||||
{ partItem.isSellable && <AvatarEditorIcon icon="sellable" position="absolute" className="end-1 bottom-1" /> }
|
||||
{ children }
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { LayoutGridItem, LayoutGridItemProps } from '../../../../common/layout/LayoutGridItem';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { LayoutCurrencyIcon, LayoutGridItem, LayoutGridItemProps } from '../../../../common';
|
||||
import { AvatarEditorGridColorItem } from '../../common/AvatarEditorGridColorItem';
|
||||
|
||||
export interface AvatarEditorPaletteSetItemProps extends LayoutGridItemProps
|
||||
@ -27,7 +26,7 @@ export const AvatarEditorPaletteSetItem: FC<AvatarEditorPaletteSetItemProps> = p
|
||||
|
||||
return (
|
||||
<LayoutGridItem itemHighlight itemColor={ colorItem.color } itemActive={ colorItem.isSelected } className="clear-bg" { ...rest }>
|
||||
{ colorItem.isHC && <CurrencyIcon className="position-absolute end-1 bottom-1" type={ 'hc' } /> }
|
||||
{ colorItem.isHC && <LayoutCurrencyIcon className="position-absolute end-1 bottom-1" type={ 'hc' } /> }
|
||||
{ children }
|
||||
</LayoutGridItem>
|
||||
);
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { IAvatarFigureContainer, SaveWardrobeOutfitMessageComposer } from '@nitrots/nitro-renderer';
|
||||
import { Dispatch, FC, SetStateAction, useCallback, useMemo } from 'react';
|
||||
import { GetAvatarRenderManager, GetSessionDataManager, SendMessageComposer } from '../../../../api';
|
||||
import { AutoGrid, Base, Button, Flex, LayoutGridItem } from '../../../../common';
|
||||
import { AutoGrid, Base, Button, Flex, LayoutCurrencyIcon, LayoutGridItem } from '../../../../common';
|
||||
import { AvatarImageView } from '../../../../views/shared/avatar-image/AvatarImageView';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { FigureData } from '../../common/FigureData';
|
||||
|
||||
export interface AvatarEditorWardrobeViewProps
|
||||
@ -59,7 +58,7 @@ export const AvatarEditorWardrobeView: FC<AvatarEditorWardrobeViewProps> = props
|
||||
{ figureContainer &&
|
||||
<AvatarImageView figure={ figureContainer.getFigureString() } gender={ gender } direction={ 2 } /> }
|
||||
<Base className="avatar-shadow" />
|
||||
{ (clubLevel > 0) && <CurrencyIcon className="position-absolute top-1 start-1" type="hc" /> }
|
||||
{ (clubLevel > 0) && <LayoutCurrencyIcon className="position-absolute top-1 start-1" type="hc" /> }
|
||||
<Flex gap={ 1 } className="button-container">
|
||||
<Button variant="link" fullWidth onClick={ event => saveFigureAtWardrobeIndex(index) }>Save</Button>
|
||||
{ figureContainer &&
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, CameraStorageUrlMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { GetConfiguration, GetRoomEngine, LocalizeText, SendMessageComposer } from '../../../../api';
|
||||
import { Button, Column, Flex, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
|
||||
import { Button, Column, Flex, LayoutCurrencyIcon, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
|
||||
import { InventoryEvent } from '../../../../events';
|
||||
import { BatchUpdates, DispatchUiEvent, UseMessageEventHook } from '../../../../hooks';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
|
||||
export interface CameraWidgetCheckoutViewProps
|
||||
{
|
||||
@ -116,12 +115,12 @@ export const CameraWidgetCheckoutView: FC<CameraWidgetCheckoutViewProps> = props
|
||||
{ (price.credits > 0) &&
|
||||
<Flex gap={ 1 }>
|
||||
<Text bold>{ price.credits }</Text>
|
||||
<CurrencyIcon type={ -1 } />
|
||||
<LayoutCurrencyIcon type={ -1 } />
|
||||
</Flex> }
|
||||
{ (price.duckets > 0) &&
|
||||
<Flex gap={ 1 }>
|
||||
<Text bold>{ price.duckets }</Text>
|
||||
<CurrencyIcon type={ 5 } />
|
||||
<LayoutCurrencyIcon type={ 5 } />
|
||||
</Flex> }
|
||||
</Flex> }
|
||||
{ (picturesBought > 0) &&
|
||||
@ -148,7 +147,7 @@ export const CameraWidgetCheckoutView: FC<CameraWidgetCheckoutViewProps> = props
|
||||
<Text>{ LocalizeText('catalog.purchase.confirmation.dialog.cost') }</Text>
|
||||
<Flex gap={ 1 }>
|
||||
<Text bold>{ price.publishDucketPrice }</Text>
|
||||
<CurrencyIcon type={ 5 } />
|
||||
<LayoutCurrencyIcon type={ 5 } />
|
||||
</Flex>
|
||||
</Flex> }
|
||||
{ (publishCooldown > 0) && <div className="mt-1 text-center fw-bold">{ LocalizeText('camera.publish.wait', [ 'minutes' ], [ Math.ceil( publishCooldown / 60).toString() ]) }</div> }
|
||||
|
@ -3,11 +3,9 @@ import { PurchaseFromCatalogAsGiftComposer } from '@nitrots/nitro-renderer';
|
||||
import classNames from 'classnames';
|
||||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { GetSessionDataManager, LocalizeText, SendMessageComposer } from '../../../../api';
|
||||
import { Base, Button, ButtonGroup, Column, Flex, FormGroup, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
|
||||
import { CatalogEvent, CatalogPurchasedEvent } from '../../../../events';
|
||||
import { CatalogInitGiftEvent } from '../../../../events/catalog/CatalogInitGiftEvent';
|
||||
import { Base, Button, ButtonGroup, Column, Flex, FormGroup, LayoutCurrencyIcon, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
|
||||
import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchasedEvent } from '../../../../events';
|
||||
import { BatchUpdates, UseUiEvent } from '../../../../hooks';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { FurniImageView } from '../../../../views/shared/furni-image/FurniImageView';
|
||||
import { useCatalogContext } from '../../CatalogContext';
|
||||
import { ProductTypeEnum } from '../../common/ProductTypeEnum';
|
||||
@ -201,7 +199,7 @@ export const CatalogGiftView: FC<{}> = props =>
|
||||
<Text fontWeight="bold">{ LocalizeText(boxName) }</Text>
|
||||
<Flex alignItems="center" gap={ 1 }>
|
||||
{ LocalizeText(priceText, ['price'], [giftConfiguration.price.toString()]) }
|
||||
<CurrencyIcon type={ -1 } />
|
||||
<LayoutCurrencyIcon type={ -1 } />
|
||||
</Flex>
|
||||
</Column>
|
||||
</Flex>
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { ClubOfferData, GetClubOffersMessageComposer, PurchaseFromCatalogComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { LocalizeText, SendMessageComposer } from '../../../../../api';
|
||||
import { AutoGrid, Button, Column, Flex, Grid, LayoutGridItem, LayoutLoadingSpinnerView, Text } from '../../../../../common';
|
||||
import { AutoGrid, Button, Column, Flex, Grid, LayoutCurrencyIcon, LayoutGridItem, LayoutLoadingSpinnerView, Text } from '../../../../../common';
|
||||
import { CatalogEvent, CatalogPurchasedEvent, CatalogPurchaseFailureEvent } from '../../../../../events';
|
||||
import { UseUiEvent } from '../../../../../hooks';
|
||||
import { CurrencyIcon } from '../../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { GetCurrencyAmount } from '../../../../purse/common/CurrencyHelper';
|
||||
import { GLOBAL_PURSE } from '../../../../purse/PurseView';
|
||||
import { useCatalogContext } from '../../../CatalogContext';
|
||||
@ -151,12 +150,12 @@ export const CatalogLayoutVipBuyView: FC<CatalogLayoutProps> = props =>
|
||||
{ (offer.priceCredits > 0) &&
|
||||
<Flex alignItems="center" justifyContent="end" gap={ 1 }>
|
||||
<Text>{ offer.priceCredits }</Text>
|
||||
<CurrencyIcon type={ -1 } />
|
||||
<LayoutCurrencyIcon type={ -1 } />
|
||||
</Flex> }
|
||||
{ (offer.priceActivityPoints > 0) &&
|
||||
<Flex alignItems="center" justifyContent="end" gap={ 1 }>
|
||||
<Text>{ offer.priceActivityPoints }</Text>
|
||||
<CurrencyIcon type={ offer.priceActivityPointsType } />
|
||||
<LayoutCurrencyIcon type={ offer.priceActivityPointsType } />
|
||||
</Flex> }
|
||||
</Flex>
|
||||
</Column>
|
||||
@ -182,12 +181,12 @@ export const CatalogLayoutVipBuyView: FC<CatalogLayoutProps> = props =>
|
||||
{ (pendingOffer.priceCredits > 0) &&
|
||||
<Flex alignItems="center" justifyContent="end" gap={ 1 }>
|
||||
<Text>{ pendingOffer.priceCredits }</Text>
|
||||
<CurrencyIcon type={ -1 } />
|
||||
<LayoutCurrencyIcon type={ -1 } />
|
||||
</Flex> }
|
||||
{ (pendingOffer.priceActivityPoints > 0) &&
|
||||
<Flex alignItems="center" justifyContent="end" gap={ 1 }>
|
||||
<Text>{ pendingOffer.priceActivityPoints }</Text>
|
||||
<CurrencyIcon type={ pendingOffer.priceActivityPointsType } />
|
||||
<LayoutCurrencyIcon type={ pendingOffer.priceActivityPointsType } />
|
||||
</Flex> }
|
||||
</Column>
|
||||
</Flex>
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { ApproveNameMessageComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useState } from 'react';
|
||||
import { LocalizeText, SendMessageComposer } from '../../../../../../api';
|
||||
import { Column, Flex, Text } from '../../../../../../common';
|
||||
import { Column, Flex, LayoutCurrencyIcon, Text } from '../../../../../../common';
|
||||
import { CatalogPurchasedEvent } from '../../../../../../events';
|
||||
import { UseUiEvent } from '../../../../../../hooks';
|
||||
import { CurrencyIcon } from '../../../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { IPurchasableOffer } from '../../../../common/IPurchasableOffer';
|
||||
import { Offer } from '../../../../common/Offer';
|
||||
import { CatalogPurchaseWidgetView } from '../../widgets/CatalogPurchaseWidgetView';
|
||||
@ -50,12 +49,12 @@ export const CatalogLayoutPetPurchaseView: FC<CatalogLayoutPetPurchaseViewProps>
|
||||
{ ((offer.priceType === Offer.PRICE_TYPE_CREDITS_ACTIVITYPOINTS) || (offer.priceType === Offer.PRICE_TYPE_CREDITS)) &&
|
||||
<Flex alignItems="center" justifyContent="end" gap={ 1 }>
|
||||
<Text>{ offer.priceInCredits }</Text>
|
||||
<CurrencyIcon type={ -1 } />
|
||||
<LayoutCurrencyIcon type={ -1 } />
|
||||
</Flex> }
|
||||
{ ((offer.priceType === Offer.PRICE_TYPE_CREDITS_ACTIVITYPOINTS) || (offer.priceType === Offer.PRICE_TYPE_ACTIVITYPOINTS)) &&
|
||||
<Flex alignItems="center" justifyContent="end" gap={ 1 }>
|
||||
<Text>{ offer.priceInActivityPoints }</Text>
|
||||
<CurrencyIcon type={ offer.activityPointType } />
|
||||
<LayoutCurrencyIcon type={ offer.activityPointType } />
|
||||
</Flex> }
|
||||
</Column>
|
||||
</Flex>
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { FC } from 'react';
|
||||
import { Flex } from '../../../../../common/Flex';
|
||||
import { Text } from '../../../../../common/Text';
|
||||
import { CurrencyIcon } from '../../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { Flex, LayoutCurrencyIcon, Text } from '../../../../../common';
|
||||
import { useCatalogContext } from '../../../CatalogContext';
|
||||
import { IPurchasableOffer } from '../../../common/IPurchasableOffer';
|
||||
|
||||
@ -25,14 +23,14 @@ export const CatalogPriceDisplayWidgetView: FC<CatalogPriceDisplayWidgetViewProp
|
||||
{ (offer.priceInCredits > 0) &&
|
||||
<Flex alignItems="center" gap={ 1 }>
|
||||
<Text bold>{ (offer.priceInCredits * quantity) }</Text>
|
||||
<CurrencyIcon type={ -1 } />
|
||||
<LayoutCurrencyIcon type={ -1 } />
|
||||
</Flex> }
|
||||
{ separator && (offer.priceInCredits > 0) && (offer.priceInActivityPoints > 0) &&
|
||||
<FontAwesomeIcon size="xs" color="black" icon="plus" /> }
|
||||
{ (offer.priceInActivityPoints > 0) &&
|
||||
<Flex alignItems="center" gap={ 1 }>
|
||||
<Text bold>{ (offer.priceInActivityPoints * quantity) }</Text>
|
||||
<CurrencyIcon type={ offer.activityPointType } />
|
||||
<LayoutCurrencyIcon type={ offer.activityPointType } />
|
||||
</Flex> }
|
||||
</>
|
||||
);
|
||||
|
@ -2,9 +2,8 @@
|
||||
import { HabboClubLevelEnum, RoomCreateComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { GetConfiguration, GetSessionDataManager, LocalizeText, SendMessageComposer } from '../../../../api';
|
||||
import { Button, Column, Flex, Grid, LayoutGridItem, Text } from '../../../../common';
|
||||
import { Button, Column, Flex, Grid, LayoutCurrencyIcon, LayoutGridItem, Text } from '../../../../common';
|
||||
import { BatchUpdates } from '../../../../hooks';
|
||||
import { CurrencyIcon } from '../../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { IRoomModel, RoomModels } from '../../common/RoomModels';
|
||||
import { useNavigatorContext } from '../../NavigatorContext';
|
||||
|
||||
@ -105,7 +104,7 @@ export const NavigatorRoomCreatorView: FC<{}> = props =>
|
||||
<img alt="" src={ getRoomModelImage(model.name) } />
|
||||
</Flex>
|
||||
<Text bold>{ model.tileSize } { LocalizeText('navigator.createroom.tilesize') }</Text>
|
||||
{ model.clubLevel > HabboClubLevelEnum.NO_CLUB && <CurrencyIcon position="absolute" className="top-1 end-1" type="hc" /> }
|
||||
{ model.clubLevel > HabboClubLevelEnum.NO_CLUB && <LayoutCurrencyIcon position="absolute" className="top-1 end-1" type="hc" /> }
|
||||
</LayoutGridItem>);
|
||||
})
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { ActivityPointNotificationMessageEvent, FriendlyTime, HabboClubLevelEnum, UserCreditsEvent, UserCurrencyComposer, UserCurrencyEvent, UserSubscriptionComposer, UserSubscriptionEvent, UserSubscriptionParser } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { CreateLinkEvent, CREDITS, DUCKETS, GetConfiguration, LocalizeText, PlaySound, SendMessageComposer } from '../../api';
|
||||
import { Column, Flex, Grid, Text } from '../../common';
|
||||
import { Column, Flex, Grid, LayoutCurrencyIcon, Text } from '../../common';
|
||||
import { HcCenterEvent, UserSettingsUIEvent } from '../../events';
|
||||
import { DispatchUiEvent, UseMessageEventHook } from '../../hooks';
|
||||
import { CurrencyIcon } from '../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { IPurse } from './common/IPurse';
|
||||
import { Purse } from './common/Purse';
|
||||
import { PurseContextProvider } from './PurseContext';
|
||||
@ -177,7 +176,7 @@ export const PurseView: FC<{}> = props =>
|
||||
{ getCurrencyElements(0, 2) }
|
||||
</Column>
|
||||
<Column center pointer size={ 4 } gap={ 1 } className="nitro-purse-subscription rounded" onClick={ event => DispatchUiEvent(new HcCenterEvent(HcCenterEvent.TOGGLE_HC_CENTER)) }>
|
||||
<CurrencyIcon type="hc" />
|
||||
<LayoutCurrencyIcon type="hc" />
|
||||
<Text variant="white">{ getClubText }</Text>
|
||||
</Column>
|
||||
<Column justifyContent="center" size={ 2 } gap={ 0 }>
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { FC, useMemo } from 'react';
|
||||
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
|
||||
import { LocalizeFormattedNumber, LocalizeShortNumber } from '../../../api';
|
||||
import { Flex, Text } from '../../../common';
|
||||
import { CurrencyIcon } from '../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { Flex, LayoutCurrencyIcon, Text } from '../../../common';
|
||||
|
||||
interface CurrencyViewProps
|
||||
{
|
||||
@ -20,7 +19,7 @@ export const CurrencyView: FC<CurrencyViewProps> = props =>
|
||||
return (
|
||||
<Flex justifyContent="end" pointer gap={ 1 } className="nitro-purse-button rounded">
|
||||
<Text truncate textEnd variant="white" grow>{ short ? LocalizeShortNumber(amount) : LocalizeFormattedNumber(amount) }</Text>
|
||||
<CurrencyIcon type={ type } />
|
||||
<LayoutCurrencyIcon type={ type } />
|
||||
</Flex>);
|
||||
}, [ amount, short, type ]);
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { FC } from 'react';
|
||||
import { LocalizeFormattedNumber, LocalizeText } from '../../../api';
|
||||
import { Flex, Text } from '../../../common';
|
||||
import { CurrencyIcon } from '../../../views/shared/currency-icon/CurrencyIcon';
|
||||
import { Flex, LayoutCurrencyIcon, Text } from '../../../common';
|
||||
|
||||
interface SeasonalViewProps
|
||||
{
|
||||
@ -18,7 +17,7 @@ export const SeasonalView: FC<SeasonalViewProps> = props =>
|
||||
<Text variant="white">{ LocalizeText(`purse.seasonal.currency.${ type }`) }</Text>
|
||||
<Flex gap={ 1 }>
|
||||
<Text variant="white">{ LocalizeFormattedNumber(amount) }</Text>
|
||||
<CurrencyIcon type={ type } />
|
||||
<LayoutCurrencyIcon type={ type } />
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { FC } from 'react';
|
||||
import { LocalizeText } from '../../../../api';
|
||||
import { LayoutNotificationBubbleView } from '../../../../common';
|
||||
import { CurrencyIcon } from '../../../shared/currency-icon/CurrencyIcon';
|
||||
import { LayoutCurrencyIcon, LayoutNotificationBubbleView } from '../../../../common';
|
||||
import { NotificationUtilities } from '../../common/NotificationUtilities';
|
||||
import { NotificationBubbleLayoutViewProps } from './NotificationBubbleLayoutView.types';
|
||||
|
||||
@ -12,7 +11,7 @@ export const NotificationClubGiftBubbleView: FC<NotificationBubbleLayoutViewProp
|
||||
return (
|
||||
<LayoutNotificationBubbleView fadesOut={ false } className="flex-column club-gift" close={ close } { ...rest }>
|
||||
<div className="d-flex align-items-center gap-2 mb-2">
|
||||
<CurrencyIcon type="hc" className="flex-shrink-0" />
|
||||
<LayoutCurrencyIcon type="hc" className="flex-shrink-0" />
|
||||
<span className="ms-1">{ LocalizeText('notifications.text.club_gift') }</span>
|
||||
</div>
|
||||
<div className="d-flex align-items-center justify-content-end gap-2">
|
||||
|
@ -2,10 +2,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { AvatarAction, AvatarExpressionEnum, RoomControllerLevel, RoomObjectCategory } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useMemo, useState } from 'react';
|
||||
import { CreateLinkEvent, GetCanStandUp, GetCanUseExpression, GetOwnPosture, GetUserProfile, HasHabboClub, HasHabboVip, IsRidingHorse, LocalizeText, RoomWidgetAvatarExpressionMessage, RoomWidgetChangePostureMessage, RoomWidgetDanceMessage, RoomWidgetMessage, RoomWidgetUpdateDecorateModeEvent, RoomWidgetUpdateInfostandUserEvent, RoomWidgetUserActionMessage } from '../../../../api';
|
||||
import { Flex } from '../../../../common';
|
||||
import { Flex, LayoutCurrencyIcon } from '../../../../common';
|
||||
import { HelpNameChangeEvent } from '../../../../events';
|
||||
import { DispatchUiEvent } from '../../../../hooks';
|
||||
import { CurrencyIcon } from '../../../shared/currency-icon/CurrencyIcon';
|
||||
import { useRoomContext } from '../../context/RoomContext';
|
||||
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
|
||||
import { ContextMenuListItemView } from '../context-menu/ContextMenuListItemView';
|
||||
@ -204,12 +203,12 @@ export const AvatarInfoWidgetOwnAvatarView: FC<AvatarInfoWidgetOwnAvatarViewProp
|
||||
</ContextMenuListItemView> }
|
||||
{ GetCanUseExpression() &&
|
||||
<ContextMenuListItemView disabled={ !HasHabboVip() } onClick={ event => processAction('laugh') }>
|
||||
<CurrencyIcon type="hc" />
|
||||
<LayoutCurrencyIcon type="hc" />
|
||||
{ LocalizeText('widget.memenu.laugh') }
|
||||
</ContextMenuListItemView> }
|
||||
{ GetCanUseExpression() &&
|
||||
<ContextMenuListItemView disabled={ !HasHabboVip() } onClick={ event => processAction('blow') }>
|
||||
<CurrencyIcon type="hc" />
|
||||
<LayoutCurrencyIcon type="hc" />
|
||||
{ LocalizeText('widget.memenu.blow') }
|
||||
</ContextMenuListItemView> }
|
||||
<ContextMenuListItemView onClick={ event => processAction('idle') }>
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { FC } from 'react';
|
||||
import { Base } from '../../../../../common';
|
||||
import { Base, LayoutCurrencyIcon } from '../../../../../common';
|
||||
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
|
||||
import { CurrencyIcon } from '../../../../shared/currency-icon/CurrencyIcon';
|
||||
|
||||
interface FurnitureMannequinPreviewViewProps
|
||||
{
|
||||
@ -17,7 +16,7 @@ export const FurnitureMannequinPreviewView: FC<FurnitureMannequinPreviewViewProp
|
||||
<Base position="relative" className="mannequin-preview">
|
||||
<AvatarImageView figure={ figure } direction={ 2 } />
|
||||
{ (clubLevel > 0) &&
|
||||
<CurrencyIcon className="position-absolute end-2 bottom-2" type="hc" /> }
|
||||
<LayoutCurrencyIcon className="position-absolute end-2 bottom-2" type="hc" /> }
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { AvatarFigurePartType, FurnitureMannequinSaveLookComposer, FurnitureMannequinSaveNameComposer, FurnitureMultiStateComposer, HabboClubLevelEnum, IAvatarFigureContainer, RoomControllerLevel } from '@nitrots/nitro-renderer';
|
||||
import { FC, KeyboardEvent, useCallback, useEffect, useState } from 'react';
|
||||
import { GetAvatarRenderManager, GetSessionDataManager, LocalizeText, RoomWidgetUpdateMannequinEvent, SendMessageComposer } from '../../../../../api';
|
||||
import { Base, Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
|
||||
import { Base, Button, Column, Flex, LayoutCurrencyIcon, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../../common';
|
||||
import { BatchUpdates, UseEventDispatcherHook } from '../../../../../hooks';
|
||||
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
|
||||
import { CurrencyIcon } from '../../../../shared/currency-icon/CurrencyIcon';
|
||||
import { useRoomContext } from '../../../context/RoomContext';
|
||||
|
||||
const MODE_NONE: number = -1;
|
||||
@ -182,7 +181,7 @@ export const FurnitureMannequinView: FC<{}> = props =>
|
||||
<Base position="relative" className="mannequin-preview">
|
||||
<AvatarImageView figure={ renderedFigure } direction={ 2 } />
|
||||
{ (clubLevel > 0) &&
|
||||
<CurrencyIcon className="position-absolute end-2 bottom-2" type="hc" /> }
|
||||
<LayoutCurrencyIcon className="position-absolute end-2 bottom-2" type="hc" /> }
|
||||
</Base>
|
||||
</Column>
|
||||
<Column justifyContent="between" overflow="auto">
|
||||
|
@ -1,6 +1,5 @@
|
||||
@import "./avatar-image/AvatarImage";
|
||||
@import "./badge-image/BadgeImage";
|
||||
@import "./currency-icon/CurrencyIcon";
|
||||
@import "./furni-image/FurniImageView";
|
||||
@import "./limited-edition/LimitedEdition";
|
||||
@import "./pet-image/PetImage";
|
||||
|
@ -1,6 +0,0 @@
|
||||
.nitro-currency-icon {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user