feat(ui): show version information in the settings modal

This commit is contained in:
Łukasz Mierzwa
2018-07-24 18:02:19 +02:00
parent a6a09911b8
commit bc3bc4f930
2 changed files with 9 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import { observable, action } from "mobx";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCog } from "@fortawesome/free-solid-svg-icons/faCog";
import { AlertStore } from "Stores/AlertStore";
import { Settings } from "Stores/Settings";
import { Configuration } from "./Configuration";
import { Help } from "./Help";
@@ -35,6 +36,7 @@ const TabNames = Object.freeze({
const MainModal = observer(
class MainModal extends Component {
static propTypes = {
alertStore: PropTypes.instanceOf(AlertStore).isRequired,
settingsStore: PropTypes.instanceOf(Settings).isRequired
};
@@ -70,7 +72,7 @@ const MainModal = observer(
}
render() {
const { settingsStore } = this.props;
const { alertStore, settingsStore } = this.props;
return (
<React.Fragment>
@@ -119,6 +121,11 @@ const MainModal = observer(
<Configuration settingsStore={settingsStore} />
) : null}
</div>
<div className="modal-footer">
<span className="text-muted">
Version: {alertStore.info.version}
</span>
</div>
</div>
</div>
</div>

View File

@@ -38,7 +38,7 @@ const NavBar = observer(
alertStore={alertStore}
settingsStore={settingsStore}
/>
<MainModal settingsStore={settingsStore} />
<MainModal alertStore={alertStore} settingsStore={settingsStore} />
</nav>
</div>
);