From aad6bb26623308753d23ef38a0b32ff26f7933d5 Mon Sep 17 00:00:00 2001 From: Mikhail Chechnev Date: Wed, 23 Jul 2025 01:24:15 +0300 Subject: [PATCH] =?UTF-8?q?WEBAPP:=20=D0=9A=D0=BE=D0=BD=D1=82=D0=B5=D0=B9?= =?UTF-8?q?=D0=BD=D0=B5=D1=80=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B0=20-=20=D1=81=D0=BE=D0=BA=D1=80=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D0=B8=20=D1=81=D0=BE?= =?UTF-8?q?=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/editors/p8p_editor_box.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/components/editors/p8p_editor_box.js b/app/components/editors/p8p_editor_box.js index 46ffcf6..9f01da4 100644 --- a/app/components/editors/p8p_editor_box.js +++ b/app/components/editors/p8p_editor_box.js @@ -21,6 +21,9 @@ const P8PEditorBox = ({ title, children, onSave }) => { //При нажатии на "Сохранить" const handleSaveClick = (closeEditor = false) => onSave && onSave(closeEditor); + //Флаг отображения кнопок сохранения + const showSaveBar = onSave ? true : false; + //Формирование представления return ( @@ -28,14 +31,16 @@ const P8PEditorBox = ({ title, children, onSave }) => { {children} - - handleSaveClick(false)} title={BUTTONS.APPLY}> - done - - handleSaveClick(true)} title={BUTTONS.SAVE}> - done_all - - + {showSaveBar && ( + + handleSaveClick(false)} title={BUTTONS.APPLY}> + done + + handleSaveClick(true)} title={BUTTONS.SAVE}> + done_all + + + )} ); };