Merge pull request #2129 from RoboSats/small-ui-tweaks

Show alwasy the price line on Maker Form
This commit is contained in:
KoalaSat
2025-07-31 12:31:28 +00:00
committed by GitHub
2 changed files with 24 additions and 11 deletions

View File

@ -20,7 +20,7 @@ import {
} from '@mui/material';
import { AddCircleOutline, RemoveCircleOutline } from '@mui/icons-material';
import { useTranslation } from 'react-i18next';
import type PublicOrder from '../../../models';
import { type PublicOrder } from '../../../models';
import { matchMedian } from '../../../utils';
import currencyDict from '../../../../static/assets/currencies.json';
import getNivoScheme from '../NivoScheme';

View File

@ -19,6 +19,7 @@ import {
useTheme,
Collapse,
IconButton,
Skeleton,
} from '@mui/material';
import { type LimitList, defaultMaker, type Order } from '../../models';
@ -1082,19 +1083,31 @@ const MakerForm = ({
</Typography>
</Grid>
<Collapse in={!(Object.keys(limits).length === 0)}>
<Tooltip
placement='top'
enterTouchDelay={0}
enterDelay={1000}
enterNextDelay={2000}
title={t("Your order's current exchange rate. Rate will move with the market.")}
>
<Tooltip
placement='top'
enterTouchDelay={0}
enterDelay={1000}
enterNextDelay={2000}
title={t("Your order's current exchange rate. Rate will move with the market.")}
>
{currentPrice ? (
<Typography align='center' variant='caption' color='text.secondary'>
{`${t('Order current rate:')} ${currentPrice ? currencyFormatter.format(currentPrice) : '-'} ${currencyCode}/BTC`}
</Typography>
</Tooltip>
</Collapse>
) : (
<Typography
align='center'
variant='caption'
color='text.secondary'
display='flex'
flexDirection='row'
>
{t('Order current rate:')}
<Skeleton width='4.5em' />
{`${currencyCode}/BTC`}
</Typography>
)}
</Tooltip>
</Grid>
<AddNewPaymentMethodDialog
open={addNewPaymentMethodOpen}