From 2b13ef41d6609f3fde025799fe1c5bd1b911dff1 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 17 May 2021 15:58:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Use=20loading=20in=20BoxReposito?= =?UTF-8?q?ryCreate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nest_frontend/components/interactive/BoxRepositoryCreate.js | 5 ++++- nest_frontend/components/providers/RepositoryEditor.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nest_frontend/components/interactive/BoxRepositoryCreate.js b/nest_frontend/components/interactive/BoxRepositoryCreate.js index 9e63c57..c9997a0 100644 --- a/nest_frontend/components/interactive/BoxRepositoryCreate.js +++ b/nest_frontend/components/interactive/BoxRepositoryCreate.js @@ -19,7 +19,7 @@ import { useHistory } from "react-router" * @returns {JSX.Element} * @constructor */ -export default function BoxRepositoryCreate({ ...props }) { +export default function BoxRepositoryCreate({ running, ...props }) { const { id, evaluationMode, @@ -80,6 +80,7 @@ export default function BoxRepositoryCreate({ ...props }) { icon={faBackward} color={"Red"} onClick={() => revert()} + disabled={running} > Annulla modifiche @@ -88,6 +89,7 @@ export default function BoxRepositoryCreate({ ...props }) { icon={faPencilAlt} color={"Green"} onClick={_ => goToOnSuccess(save, history, "/repositories")()} + disabled={running} > Salva modifiche @@ -98,6 +100,7 @@ export default function BoxRepositoryCreate({ ...props }) { icon={faPlus} color={"Green"} onClick={_ => goToOnSuccess(save, history, "/repositories")()} + disabled={running} > Crea repository diff --git a/nest_frontend/components/providers/RepositoryEditor.js b/nest_frontend/components/providers/RepositoryEditor.js index 51b940b..248b00a 100644 --- a/nest_frontend/components/providers/RepositoryEditor.js +++ b/nest_frontend/components/providers/RepositoryEditor.js @@ -147,7 +147,7 @@ export default function RepositoryEditor({ - + )