Skip to content
Snippets Groups Projects
  • Viktor Vorobev's avatar
    [NRRPLT-8168] NRP 4.0 Integration · ac7a8e39
    Viktor Vorobev authored
    Squashed commit of the following:
    
    commit 6a168bbc27d387d55555bb22e0fd05953ee63e1a
    Author: Viktor Vorobev <vorobev@in.tum.de>
    Date:   Tue Feb 28 19:28:24 2023 +0100
    
        [NRRPLT-8803] Acknowledgments in README.md
    
    commit 81ae00dfc7e9b412992cd19b1dd4acc69583a2e1
    Author: Viktor Vorobev <vorobev@in.tum.de>
    Date:   Thu Feb 23 12:47:47 2023 +0100
    
        [NRRPLT-8793] Prevent initializing without MQTT
    
    commit 9482de4410a4afbd09332c8fe0f2f4368514d9f6
    Author: Viktor Vorobev <vorobev@in.tum.de>
    Date:   Wed Feb 22 10:54:56 2023 +0100
    
        [NRRPLT-8775] hide binaries in TF
    
    commit 59977bc3ea2a147846e7bee2d29e8c1a22958add
    Author: Viktor Vorobev <vorobev@in.tum.de>
    Date:   Tue Feb 21 17:09:59 2023 +0100
    
        [NRRPLT-8168] Hide mqtt behind proxy in Docker installation
    
    commit 02672f6ff0cfdbc5ad312309574469b4d377a0cc
    Author: Viktor Vorobev <vorobev@in.tum.de>
    Date:   Mon Feb 20 18:25:21 2023 +0100
    
        [NRRPLT-8168] update .dockerfile
    
    commit dbf3bef1cd132e44f96f42637ff59c03a9e6f7f7
    Autho...
    ac7a8e39
leave-workbench-dialog.js 1.33 KiB
import React from 'react';
import {Button } from 'react-bootstrap';
import Modal from 'react-bootstrap/Modal';

import './leave-workbench-dialog.css';

export default class LeaveWorkbenchDialog extends React.Component{
  render(){
    return (
      <div>
        <div>
          <Modal  className='leave-workbench-dialog-wrapper'
            show={this.props.visible} onHide={() => this.props.setVisibility(false)}
          >
            <Modal.Header closeButton className="leave-workbench-dialog-header">
              <Modal.Title>Exit menu</Modal.Title>
            </Modal.Header>
            {this.props.shutdownDisabled ?
              <Modal.Body>Would you like to leave the simulation?</Modal.Body> :
              <Modal.Body>Would you like to leave or shutdown the simulation?</Modal.Body>
            }
            <Modal.Footer>
              <div>
                <Button variant="light" onClick={() => this.props.leaveWorkbench()}>
                  Leave
                </Button>
                <Button
                  disabled={this.props.shutdownDisabled}
                  variant="danger"
                  onClick={() => this.props.shutdownSimulation()}
                >
                  Shutdown
                </Button>
              </div>
            </Modal.Footer>
          </Modal>
        </div>
      </div>
    );
  }
}