diff --git a/cspell.json b/cspell.json index b4f83540523b..069b320a239f 100644 --- a/cspell.json +++ b/cspell.json @@ -358,7 +358,8 @@ "Enjin", "poap", "irss", - "CELO" + "CELO", + "flac" ], "ignoreRegExpList": ["/@servie/"], "overrides": [ diff --git a/packages/icons/brands/MaskGrey.tsx b/packages/icons/brands/MaskGrey.tsx index a87c3fe85961..7ab13dd429ab 100644 --- a/packages/icons/brands/MaskGrey.tsx +++ b/packages/icons/brands/MaskGrey.tsx @@ -1,7 +1,7 @@ -import { createIcon } from '../utils' +import { createPaletteAwareIcon } from '../utils' import type { SvgIcon } from '@mui/material' -export const MaskGreyIcon: typeof SvgIcon = createIcon( +export const MaskGreyIcon: typeof SvgIcon = createPaletteAwareIcon( 'Mask', @@ -12,6 +12,15 @@ export const MaskGreyIcon: typeof SvgIcon = createIcon( clipRule="evenodd" /> , + + + + , '0 0 120 120', [130, 40], ) diff --git a/packages/icons/general/AssetLoading.tsx b/packages/icons/general/AssetLoading.tsx new file mode 100644 index 000000000000..e8eb7f46b9f6 --- /dev/null +++ b/packages/icons/general/AssetLoading.tsx @@ -0,0 +1,16 @@ +import { createIcon } from '../utils' + +export const AssetLoadingIcon = createIcon( + 'AssetLoadingIcon', + + + + + , + '0 0 36 52', +) diff --git a/packages/icons/general/index.ts b/packages/icons/general/index.ts index acc65abe0d1a..a4f47b110fe6 100644 --- a/packages/icons/general/index.ts +++ b/packages/icons/general/index.ts @@ -81,3 +81,4 @@ export * from './Retweet' export * from './Drop' export * from './Right' export * from './Tutorial' +export * from './AssetLoading' diff --git a/packages/mask/src/plugins/Collectible/SNSAdaptor/ArticleTab.tsx b/packages/mask/src/plugins/Collectible/SNSAdaptor/ArticleTab.tsx index c395e666196d..5821a424dd76 100644 --- a/packages/mask/src/plugins/Collectible/SNSAdaptor/ArticleTab.tsx +++ b/packages/mask/src/plugins/Collectible/SNSAdaptor/ArticleTab.tsx @@ -1,9 +1,8 @@ -import type { FC } from 'react' -import { Link } from '@mui/material' import { makeStyles } from '@masknet/theme' -import { Video } from '../../../components/shared/Video' import { CollectibleTab } from './CollectibleTab' import { CollectibleState } from '../hooks/useCollectibleState' +import { AssetPlayer } from '@masknet/shared' +import { useMemo } from 'react' const useStyles = makeStyles()({ body: { @@ -15,44 +14,38 @@ const useStyles = makeStyles()({ maxHeight: '100%', border: 'none', }, + errorPlaceholder: { + padding: '82px 0', + }, + loadingPlaceholder: { + padding: '74px 0', + }, }) -interface AssetPlayerProps { - src?: string - alt: string -} - -// opensea supports: JPG, PNG, GIF, SVG, MP4, WEBM, MP3, WAV, OGG, GLB, GLTF. -const AssetPlayer: FC = ({ src, alt }) => { - const { classes } = useStyles() - if (!src) return null - const isVideo = src.match(/\.(mp4|webm)$/i) - return isVideo ? ( -