Skip to content

Commit

Permalink
Refactor actions, add version to login screen (issue #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
hidden4003 committed Aug 11, 2016
1 parent 7825cc4 commit 83bf560
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 472 deletions.
6 changes: 2 additions & 4 deletions components/Buttons/UpdateButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { PropTypes } from 'react';
import cx from 'classnames';
import store from '../../core/store';
import { fetchWebuiVersionUpdate } from '../../core/actions';
import { updateWebuiAsync } from '../../core/actions';

class UpdateButton extends React.Component {
static propTypes = {
Expand All @@ -14,8 +13,7 @@ class UpdateButton extends React.Component {
}

handleClick() {
let state = store.getState();
store.dispatch(fetchWebuiVersionUpdate(state.activeApiKey));
updateWebuiAsync();
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SidebarToggle from '../Buttons/SidebarToggle';
import UpdateButton from '../Buttons/UpdateButton';
import Notifications from './Notifications';


class Header extends React.Component {
render() {
const { countHasher, countGeneral, countImages, autoUpdate, sidebarToggle, updateAvailable } = this.props;
Expand All @@ -24,7 +25,6 @@ class Header extends React.Component {
<UpdateButton enabled={updateAvailable} />
</ul>
</div>

<div className="nav notifications pull-right">
<ul className="nav">
<Notifications/>
Expand Down
Loading

0 comments on commit 83bf560

Please sign in to comment.