From e7678c979af070a23f9f99135f3d1a8a312cd04f Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Sat, 24 Aug 2024 19:41:29 +0300 Subject: [PATCH] M: Improve mobile UI --- rsconcept/frontend/src/app/ApplicationLayout.tsx | 2 +- rsconcept/frontend/src/app/Navigation/Navigation.tsx | 2 +- .../frontend/src/app/Navigation/ToggleNavigation.tsx | 7 ++++--- rsconcept/frontend/src/pages/OssPage/OssTabs.tsx | 9 ++++++++- .../EditorConstituenta/ToolbarConstituenta.tsx | 5 ++++- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/rsconcept/frontend/src/app/ApplicationLayout.tsx b/rsconcept/frontend/src/app/ApplicationLayout.tsx index eb40d64b..7395de5b 100644 --- a/rsconcept/frontend/src/app/ApplicationLayout.tsx +++ b/rsconcept/frontend/src/app/ApplicationLayout.tsx @@ -13,7 +13,7 @@ function ApplicationLayout() {
([]); - useBlockNavigation(isModified); + useBlockNavigation( + isModified && + schema !== undefined && + user !== undefined && + (user.is_staff || user.id == schema.owner || schema.editors.includes(user.id)) + ); useLayoutEffect(() => { if (schema) { diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx index fb47dc8c..d430cac1 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx @@ -49,7 +49,10 @@ function ToolbarConstituenta({ const controller = useRSEdit(); return ( - + {controller.schema && controller.schema?.oss.length > 0 ? (