From feb19bdea9d1ce2893c4633949dddbff77f2f83d Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Thu, 9 Nov 2017 21:07:02 -0300 Subject: [PATCH] Add App upgrade button to the header --- ui/js/component/header/index.js | 4 ++++ ui/js/component/header/view.jsx | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ui/js/component/header/index.js b/ui/js/component/header/index.js index 08d5bb9cb..5c2cf9dac 100644 --- a/ui/js/component/header/index.js +++ b/ui/js/component/header/index.js @@ -11,6 +11,7 @@ import { doHistoryBack, doHistoryForward, } from "actions/navigation"; +import { doDownloadUpgrade } from "actions/app"; import Header from "./view"; const select = state => ({ @@ -18,12 +19,15 @@ const select = state => ({ isForwardDisabled: selectIsForwardDisabled(state), balance: formatCredits(selectBalance(state) || 0, 1), publish: __("Publish"), + upgrade: __("Upgrade"), + upgradeSkipped: true, }); const perform = dispatch => ({ navigate: path => dispatch(doNavigate(path)), back: () => dispatch(doHistoryBack()), forward: () => dispatch(doHistoryForward()), + downloadUpgrade: () => dispatch(doDownloadUpgrade()), }); export default connect(select, perform)(Header); diff --git a/ui/js/component/header/view.jsx b/ui/js/component/header/view.jsx index 89f6df923..c5308029e 100644 --- a/ui/js/component/header/view.jsx +++ b/ui/js/component/header/view.jsx @@ -6,11 +6,14 @@ export const Header = props => { const { balance, back, + downloadUpgrade, forward, isBackDisabled, isForwardDisabled, navigate, publish, + upgradeLabel, + upgradeSkipped, } = props; return ( ); };