M: Minor UI improvements
This commit is contained in:
parent
3e707eb933
commit
a919cf6baa
|
@ -301,12 +301,13 @@ export const OssState = ({ itemID, children }: OssStateProps) => {
|
||||||
onError: setProcessingError,
|
onError: setProcessingError,
|
||||||
onSuccess: newData => {
|
onSuccess: newData => {
|
||||||
oss.setData(newData);
|
oss.setData(newData);
|
||||||
library.localUpdateTimestamp(newData.id);
|
library.reloadItems(() => {
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[itemID, model, library.localUpdateTimestamp, oss.setData]
|
[itemID, model, library.reloadItems, oss.setData]
|
||||||
);
|
);
|
||||||
|
|
||||||
const updateOperation = useCallback(
|
const updateOperation = useCallback(
|
||||||
|
|
|
@ -39,7 +39,7 @@ function DlgCreateCst({ hideWindow, initial, schema, onCreate }: DlgCreateCstPro
|
||||||
canSubmit={validated}
|
canSubmit={validated}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
submitText='Создать'
|
submitText='Создать'
|
||||||
className='cc-column w-[35rem] h-[30rem] py-2 px-6'
|
className='cc-column w-[35rem] max-h-[30rem] py-2 px-6'
|
||||||
>
|
>
|
||||||
<FormCreateCst schema={schema} state={cstData} partialUpdate={updateCstData} setValidated={setValidated} />
|
<FormCreateCst schema={schema} state={cstData} partialUpdate={updateCstData} setValidated={setValidated} />
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -15,9 +15,9 @@ import {
|
||||||
IconShare
|
IconShare
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import Button from '@/components/ui/Button';
|
import Button from '@/components/ui/Button';
|
||||||
import DropdownDivider from '@/components/ui/DropdownDivider';
|
|
||||||
import Dropdown from '@/components/ui/Dropdown';
|
import Dropdown from '@/components/ui/Dropdown';
|
||||||
import DropdownButton from '@/components/ui/DropdownButton';
|
import DropdownButton from '@/components/ui/DropdownButton';
|
||||||
|
import DropdownDivider from '@/components/ui/DropdownDivider';
|
||||||
import { useAccessMode } from '@/context/AccessModeContext';
|
import { useAccessMode } from '@/context/AccessModeContext';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NavigationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
|
|
|
@ -85,6 +85,11 @@ function MenuRSTabs({ onDestroy }: MenuRSTabsProps) {
|
||||||
controller.share();
|
controller.share();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleCreateVersion() {
|
||||||
|
schemaMenu.hide();
|
||||||
|
controller.createVersion();
|
||||||
|
}
|
||||||
|
|
||||||
function handleReindex() {
|
function handleReindex() {
|
||||||
editMenu.hide();
|
editMenu.hide();
|
||||||
controller.reindex();
|
controller.reindex();
|
||||||
|
@ -161,7 +166,7 @@ function MenuRSTabs({ onDestroy }: MenuRSTabsProps) {
|
||||||
<DropdownButton
|
<DropdownButton
|
||||||
text='Сохранить версию'
|
text='Сохранить версию'
|
||||||
disabled={!controller.isContentEditable}
|
disabled={!controller.isContentEditable}
|
||||||
onClick={controller.createVersion}
|
onClick={handleCreateVersion}
|
||||||
icon={<IconNewVersion size='1rem' className='icon-green' />}
|
icon={<IconNewVersion size='1rem' className='icon-green' />}
|
||||||
/>
|
/>
|
||||||
<DropdownButton
|
<DropdownButton
|
||||||
|
|
Loading…
Reference in New Issue
Block a user