From 7e9effa18c45b7e36ca04588dfa04344cbf11864 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Thu, 10 Apr 2025 11:29:33 -0700 Subject: [PATCH] Fix toolbar styling --- Dockerfile | 1 + frontend/src/App.css | 9 +++++++-- frontend/src/App.tsx | 3 ++- src/utils/defines.py | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f043e7..2f6c3a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -299,6 +299,7 @@ RUN { \ ENV USE_XETLA=OFF ENV SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 ENV SYCL_CACHE_PERSISTENT=1 +ENV PATH=/opt/backstory:$PATH ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/frontend/src/App.css b/frontend/src/App.css index a477280..4068e7a 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -13,7 +13,6 @@ div { .MuiTabs-root .MuiTabs-indicator { background-color: orange; - } .SystemInfo { @@ -50,7 +49,6 @@ div { margin: 0 auto; } - .DocBox { display: flex; flex-direction: column; @@ -74,6 +72,13 @@ div { flex-grow: 1; } +/* Prevent toolbar from shrinking vertically when media < 600px */ +.MuiToolbar-root { + min-height: 56px !important; + padding-left: 16px !important; + padding-right: 16px !important; +} + @media (min-width: 768px) { .Controls { width: 600px; /* or whatever you prefer for a desktop */ diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c6f1d51..10f1b77 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -988,7 +988,8 @@ const App = () => { setTab(newValue); }; - const Offset = styled('div')(({ theme }) => theme.mixins.toolbar); + /* toolbar height is 56px + 8px margin-top */ + const Offset = styled('div')(({ theme }) => ({ ...theme.mixins.toolbar, minHeight: '64px', height: '64px' })); return ( diff --git a/src/utils/defines.py b/src/utils/defines.py index 2dbbe4f..712906e 100644 --- a/src/utils/defines.py +++ b/src/utils/defines.py @@ -8,4 +8,4 @@ persist_directory="/root/.cache/chromadb" max_context = 2048*8*2 doc_dir = "/opt/backstory/docs/" session_dir = "/opt/backstory/sessions" -static_content = '/opt/backstory/frontend/build' \ No newline at end of file +static_content = '/opt/backstory/frontend/deployed' \ No newline at end of file