From ebfac49875c864ef3a02a3485d2f99d3b8deceb0 Mon Sep 17 00:00:00 2001 From: koalasat Date: Sun, 11 May 2025 14:11:15 +0200 Subject: [PATCH] Order view --- .../src/components/OrderDetails/index.tsx | 517 +++++++++--------- .../EncryptedSocketChat/index.tsx | 2 +- .../EncryptedTurtleChat/index.tsx | 2 +- .../components/TradeBox/Prompts/Expired.tsx | 9 +- frontend/src/components/TradeBox/index.tsx | 2 +- frontend/static/locales/ca.json | 2 +- frontend/static/locales/cs.json | 2 +- frontend/static/locales/de.json | 2 +- frontend/static/locales/en.json | 2 +- frontend/static/locales/es.json | 2 +- frontend/static/locales/eu.json | 2 +- frontend/static/locales/fr.json | 2 +- frontend/static/locales/it.json | 2 +- frontend/static/locales/ja.json | 2 +- frontend/static/locales/pl.json | 2 +- frontend/static/locales/pt.json | 2 +- frontend/static/locales/ru.json | 2 +- frontend/static/locales/sv.json | 2 +- frontend/static/locales/sw.json | 2 +- frontend/static/locales/th.json | 2 +- frontend/static/locales/zh-SI.json | 2 +- frontend/static/locales/zh-TR.json | 2 +- 22 files changed, 282 insertions(+), 284 deletions(-) diff --git a/frontend/src/components/OrderDetails/index.tsx b/frontend/src/components/OrderDetails/index.tsx index 07e0f424..ae3a9757 100644 --- a/frontend/src/components/OrderDetails/index.tsx +++ b/frontend/src/components/OrderDetails/index.tsx @@ -259,301 +259,296 @@ const OrderDetails = ({ setOpenWorldmap(false); }} /> - - - { - onClickCoordinator(); - }} - > - - - - - - - - - - {coordinator?.info && !coordinator?.info?.swap_enabled && ( - - - - {t('This coordinator does not support on-chain swaps.')} - - - - )} - - - - - + + { + onClickCoordinator(); + }} + > + + + + + + + + + {coordinator?.info && !coordinator?.info?.swap_enabled && ( + + + + {t('This coordinator does not support on-chain swaps.')} + + + + )} + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + - - + + +
+ +
+
+ 0 ? 'Amount' : 'Amount Range'} + /> + + { + setShowSatsDetails(!showSatsDetails); + }} + > + {showSatsDetails ? : } + + +
+ + + - - - + - + + {satsSummary.send} - - - - - - -
- - - - - - - - -
- -
-
- 0 ? 'Amount' : 'Amount Range'} - /> - - { - setShowSatsDetails(!showSatsDetails); - }} - > - {showSatsDetails ? : } - - -
- - - - - - - - {satsSummary.send} - - - - - - - {satsSummary.receive} - - - - - - - - - - - + - } - secondary={ - currentOrder?.currency === 1000 - ? t('Swap destination') - : t('Accepted payment methods') - } - /> - {currentOrder?.payment_method.includes('Cash F2F') && ( - - -
- { - setOpenWorldmap(true); - }} - > - - -
-
- )} -
- + {satsSummary.receive} + + + - {/* If there is live Price and Premium data, show it. Otherwise show the order maker settings */} - + + + + + + + + } + secondary={ + currentOrder?.currency === 1000 + ? t('Swap destination') + : t('Accepted payment methods') + } + /> + {currentOrder?.payment_method.includes('Cash F2F') && ( - + +
+ { + setOpenWorldmap(true); + }} + > + + +
+
+ )} +
+ - {currentOrder?.price_now !== undefined ? ( - - ) : null} + {/* If there is live Price and Premium data, show it. Otherwise show the order maker settings */} + + + + - {currentOrder?.price_now === undefined && currentOrder?.is_explicit ? ( - - ) : null} + {currentOrder?.price_now !== undefined ? ( + + ) : null} - {currentOrder?.price_now === undefined && !currentOrder?.is_explicit ? ( - - ) : null} - + {currentOrder?.price_now === undefined && currentOrder?.is_explicit ? ( + + ) : null} - + {currentOrder?.price_now === undefined && !currentOrder?.is_explicit ? ( + + ) : null} +
- + + + + - - - - - - - - - - - - - - - - - + - {/* if order is in a status that does not expire, do not show countdown */} - - - - - - - - - - - + + + + - - + + - {/* If the user has a penalty/limit */} - {currentOrder?.penalty !== undefined ? ( - - + {/* if order is in a status that does not expire, do not show countdown */} + + + + + + + - - - ) : ( - <> - )} +
+ + + + - {!currentOrder?.is_participant ? ( - - + + - - ) : ( - <> - )} - + + + ) : ( + <> + )} + + {!currentOrder?.is_participant ? ( + + + + ) : ( + <> + )} ); }; diff --git a/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx b/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx index 17819f6a..b5c4ea1c 100644 --- a/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx +++ b/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx @@ -351,7 +351,7 @@ const EncryptedSocketChat: React.FC = ({ />
- + = ({ /> - + - + + {t(order.expiry_message)} {order.is_maker ? ( - + )} - +