-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4722 from leather-wallet/release/recursive-inscri…
…ptions Release/recursive inscriptions
- Loading branch information
Showing
44 changed files
with
414 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/app/features/collectibles/components/_collectible-types/collectible-audio.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ReactNode } from 'react'; | ||
|
||
import { AudioIcon } from '@app/ui/components/icons/audio-icon'; | ||
|
||
import { CollectibleItemLayout, CollectibleItemLayoutProps } from '../collectible-item.layout'; | ||
import { CollectiblePlaceholderLayout } from './collectible-placeholder.layout'; | ||
|
||
interface CollectibleAudioProps extends Omit<CollectibleItemLayoutProps, 'children'> { | ||
icon: ReactNode; | ||
} | ||
export function CollectibleAudio({ icon, ...props }: CollectibleAudioProps) { | ||
return ( | ||
<CollectibleItemLayout collectibleTypeIcon={icon} {...props}> | ||
<CollectiblePlaceholderLayout> | ||
<AudioIcon size="xl" /> | ||
</CollectiblePlaceholderLayout> | ||
</CollectibleItemLayout> | ||
); | ||
} |
35 changes: 35 additions & 0 deletions
35
src/app/features/collectibles/components/_collectible-types/collectible-iframe.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ReactNode, useState } from 'react'; | ||
|
||
import { Iframe } from '@app/ui/components/iframe'; | ||
|
||
import { CollectibleItemLayout, CollectibleItemLayoutProps } from '../collectible-item.layout'; | ||
import { ImageUnavailable } from '../image-unavailable'; | ||
|
||
interface CollectibleIframeProps extends Omit<CollectibleItemLayoutProps, 'children'> { | ||
icon: ReactNode; | ||
src: string; | ||
} | ||
export function CollectibleIframe({ icon, src, ...props }: CollectibleIframeProps) { | ||
const [isError, setIsError] = useState(false); | ||
|
||
if (isError) | ||
return ( | ||
<CollectibleItemLayout collectibleTypeIcon={icon} {...props}> | ||
<ImageUnavailable /> | ||
</CollectibleItemLayout> | ||
); | ||
|
||
return ( | ||
<CollectibleItemLayout collectibleTypeIcon={icon} {...props}> | ||
<Iframe | ||
aspectRatio="1 / 1" | ||
height="100%" | ||
objectFit="cover" | ||
onError={() => setIsError(true)} | ||
src={src} | ||
width="100%" | ||
zIndex={99} | ||
/> | ||
</CollectibleItemLayout> | ||
); | ||
} |
4 changes: 2 additions & 2 deletions
4
src/app/features/collectibles/components/_collectible-types/collectible-image.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...pp/features/collectibles/components/_collectible-types/collectible-placeholder.layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Flex } from 'leather-styles/jsx'; | ||
|
||
import { HasChildren } from '@app/common/has-children'; | ||
|
||
export function CollectiblePlaceholderLayout({ children }: HasChildren) { | ||
return ( | ||
<Flex | ||
alignItems="center" | ||
bg="accent.component-background-default" | ||
flexDirection="column" | ||
height="100%" | ||
justifyContent="center" | ||
textAlign="center" | ||
width="100%" | ||
> | ||
{children} | ||
</Flex> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 9 additions & 14 deletions
23
src/app/features/collectibles/components/image-unavailable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
import { Flex, styled } from 'leather-styles/jsx'; | ||
import { styled } from 'leather-styles/jsx'; | ||
|
||
import { EyeSlashIcon } from '@app/ui/components/icons/eye-slash-icon'; | ||
|
||
import { CollectiblePlaceholderLayout } from './_collectible-types/collectible-placeholder.layout'; | ||
|
||
export function ImageUnavailable() { | ||
return ( | ||
<Flex | ||
alignItems="center" | ||
bg="accent.component-background-default" | ||
flexDirection="column" | ||
height="100%" | ||
justifyContent="center" | ||
textAlign="center" | ||
width="100%" | ||
> | ||
<EyeSlashIcon pb="12px" size="md" /> | ||
<styled.span textStyle="label.03">Image currently</styled.span> | ||
<styled.span textStyle="label.03">unavailable</styled.span> | ||
</Flex> | ||
<CollectiblePlaceholderLayout> | ||
<EyeSlashIcon size="md" /> | ||
<styled.span pt="space.02" px="space.04" textStyle="label.03"> | ||
Image currently unavailable | ||
</styled.span> | ||
</CollectiblePlaceholderLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.