Skip to content

Commit 97d53fe

Browse files
committed
Reimplement mono fonts
1 parent dd729ad commit 97d53fe

14 files changed

Lines changed: 44 additions & 27 deletions

File tree

src/app/components/Account/AccountLink.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ const TrimmedAccountLink: FC<
128128
<WithTypographyAndLink scope={scope} address={address} labelOnly={labelOnly}>
129129
<MaybeWithTooltip title={tooltipTitle}>
130130
{showAccountName ? (
131-
<span className="flex items-center gap-1">
131+
<span className="flex items-center gap-1 font-mono font-medium">
132132
<AccountMetadataSourceIndicator source={accountMetadata!.source} />{' '}
133133
{trimLongString(accountName, 12, 0)}
134134
</span>
135135
) : (
136-
trimLongString(address, 6, 6)
136+
<span className="font-mono font-medium">{trimLongString(address, 6, 6)}</span>
137137
)}
138138
</MaybeWithTooltip>
139139
</WithTypographyAndLink>
@@ -155,15 +155,15 @@ const DesktopAccountLink: FC<
155155
<WithTypographyAndLink scope={scope} address={address} labelOnly={labelOnly}>
156156
<MaybeWithTooltip title={tooltipTitle}>
157157
{showAccountName ? (
158-
<div className="flex items-center flex-wrap gap-1">
158+
<div className="flex items-center flex-wrap gap-1 font-mono font-medium">
159159
<span className="inline-flex items-center gap-1">
160160
<AccountMetadataSourceIndicator source={accountMetadata!.source} />
161161
<HighlightedText text={accountName} />
162162
</span>
163163
({address})
164164
</div>
165165
) : (
166-
address
166+
<span className="font-mono font-medium">{address}</span>
167167
)}
168168
</MaybeWithTooltip>
169169
</WithTypographyAndLink>

src/app/components/Blocks/BlockLink.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ export const BlockHashLink: FC<{
2727
// Table view
2828
return (
2929
<MaybeWithTooltip title={hash}>
30-
<Link asChild>
31-
<RouterLink to={to} className="text-primary font-medium">
32-
{trimLongString(hash)}
33-
</RouterLink>
30+
<Link asChild className="font-mono font-medium">
31+
<RouterLink to={to}>{trimLongString(hash)}</RouterLink>
3432
</Link>
3533
</MaybeWithTooltip>
3634
)
@@ -39,7 +37,7 @@ export const BlockHashLink: FC<{
3937
if (!isTablet) {
4038
// Desktop view
4139
return (
42-
<Link asChild className="font-medium">
40+
<Link asChild className="font-mono font-medium">
4341
<RouterLink to={to}>{hash}</RouterLink>
4442
</Link>
4543
)
@@ -48,8 +46,8 @@ export const BlockHashLink: FC<{
4846
// Mobile view
4947
return (
5048
<span className="max-w-full overflow-x-hidden">
51-
<Link asChild>
52-
<RouterLink to={to} className="text-primary font-medium">
49+
<Link asChild className="font-mono font-medium">
50+
<RouterLink to={to}>
5351
<AdaptiveTrimmer text={hash} strategy="middle" minLength={13} />
5452
</RouterLink>
5553
</Link>

src/app/components/Link/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type LinkProps = {
2222
to: string
2323
withSourceIndicator?: boolean
2424
labelOnly?: boolean
25+
mono?: boolean
2526
}
2627

2728
export const Link: FC<LinkProps> = ({
@@ -60,7 +61,7 @@ export const Link: FC<LinkProps> = ({
6061
<MaybeWithTooltip title={tooltipTitle}>
6162
<div className="inline-flex items-center gap-1">
6263
{hasName && withSourceIndicator && <AccountMetadataSourceIndicator source={'SelfProfessed'} />}
63-
<span className={cn('font-medium', !labelOnly && 'text-primary')}>
64+
<span className={cn('font-mono font-medium', !labelOnly && 'text-primary')}>
6465
{isTablet ? (
6566
<TabletLink address={address} name={name} to={to} labelOnly={labelOnly} trimMode={trimMode} />
6667
) : (

src/app/components/LongDataDisplay/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const LongDataDisplay: FC<{ data: string; fontWeight?: number; collapsedL
3737
<span
3838
ref={textRef}
3939
className="
40+
font-mono
4041
font-medium
4142
overflow-hidden
4243
whitespace-pre-wrap

src/app/components/Rofl/RoflAppInstanceLink.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ type RoflAppInstanceLinkProps = {
88
id: string
99
network: Network
1010
rak: string
11+
mono?: boolean
1112
}
1213

13-
export const RoflAppInstanceLink: FC<RoflAppInstanceLinkProps> = ({ alwaysTrim, id, network, rak }) => {
14+
export const RoflAppInstanceLink: FC<RoflAppInstanceLinkProps> = ({ alwaysTrim, id, network, rak, mono }) => {
1415
const to = RouteUtils.getRoflAppInstanceRoute(network, id, rak)
1516

16-
return <Link address={rak} to={to} alwaysTrim={alwaysTrim} withSourceIndicator={false} />
17+
return <Link address={rak} to={to} alwaysTrim={alwaysTrim} withSourceIndicator={false} mono={mono} />
1718
}

src/app/components/Rofl/RoflAppLink.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type RoflAppLinkProps = {
1111
trimMode?: TrimMode
1212
withSourceIndicator?: boolean
1313
labelOnly?: boolean
14+
mono?: boolean
1415
}
1516

1617
export const RoflAppLink: FC<RoflAppLinkProps> = ({

src/app/components/TableCellNode/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ export const TableCellNode: FC<TableCellNodeProps> = ({ id, scope }) => {
2323
return <AccountLink alwaysTrimOnTablet scope={scope} address={getOasisAddressFromBase64PublicKey(id)} />
2424
}
2525

26-
return <span className="font-medium">{isTablet ? trimLongString(id) : id}</span>
26+
return <span className="font-mono font-medium">{isTablet ? trimLongString(id) : id}</span>
2727
}

src/app/components/Transactions/TransactionLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const WithTypographyAndLink: FC<{ children: ReactNode; mobile?: boolean; to: str
1515
mobile,
1616
to,
1717
}) => (
18-
<Link asChild className={cn('font-medium', mobile && 'max-w-[85%]')}>
18+
<Link asChild className={cn('font-mono font-medium', mobile && 'max-w-[85%]')}>
1919
<RouterLink to={to}>{children}</RouterLink>
2020
</Link>
2121
)

src/app/pages/RoflAppDetailsPage/Enclaves.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const Enclaves: FC<EnclavesProps> = ({ policy }) => {
2020
{policy.enclaves.map((enclave: string) => (
2121
<tr key={enclave}>
2222
<td>
23-
<span className="font-medium">{enclave}</span>
23+
<span className="font-mono font-medium">{enclave}</span>
2424
</td>
2525
<td>
2626
<CopyToClipboard value={enclave} />

src/app/pages/RoflAppDetailsPage/InstancesList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const InstancesList: FC<InstancesListProps> = ({
5555
data: [
5656
{
5757
key: 'rak',
58-
content: <RoflAppInstanceLink id={appId} network={scope.network} rak={instance.rak} />,
58+
content: <RoflAppInstanceLink id={appId} network={scope.network} rak={instance.rak} mono />,
5959
},
6060
{
6161
key: 'node',

0 commit comments

Comments
 (0)