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

View File

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