@@ -3,7 +3,6 @@ import { Trans, useTranslation } from 'react-i18next'
33import { styled } from '@mui/material/styles'
44import Card from '@mui/material/Card'
55import CardContent from '@mui/material/CardContent'
6- import Grid from '@mui/material/Grid'
76import Link from '@mui/material/Link'
87import OpenInNewIcon from '@mui/icons-material/OpenInNew'
98import { RoflAppMetadata } from '../../../oasis-nexus/api'
@@ -38,58 +37,63 @@ export const MetaDataCard: FC<MetaDataCardProps> = ({ isFetched, metadata }) =>
3837
3938 return (
4039 < Card sx = { { flex : 1 } } >
41- < div className = "flex items-center gap-5 mb-4" >
42- < Typography variant = "h3" > { t ( 'rofl.metadata' ) } </ Typography >
43- < Typography variant = "xsmall" textColor = "muted" >
40+ < div className = "grid grid-cols-3 mb-4 gap-2" >
41+ < Typography variant = "h3" className = "col-span-1" >
42+ { t ( 'rofl.metadata' ) }
43+ </ Typography >
44+ < Typography variant = "xsmall" className = "col-span-2 flex items-center" textColor = "muted" >
4445 { t ( 'rofl.metadataInfo' ) }
4546 </ Typography >
4647 </ div >
4748 < CardContent >
4849 { isFetched && ! metadata && < EmptyStateCard /> }
4950 { metadata && (
50- < >
51- < Grid container spacing = { 4 } >
52- < GridRow label = { t ( 'rofl.roflName' ) } > { metadata [ 'net.oasis.rofl.name' ] } </ GridRow >
53- < GridRow label = { t ( 'rofl.description' ) } > { metadata [ 'net.oasis.rofl.description' ] } </ GridRow >
54- < GridRow label = { t ( 'rofl.author' ) } > { email ? < Email email = { email } /> : undefined } </ GridRow >
55- < GridRow label = { t ( 'rofl.license' ) } > { metadata [ 'net.oasis.rofl.license' ] } </ GridRow >
56- < GridRow label = { t ( 'rofl.homePage' ) } >
57- { ! homepage ? undefined : (
58- < >
59- { isUrlSafe ( homepage ) && (
60- < StyledLink href = { homepage } rel = "noopener noreferrer" target = "_blank" >
61- { homepage } < OpenInNewIcon sx = { { fontSize : 20 } } />
62- </ StyledLink >
63- ) }
64- { isTwitterHandle ( homepage ) && < XProfileWidget handle = { homepage } /> }
65- { isDiscordHandle ( homepage ) && < DiscordProfileWidget handle = { homepage } /> }
66- </ >
67- ) }
68- </ GridRow >
69- < GridRow
70- label = { t ( 'rofl.repositoryUrl' ) }
71- tooltip = {
72- < Trans
73- i18nKey = "rofl.verifyCommand"
74- t = { t }
75- components = { {
76- Command : < span className = "font-mono" > oasis rofl build --verify</ span > ,
77- } }
78- />
79- }
80- >
81- { isUrlSafe ( metadata [ 'net.oasis.rofl.repository' ] ) ? (
82- < StyledLink
83- href = { metadata [ 'net.oasis.rofl.repository' ] }
84- rel = "noopener noreferrer"
85- target = "_blank"
86- >
87- { metadata [ 'net.oasis.rofl.repository' ] } < OpenInNewIcon sx = { { fontSize : 20 } } />
88- </ StyledLink >
89- ) : undefined }
90- </ GridRow >
91- </ Grid >
92- </ >
51+ < div className = "grid grid-cols-3" >
52+ < GridRow label = { t ( 'rofl.roflName' ) } > { metadata [ 'net.oasis.rofl.name' ] } </ GridRow >
53+
54+ < GridRow label = { t ( 'rofl.description' ) } > { metadata [ 'net.oasis.rofl.description' ] } </ GridRow >
55+
56+ < GridRow label = { t ( 'rofl.author' ) } > { email ? < Email email = { email } /> : undefined } </ GridRow >
57+
58+ < GridRow label = { t ( 'rofl.license' ) } > { metadata [ 'net.oasis.rofl.license' ] } </ GridRow >
59+
60+ < GridRow label = { t ( 'rofl.homePage' ) } >
61+ { ! homepage ? undefined : (
62+ < >
63+ { isUrlSafe ( homepage ) && (
64+ < StyledLink href = { homepage } rel = "noopener noreferrer" target = "_blank" >
65+ { homepage } < OpenInNewIcon className = "text-base" />
66+ </ StyledLink >
67+ ) }
68+ { isTwitterHandle ( homepage ) && < XProfileWidget handle = { homepage } /> }
69+ { isDiscordHandle ( homepage ) && < DiscordProfileWidget handle = { homepage } /> }
70+ </ >
71+ ) }
72+ </ GridRow >
73+
74+ < GridRow
75+ label = { t ( 'rofl.repositoryUrl' ) }
76+ tooltip = {
77+ < Trans
78+ i18nKey = "rofl.verifyCommand"
79+ t = { t }
80+ components = { {
81+ Command : < span className = "font-mono" > oasis rofl build --verify</ span > ,
82+ } }
83+ />
84+ }
85+ >
86+ { isUrlSafe ( metadata [ 'net.oasis.rofl.repository' ] ) ? (
87+ < StyledLink
88+ href = { metadata [ 'net.oasis.rofl.repository' ] }
89+ rel = "noopener noreferrer"
90+ target = "_blank"
91+ >
92+ { metadata [ 'net.oasis.rofl.repository' ] } < OpenInNewIcon className = "text-base" />
93+ </ StyledLink >
94+ ) : undefined }
95+ </ GridRow >
96+ </ div >
9397 ) }
9498 </ CardContent >
9599 </ Card >
0 commit comments