diff --git a/rsconcept/frontend/src/components/man/HelpVersions.tsx b/rsconcept/frontend/src/components/man/HelpVersions.tsx index 141ca749..c8da905c 100644 --- a/rsconcept/frontend/src/components/man/HelpVersions.tsx +++ b/rsconcept/frontend/src/components/man/HelpVersions.tsx @@ -1,12 +1,12 @@ function HelpVersions() { // prettier-ignore return ( -
+

Версионирование схем

Версионирование позволяет сохранить текущее состояние схемы под определенным именем (версией) и использовать ссылку на него для совместной работы. После создания версии ее содержание изменить нельзя

-

Владелец обладает правом редактирования названий и создания новых версий

+

Владелец обладает правом редактирования названий и создания новых версий

Управление версиями происходит в Карточке схемы

-

Функция Поделиться включает текущую выбранную версию в ссылку

+

Функция Поделиться включает версию в ссылку

); } diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ConstituentaToolbar.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ConstituentaToolbar.tsx index 12690696..82b9ecf9 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ConstituentaToolbar.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ConstituentaToolbar.tsx @@ -6,7 +6,7 @@ import { FiSave } from 'react-icons/fi'; import MiniButton from '@/components/ui/MiniButton'; import Overlay from '@/components/ui/Overlay'; -import { prepareTooltip } from '@/utils/labels'; +import { messages, prepareTooltip } from '@/utils/labels'; interface ConstituentaToolbarProps { isMutable: boolean; @@ -55,7 +55,7 @@ function ConstituentaToolbar({ icon={} /> } diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ControlsOverlay.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ControlsOverlay.tsx index aece4992..7837a25f 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ControlsOverlay.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ControlsOverlay.tsx @@ -4,25 +4,37 @@ import { LiaEdit } from 'react-icons/lia'; import MiniButton from '@/components/ui/MiniButton'; import Overlay from '@/components/ui/Overlay'; import { IConstituenta } from '@/models/rsform'; +import { messages } from '@/utils/labels'; interface ControlsOverlayProps { constituenta?: IConstituenta; isMutable: boolean; + isModified: boolean; processing: boolean; onRename: () => void; onEditTerm: () => void; } -function ControlsOverlay({ constituenta, isMutable, processing, onRename, onEditTerm }: ControlsOverlayProps) { +function ControlsOverlay({ + constituenta, + isMutable, + isModified, + processing, + onRename, + onEditTerm +}: ControlsOverlayProps) { return ( {isMutable || processing ? ( } + disabled={isModified} /> ) : null}
} + disabled={isModified} /> ) : null} diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx index a6d5ae42..6c4a2b3e 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx @@ -115,6 +115,7 @@ function FormConstituenta({
} diff --git a/rsconcept/frontend/src/utils/labels.ts b/rsconcept/frontend/src/utils/labels.ts index bdd78b31..17b17ef9 100644 --- a/rsconcept/frontend/src/utils/labels.ts +++ b/rsconcept/frontend/src/utils/labels.ts @@ -62,6 +62,13 @@ export function labelConstituenta(cst: IConstituenta) { return `${cst.alias}: ${describeConstituenta(cst)}`; } +/** + * Generate HTML wrapper for control description including hotkey. + */ +export function prepareTooltip(text: string, hotkey?: string) { + return hotkey ? `[${hotkey}]
${text}` : text; +} + /** * Generates label for {@link IVersionInfo} of {@link IRSForm}. */ @@ -747,8 +754,8 @@ export function describeAccessMode(mode: UserAccessMode): string { } /** - * Generate HTML wrapper for control description including hotkey. + * UI shared messages. */ -export function prepareTooltip(text: string, hotkey?: string) { - return hotkey ? `[${hotkey}]
${text}` : text; -} +export const messages = { + unsaved: 'Сохраните или отмените изменения' +};