From 8682e481fab59e7b4e3f2533d935a0f7650362cc Mon Sep 17 00:00:00 2001 From: Manish Kushare Date: Tue, 29 Mar 2022 21:27:08 +0530 Subject: [PATCH] Made the confirmation modal consistent with the currently applied theme (#2656) * made the confirmation modal consistent with the currently applied theme * made the request confirmation before query run to behave consistently according to applied theme * made confirmation modal of query run consistent with the applied theme --- frontend/src/Editor/Editor.jsx | 2 ++ frontend/src/Editor/Viewer/Confirm.jsx | 10 ++++++++-- frontend/src/HomePage/HomePage.jsx | 1 + frontend/src/_components/ConfirmDialog.jsx | 10 ++++++++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index db57b4eb6f..bc7341fa28 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -973,6 +973,7 @@ class Editor extends React.Component { onConfirm={(queryConfirmationData) => onQueryConfirm(this, queryConfirmationData)} onCancel={() => onQueryCancel(this)} queryConfirmationData={this.state.queryConfirmationData} + darkMode={this.props.darkMode} /> this.executeDataQueryDeletion()} onCancel={() => this.cancelDeleteDataQuery()} + darkMode={this.props.darkMode} />
diff --git a/frontend/src/Editor/Viewer/Confirm.jsx b/frontend/src/Editor/Viewer/Confirm.jsx index 0b825897c4..16f86c1d88 100644 --- a/frontend/src/Editor/Viewer/Confirm.jsx +++ b/frontend/src/Editor/Viewer/Confirm.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import Modal from 'react-bootstrap/Modal'; import Button from 'react-bootstrap/Button'; -export function Confirm({ show, message, onConfirm, onCancel, queryConfirmationData }) { +export function Confirm({ show, message, onConfirm, onCancel, queryConfirmationData, darkMode }) { const [showModal, setShow] = useState(show); useEffect(() => { @@ -21,7 +21,13 @@ export function Confirm({ show, message, onConfirm, onCancel, queryConfirmationD return ( <> - +
{message} diff --git a/frontend/src/HomePage/HomePage.jsx b/frontend/src/HomePage/HomePage.jsx index 47e2a9fa86..bc909c60c6 100644 --- a/frontend/src/HomePage/HomePage.jsx +++ b/frontend/src/HomePage/HomePage.jsx @@ -501,6 +501,7 @@ class HomePage extends React.Component { confirmButtonLoading={isDeletingApp} onConfirm={() => this.executeAppDeletion()} onCancel={() => this.cancelDeleteAppDialog()} + darkMode={this.props.darkMode} /> { @@ -20,7 +20,13 @@ export function ConfirmDialog({ show, message, onConfirm, onCancel, confirmButto return ( <> - +
{message}