From d6609e991ec00df83a48f7a8dc470967be8db4ba Mon Sep 17 00:00:00 2001 From: koalasat Date: Sun, 11 May 2025 15:15:28 +0200 Subject: [PATCH] Fix others --- frontend/src/basic/BookPage/index.tsx | 10 +- frontend/src/basic/Main.tsx | 6 +- frontend/src/basic/RobotPage/RobotProfile.tsx | 6 - frontend/src/basic/RobotPage/index.tsx | 2 +- frontend/src/basic/SettingsPage/index.tsx | 8 +- frontend/src/components/BookTable/index.tsx | 99 +---- .../components/Charts/DepthChart/index.tsx | 9 +- .../MakerForm/SelectCoordinator.tsx | 5 +- .../src/components/SettingsForm/index.tsx | 411 +++++++++--------- 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 - 26 files changed, 233 insertions(+), 357 deletions(-) diff --git a/frontend/src/basic/BookPage/index.tsx b/frontend/src/basic/BookPage/index.tsx index 6e8218f4..c0f85147 100644 --- a/frontend/src/basic/BookPage/index.tsx +++ b/frontend/src/basic/BookPage/index.tsx @@ -26,8 +26,8 @@ const BookPage = (): React.JSX.Element => { const doubleView = windowSize.width > 100; const width = windowSize.width * 0.85; - const maxBookTableWidth = width * 0.7; - const chartWidthEm = width * 0.25; + const maxBookTableWidth = width * 0.65; + const chartWidthEm = width * 0.3; const fontSize = theme.typography.fontSize; const onOrderClicked = function (id: number, shortAlias: string): void { @@ -134,19 +134,19 @@ const BookPage = (): React.JSX.Element => { ) : view === 'depth' ? ( ) : view === 'map' ? ( ) : ( ((props) => ({ const Main: React.FC = () => { const { t } = useTranslation(); - const { settings, page, setOpen, windowSize, navbarHeight } = + const { settings, page, setOpen, windowSize, navbarHeight, client } = useContext(AppContext); const { garage } = useContext(GarageContext); return ( - { @@ -67,7 +65,7 @@ const Main: React.FC = () => { <> )} - + diff --git a/frontend/src/basic/RobotPage/RobotProfile.tsx b/frontend/src/basic/RobotPage/RobotProfile.tsx index c53af9e7..f836d2e1 100644 --- a/frontend/src/basic/RobotPage/RobotProfile.tsx +++ b/frontend/src/basic/RobotPage/RobotProfile.tsx @@ -191,12 +191,6 @@ const RobotProfile = ({ 'Reusing trading identity degrades your privacy against other users, coordinators and observers.', )} - - - diff --git a/frontend/src/basic/RobotPage/index.tsx b/frontend/src/basic/RobotPage/index.tsx index 7b19752f..033f811c 100644 --- a/frontend/src/basic/RobotPage/index.tsx +++ b/frontend/src/basic/RobotPage/index.tsx @@ -70,7 +70,7 @@ const RobotPage = (): React.JSX.Element => { - + { overflowX: 'clip', }} > - - - - + + + + diff --git a/frontend/src/components/BookTable/index.tsx b/frontend/src/components/BookTable/index.tsx index fa72e105..41daaf1b 100644 --- a/frontend/src/components/BookTable/index.tsx +++ b/frontend/src/components/BookTable/index.tsx @@ -86,7 +86,7 @@ const BookTable = ({ showNoResults = true, onOrderClicked = () => null, }: BookTableProps): React.JSX.Element => { - const { fav, setOpen } = useContext(AppContext); + const { fav } = useContext(AppContext); const { federation } = useContext(FederationContext); const { t } = useTranslation(); @@ -243,50 +243,6 @@ const BookTable = ({ }; }, []); - const onClickCoordinator = function (shortAlias: string): void { - setOpen((open) => { - const thirdParty = thirdParties[shortAlias]; - if (thirdParty) { - return { ...open, thirdParty: shortAlias }; - } else { - return { ...open, coordinator: shortAlias }; - } - }); - }; - - const coordinatorObj = useCallback((width: number) => { - return { - field: 'coordinatorShortAlias', - headerName: t('Host'), - width: width * fontSize, - renderCell: (params: { row: PublicOrder }) => { - const coordinator = federation.getCoordinator(params.row.coordinatorShortAlias); - const thirdParty = thirdParties[params.row.coordinatorShortAlias]; - return ( - { - onClickCoordinator(params.row.coordinatorShortAlias); - }} - > - - - - - ); - }, - }; - }, []); - const typeObj = useCallback( (width: number) => { return { @@ -628,28 +584,6 @@ const BookTable = ({ }; }, []); - const idObj = useCallback((width: number) => { - return { - field: 'id', - headerName: 'Order ID', - width: width * fontSize, - renderCell: (params: { row: PublicOrder }) => { - return ( -
{ - onOrderClicked(params.row.id, params.row.coordinatorShortAlias); - }} - > - - {`#${String(params.row.id)}`} - -
- ); - }, - }; - }, []); - const bondObj = useCallback((width: number) => { return { field: 'bond_size', @@ -683,7 +617,7 @@ const BookTable = ({ }, currency: { priority: 2, - order: 6, + order: 4, normal: { width: fav.mode === 'swap' ? 0 : 5.9, object: currencyObj, @@ -717,7 +651,7 @@ const BookTable = ({ object: robotObj, }, small: { - width: 5.1, + width: 5, object: robotSmallObj, }, }, @@ -753,25 +687,6 @@ const BookTable = ({ object: satoshisObj, }, }, - coordinatorShortAlias: { - priority: 10, - order: 3, - normal: { - width: 4.1, - object: coordinatorObj, - }, - small: { - width: 5.1, - object: () => { - return { - field: 'coordinatorShortAlias', - headerName: '', - width: 0, - renderCell: () => <>, - }; - }, - }, - }, type: { priority: 11, order: 2, @@ -788,14 +703,6 @@ const BookTable = ({ object: bondObj, }, }, - id: { - priority: 13, - order: 13, - normal: { - width: 4.8, - object: idObj, - }, - }, }; }, [fav.mode]); diff --git a/frontend/src/components/Charts/DepthChart/index.tsx b/frontend/src/components/Charts/DepthChart/index.tsx index b2423d1e..ab4f5e50 100644 --- a/frontend/src/components/Charts/DepthChart/index.tsx +++ b/frontend/src/components/Charts/DepthChart/index.tsx @@ -282,7 +282,14 @@ const DepthChart: React.FC = ({ flexDirection: 'column', }} > - + {center === undefined || enrichedOrders.length < 1 ? (
= ({ 'The provider the lightning and communication infrastructure. The host will be in charge of providing support and solving disputes. The trade fees are set by the host. Make sure to only select order hosts that you trust!', )} > - + = ({ - +