2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
|
|
|
import Link from 'component/link';
|
|
|
|
import WunderBar from 'component/wunderbar';
|
2017-05-04 05:44:08 +02:00
|
|
|
|
2017-06-06 06:21:55 +02:00
|
|
|
export const Header = props => {
|
2017-08-16 01:29:55 +02:00
|
|
|
const {
|
|
|
|
balance,
|
|
|
|
back,
|
|
|
|
forward,
|
|
|
|
isBackDisabled,
|
|
|
|
isForwardDisabled,
|
2017-11-15 02:51:06 +01:00
|
|
|
isUpgradeAvailable,
|
2017-08-16 01:29:55 +02:00
|
|
|
navigate,
|
2017-11-15 02:51:06 +01:00
|
|
|
downloadUpgrade,
|
2017-08-16 01:29:55 +02:00
|
|
|
} = props;
|
2017-06-06 23:19:12 +02:00
|
|
|
return (
|
|
|
|
<header id="header">
|
|
|
|
<div className="header__item">
|
2017-08-08 06:10:42 +02:00
|
|
|
<Link
|
|
|
|
onClick={back}
|
2017-08-16 01:29:55 +02:00
|
|
|
disabled={isBackDisabled}
|
2017-08-08 06:10:42 +02:00
|
|
|
button="alt button--flat"
|
|
|
|
icon="icon-arrow-left"
|
2017-12-21 22:08:54 +01:00
|
|
|
title={__('Back')}
|
2017-08-08 06:10:42 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
|
|
|
onClick={forward}
|
2017-08-16 01:29:55 +02:00
|
|
|
disabled={isForwardDisabled}
|
2017-08-08 06:10:42 +02:00
|
|
|
button="alt button--flat"
|
|
|
|
icon="icon-arrow-right"
|
2017-12-21 22:08:54 +01:00
|
|
|
title={__('Forward')}
|
2017-08-08 06:10:42 +02:00
|
|
|
/>
|
2017-06-06 23:19:12 +02:00
|
|
|
</div>
|
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
2017-12-21 22:08:54 +01:00
|
|
|
onClick={() => navigate('/discover')}
|
2017-06-06 23:19:12 +02:00
|
|
|
button="alt button--flat"
|
|
|
|
icon="icon-home"
|
2017-12-21 22:08:54 +01:00
|
|
|
title={__('Discover Content')}
|
2017-06-06 23:19:12 +02:00
|
|
|
/>
|
|
|
|
</div>
|
2017-12-08 21:14:35 +01:00
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
2017-12-22 02:21:22 +01:00
|
|
|
onClick={() => navigate('/subscriptions')}
|
2017-12-08 21:14:35 +01:00
|
|
|
button="alt button--flat"
|
|
|
|
icon="icon-at"
|
2017-12-22 02:21:22 +01:00
|
|
|
title={__('My Subscriptions')}
|
2017-12-08 21:14:35 +01:00
|
|
|
/>
|
|
|
|
</div>
|
2017-06-06 23:19:12 +02:00
|
|
|
<div className="header__item header__item--wunderbar">
|
|
|
|
<WunderBar />
|
|
|
|
</div>
|
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
2017-12-21 22:08:54 +01:00
|
|
|
onClick={() => navigate('/wallet')}
|
2017-06-06 23:19:12 +02:00
|
|
|
button="text"
|
2017-10-05 05:07:04 +02:00
|
|
|
className="no-underline"
|
2017-06-06 23:19:12 +02:00
|
|
|
icon="icon-bank"
|
|
|
|
label={balance}
|
2017-12-21 22:08:54 +01:00
|
|
|
title={__('Wallet')}
|
2017-06-06 23:19:12 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
2017-12-21 22:08:54 +01:00
|
|
|
onClick={() => navigate('/publish')}
|
2017-06-06 23:19:12 +02:00
|
|
|
button="primary button--flat"
|
|
|
|
icon="icon-upload"
|
2017-12-21 22:08:54 +01:00
|
|
|
label={__('Publish')}
|
2017-06-06 23:19:12 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
2017-12-21 22:08:54 +01:00
|
|
|
onClick={() => navigate('/downloaded')}
|
2017-06-06 23:19:12 +02:00
|
|
|
button="alt button--flat"
|
|
|
|
icon="icon-folder"
|
2017-12-21 22:08:54 +01:00
|
|
|
title={__('Downloads and Publishes')}
|
2017-06-06 23:19:12 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="header__item">
|
|
|
|
<Link
|
2017-12-21 22:08:54 +01:00
|
|
|
onClick={() => navigate('/settings')}
|
2017-06-06 23:19:12 +02:00
|
|
|
button="alt button--flat"
|
|
|
|
icon="icon-gear"
|
2017-12-21 22:08:54 +01:00
|
|
|
title={__('Settings')}
|
2017-06-06 23:19:12 +02:00
|
|
|
/>
|
|
|
|
</div>
|
2017-11-15 02:51:06 +01:00
|
|
|
{isUpgradeAvailable && (
|
|
|
|
<Link
|
|
|
|
onClick={() => downloadUpgrade()}
|
|
|
|
button="primary button--flat"
|
|
|
|
icon="icon-arrow-up"
|
2017-12-21 22:08:54 +01:00
|
|
|
label={__('Upgrade App')}
|
2017-11-15 02:51:06 +01:00
|
|
|
/>
|
2017-11-10 15:55:34 +01:00
|
|
|
)}
|
2017-06-06 23:19:12 +02:00
|
|
|
</header>
|
|
|
|
);
|
2017-06-06 06:21:55 +02:00
|
|
|
};
|
2016-08-27 16:12:56 +02:00
|
|
|
|
2016-11-22 21:19:08 +01:00
|
|
|
export default Header;
|