* removed duplicate user object removed id field which is never populated added help modal in applications page and intercom to load in help modal shutdown intercom on signout to clear existing chats * added analytics to help modal and invite user unescaped bindings before evaluation to prune newlines * updated action confirmation text * added a check to ignore old properties which are no longer dynamic * fixed test case * fix tests Co-authored-by: Nikhil Nandagopal <nikhil@appsmith.com> Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
64 lines
1.6 KiB
TypeScript
64 lines
1.6 KiB
TypeScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import { AppState } from "reducers";
|
|
import { Dialog, Classes } from "@blueprintjs/core";
|
|
import Button from "components/editorComponents/Button";
|
|
import {
|
|
showRunActionConfirmModal,
|
|
cancelRunActionConfirmModal,
|
|
acceptRunActionConfirmModal,
|
|
} from "actions/actionActions";
|
|
|
|
type Props = {
|
|
isModalOpen: boolean;
|
|
dispatch: any;
|
|
};
|
|
|
|
class ConfirmRunModal extends React.Component<Props> {
|
|
render() {
|
|
const { dispatch, isModalOpen } = this.props;
|
|
const handleClose = () => {
|
|
dispatch(showRunActionConfirmModal(false));
|
|
|
|
dispatch(cancelRunActionConfirmModal());
|
|
};
|
|
|
|
return (
|
|
<Dialog title="Confirm Action" isOpen={isModalOpen} onClose={handleClose}>
|
|
<div className={Classes.DIALOG_BODY}>
|
|
Are you sure you want to perform this action?
|
|
</div>
|
|
<div className={Classes.DIALOG_FOOTER}>
|
|
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
|
<Button
|
|
filled
|
|
text="Cancel"
|
|
onClick={() => {
|
|
dispatch(cancelRunActionConfirmModal());
|
|
|
|
handleClose();
|
|
}}
|
|
/>
|
|
<Button
|
|
filled
|
|
text="Confirm"
|
|
intent="primary"
|
|
onClick={() => {
|
|
dispatch(acceptRunActionConfirmModal());
|
|
|
|
handleClose();
|
|
}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</Dialog>
|
|
);
|
|
}
|
|
}
|
|
|
|
const mapStateToProps = (state: AppState) => ({
|
|
isModalOpen: state.ui.confirmRunAction.modalOpen,
|
|
});
|
|
|
|
export default connect(mapStateToProps)(ConfirmRunModal);
|