From a919cf6baa5a9f28f07d0e8e89ba39ea67b8368e Mon Sep 17 00:00:00 2001
From: Ivan <8611739+IRBorisov@users.noreply.github.com>
Date: Mon, 16 Sep 2024 14:02:27 +0300
Subject: [PATCH] M: Minor UI improvements
---
rsconcept/frontend/src/context/OssContext.tsx | 7 ++++---
.../frontend/src/dialogs/DlgCreateCst/DlgCreateCst.tsx | 2 +-
rsconcept/frontend/src/pages/OssPage/MenuOssTabs.tsx | 2 +-
rsconcept/frontend/src/pages/RSFormPage/MenuRSTabs.tsx | 7 ++++++-
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/rsconcept/frontend/src/context/OssContext.tsx b/rsconcept/frontend/src/context/OssContext.tsx
index 0c4d7584..58aac7ce 100644
--- a/rsconcept/frontend/src/context/OssContext.tsx
+++ b/rsconcept/frontend/src/context/OssContext.tsx
@@ -301,12 +301,13 @@ export const OssState = ({ itemID, children }: OssStateProps) => {
onError: setProcessingError,
onSuccess: newData => {
oss.setData(newData);
- library.localUpdateTimestamp(newData.id);
- if (callback) callback();
+ library.reloadItems(() => {
+ if (callback) callback();
+ });
}
});
},
- [itemID, model, library.localUpdateTimestamp, oss.setData]
+ [itemID, model, library.reloadItems, oss.setData]
);
const updateOperation = useCallback(
diff --git a/rsconcept/frontend/src/dialogs/DlgCreateCst/DlgCreateCst.tsx b/rsconcept/frontend/src/dialogs/DlgCreateCst/DlgCreateCst.tsx
index 4113a389..f220c486 100644
--- a/rsconcept/frontend/src/dialogs/DlgCreateCst/DlgCreateCst.tsx
+++ b/rsconcept/frontend/src/dialogs/DlgCreateCst/DlgCreateCst.tsx
@@ -39,7 +39,7 @@ function DlgCreateCst({ hideWindow, initial, schema, onCreate }: DlgCreateCstPro
canSubmit={validated}
onSubmit={handleSubmit}
submitText='Создать'
- className='cc-column w-[35rem] h-[30rem] py-2 px-6'
+ className='cc-column w-[35rem] max-h-[30rem] py-2 px-6'
>
diff --git a/rsconcept/frontend/src/pages/OssPage/MenuOssTabs.tsx b/rsconcept/frontend/src/pages/OssPage/MenuOssTabs.tsx
index 28cef255..38215c4c 100644
--- a/rsconcept/frontend/src/pages/OssPage/MenuOssTabs.tsx
+++ b/rsconcept/frontend/src/pages/OssPage/MenuOssTabs.tsx
@@ -15,9 +15,9 @@ import {
IconShare
} from '@/components/Icons';
import Button from '@/components/ui/Button';
-import DropdownDivider from '@/components/ui/DropdownDivider';
import Dropdown from '@/components/ui/Dropdown';
import DropdownButton from '@/components/ui/DropdownButton';
+import DropdownDivider from '@/components/ui/DropdownDivider';
import { useAccessMode } from '@/context/AccessModeContext';
import { useAuth } from '@/context/AuthContext';
import { useConceptNavigation } from '@/context/NavigationContext';
diff --git a/rsconcept/frontend/src/pages/RSFormPage/MenuRSTabs.tsx b/rsconcept/frontend/src/pages/RSFormPage/MenuRSTabs.tsx
index 4d3735d5..a7fcb9eb 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/MenuRSTabs.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/MenuRSTabs.tsx
@@ -85,6 +85,11 @@ function MenuRSTabs({ onDestroy }: MenuRSTabsProps) {
controller.share();
}
+ function handleCreateVersion() {
+ schemaMenu.hide();
+ controller.createVersion();
+ }
+
function handleReindex() {
editMenu.hide();
controller.reindex();
@@ -161,7 +166,7 @@ function MenuRSTabs({ onDestroy }: MenuRSTabsProps) {
}
/>