From 17bc47750dba434b708908e09c2e3ab79bd8be74 Mon Sep 17 00:00:00 2001 From: koalasat Date: Sat, 10 May 2025 20:22:37 +0200 Subject: [PATCH] Fix Table --- frontend/src/basic/BookPage/index.tsx | 38 +++++--- .../src/components/BookTable/BookControl.tsx | 15 ++- frontend/src/components/BookTable/index.tsx | 95 ++++++++++--------- .../components/Charts/DepthChart/index.tsx | 21 ++-- .../src/components/Charts/MapChart/index.tsx | 16 ++-- .../src/components/FederationTable/index.tsx | 1 - frontend/src/pro/Widgets/Book.tsx | 1 - frontend/src/pro/Widgets/Depth.tsx | 1 - 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 - 25 files changed, 96 insertions(+), 126 deletions(-) diff --git a/frontend/src/basic/BookPage/index.tsx b/frontend/src/basic/BookPage/index.tsx index 2509775d..6e8218f4 100644 --- a/frontend/src/basic/BookPage/index.tsx +++ b/frontend/src/basic/BookPage/index.tsx @@ -1,6 +1,6 @@ import React, { useContext, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { Button, Grid, ButtonGroup } from '@mui/material'; +import { Button, Grid, ButtonGroup, useTheme } from '@mui/material'; import { useNavigate } from 'react-router-dom'; import DepthChart from '../../components/Charts/DepthChart'; import BookTable from '../../components/BookTable'; @@ -17,16 +17,18 @@ import { type PublicOrder } from '../../models'; const BookPage = (): React.JSX.Element => { const { windowSize } = useContext(AppContext); const { federation } = useContext(FederationContext); + const theme = useTheme(); const { t } = useTranslation(); const navigate = useNavigate(); const [view, setView] = useState<'list' | 'depth' | 'map'>('list'); const [openVisitThirdParty, setOpenVisitThirdParty] = useState(false); const [thirdPartyOrder, setThirdPartyOrder] = useState(); - const doubleView = windowSize.width > 115; - const width = windowSize.width * 0.9; - const maxBookTableWidth = 85; - const chartWidthEm = width - maxBookTableWidth; + const doubleView = windowSize.width > 100; + const width = windowSize.width * 0.85; + const maxBookTableWidth = width * 0.7; + const chartWidthEm = width * 0.25; + const fontSize = theme.typography.fontSize; const onOrderClicked = function (id: number, shortAlias: string): void { const thirdParty = thirdParties[shortAlias]; @@ -51,6 +53,8 @@ const BookPage = (): React.JSX.Element => { ) : ( <>