Add prominent upgrade button when upgrade is pending
This commit is contained in:
parent
2012fc17d4
commit
9e0f8adb58
2 changed files with 15 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { formatCredits } from "util/formatCredits";
|
import { formatCredits } from "util/formatCredits";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { selectUpgradeSkipped } from "selectors/app";
|
||||||
import {
|
import {
|
||||||
selectIsBackDisabled,
|
selectIsBackDisabled,
|
||||||
selectIsForwardDisabled,
|
selectIsForwardDisabled,
|
||||||
|
@ -19,8 +20,8 @@ const select = state => ({
|
||||||
isForwardDisabled: selectIsForwardDisabled(state),
|
isForwardDisabled: selectIsForwardDisabled(state),
|
||||||
balance: formatCredits(selectBalance(state) || 0, 1),
|
balance: formatCredits(selectBalance(state) || 0, 1),
|
||||||
publish: __("Publish"),
|
publish: __("Publish"),
|
||||||
upgrade: __("Upgrade"),
|
upgradeLabel: __("Upgrade App"),
|
||||||
upgradeSkipped: true,
|
upgradeSkipped: selectUpgradeSkipped(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -80,17 +80,18 @@ export const Header = props => {
|
||||||
title={__("Settings")}
|
title={__("Settings")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<rem>HEY I'M HER E</rem>
|
{upgradeSkipped ? (
|
||||||
{upgradeSkipped
|
<div className="header__item">
|
||||||
? <div className="header__item">
|
<Link
|
||||||
<Link
|
onClick={() => downloadUpgrade()}
|
||||||
onClick={() => downloadUpgrade()}
|
button="primary button--flat"
|
||||||
button="primary button--flat"
|
icon="icon-arrow-up"
|
||||||
icon="icon-upload"
|
label={upgradeLabel}
|
||||||
label={upgradeLabel}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
) : (
|
||||||
: ""}
|
""
|
||||||
|
)}
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue