Skip to content

Commit

Permalink
feat: Add Wearable Utility
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed May 6, 2024
1 parent eb46453 commit c9c4696
Show file tree
Hide file tree
Showing 31 changed files with 214 additions and 229 deletions.
27 changes: 8 additions & 19 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@0xsquid/squid-types": "^0.1.29",
"@covalenthq/client-sdk": "^0.6.4",
"@dcl/crypto": "^3.0.0",
"@dcl/schemas": "^11.4.0",
"@dcl/schemas": "^11.7.0",
"@dcl/single-sign-on-client": "^0.1.0",
"@dcl/ui-env": "^1.5.0",
"@ethersproject/providers": "^5.6.2",
Expand All @@ -24,7 +24,7 @@
"decentraland-crypto-fetch": "^1.0.3",
"decentraland-dapps": "^19.5.3",
"decentraland-transactions": "^2.6.0",
"decentraland-ui": "^5.17.1",
"decentraland-ui": "^5.21.0",
"ethers": "^5.6.8",
"graphql": "^14.7.0",
"history": "^4.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils'
import { locations } from '../../../modules/routing/locations'
import { getSearchSection } from '../../../modules/routing/search'
import { BrowseOptions } from '../../../modules/routing/types'
import IconBadge from '../IconBadge'
import IconBadge from '../LinkedIconBadge'
import { Props } from './CategoryBadge.types'

const CategoryBadge = ({ category, assetType }: Props) => {
Expand Down
16 changes: 16 additions & 0 deletions webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,23 @@
color: var(--secondary-text);
}

.EmoteDetail .attributesRow {
display: flex;
flex-direction: row;
gap: 10px;
word-wrap: break-word;
word-break: break-all;
}

.EmoteDetail .attributesColumn {
flex-basis: 100%;
}

@media (max-width: 768px) {
.EmoteDetail .attributesRow {
flex-direction: column;
}

.EmoteDetail .wearableInformationContainer {
flex-direction: column;
}
Expand Down
16 changes: 14 additions & 2 deletions webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ import { BidsTable } from '../BidsTable'
import { BuyNFTBox } from '../BuyNFTBox'
import Collection from '../Collection'
import { Description } from '../Description'
import IconBadge from '../IconBadge'
import IconBadge from '../LinkedIconBadge'
import { ListingsTable } from '../ListingsTable'
import OnBack from '../OnBack'
import { Owner } from '../Owner'
import Title from '../Title'
import { TransactionHistory } from '../TransactionHistory'
import { UtilityBadge } from '../UtilityBadge'
import { WearableUtility } from '../WearableUtility'
import { YourOffer } from '../YourOffer'
import { Props } from './EmoteDetail.types'
import styles from './EmoteDetail.module.css'
Expand Down Expand Up @@ -96,12 +98,22 @@ const EmoteDetail = ({ nft }: Props) => {
text={t(`emote.play_mode.${loop ? 'loop' : 'simple'}`)}
href={emoteBadgeHref}
/>
{nft.utility ? <UtilityBadge /> : null}
<CampaignBadge contract={nft.contractAddress} />
{emote.hasSound && <IconBadge icon="sound" text={t('emote.sound')} href={emoteSoundHref} />}
{emote.hasGeometry && <IconBadge icon="props" text={t('emote.props')} href={emoteGeometryHref} />}
</div>
</div>
<Description text={emote.description} />
<div className={styles.attributesRow}>
<div className={styles.attributesColumn}>
<Description text={emote.description} />
</div>
{nft.utility ? (
<div className={styles.attributesColumn}>
<WearableUtility utility={nft.utility} />
</div>
) : null}
</div>
<div className={styles.emoteOwnerAndCollectionContainer}>
<Owner asset={nft} />
<Collection asset={nft} />
Expand Down
142 changes: 0 additions & 142 deletions webapp/src/components/AssetPage/IconBadge/IconBadge.css

This file was deleted.

29 changes: 0 additions & 29 deletions webapp/src/components/AssetPage/IconBadge/IconBadge.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions webapp/src/components/AssetPage/IconBadge/IconBadge.types.ts

This file was deleted.

3 changes: 0 additions & 3 deletions webapp/src/components/AssetPage/IconBadge/index.ts

This file was deleted.

23 changes: 20 additions & 3 deletions webapp/src/components/AssetPage/ItemDetail/ItemDetail.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@
gap: 30px;
}

.ItemDetail .attributesRow {
display: flex;
flex-direction: row;
gap: 10px;
word-wrap: break-word;
word-break: break-all;
}

.ItemDetail .attributesColumn {
flex-basis: 100%;
}

.ItemDetail .basicRow {
display: flex;
flex-direction: row;
Expand All @@ -60,8 +72,8 @@
}

.ItemDetail .vrmBadge {
background: #FF743933;
color: #FF7439;
background: #ff743933;
color: #ff7439;
padding: 3px 6px;
height: 24px;
font-size: 13px;
Expand All @@ -88,6 +100,11 @@
}

@media (max-width: 768px) {
.ItemDetail .attributesRow {
display: flex;
flex-direction: column;
}

.ItemDetail .assetImageContainer {
height: 400px;
}
Expand All @@ -105,7 +122,7 @@
.ItemDetail .basicRow :global(.dcl.stats) {
width: 100%;
}

.ItemDetail .basicRow {
flex-direction: column;
}
Expand Down

0 comments on commit c9c4696

Please sign in to comment.