add forward button
add forward history diseable conditionals fix last commit update CHANGELOG.md
This commit is contained in:
parent
7cf491c050
commit
86b4f8e82c
4 changed files with 27 additions and 4 deletions
|
@ -10,8 +10,9 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
|||
### Added
|
||||
* Added a new component, `FormFieldPrice` which is now used in Publish and Settings
|
||||
* Added wallet backup guide reference
|
||||
* Added feature: forward history
|
||||
*
|
||||
|
||||
|
||||
### Changed
|
||||
* Updated to daemon [0.15](https://github.com/lbryio/lbry/releases). Most relevant changes for app are improved announcing of content and a fix for the daemon getting stuck running.
|
||||
* Some form field refactoring as we progress towards form sanity.
|
||||
|
|
|
@ -84,6 +84,14 @@ export function doHistoryBack() {
|
|||
};
|
||||
}
|
||||
|
||||
export function doHistoryForward() {
|
||||
return function(dispatch, getState) {
|
||||
if (!history.state) return;
|
||||
|
||||
history.forward();
|
||||
};
|
||||
}
|
||||
|
||||
export function doHistoryPush(currentState, title, relativeUrl) {
|
||||
return function(dispatch, getState) {
|
||||
title += " - LBRY";
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
import { formatCredits } from "utils";
|
||||
import { connect } from "react-redux";
|
||||
import { selectBalance } from "selectors/wallet";
|
||||
import { doNavigate, doHistoryBack } from "actions/app";
|
||||
import { doNavigate, doHistoryBack, doHistoryForward } from "actions/app";
|
||||
import Header from "./view";
|
||||
|
||||
const select = state => ({
|
||||
|
@ -13,6 +13,7 @@ const select = state => ({
|
|||
const perform = dispatch => ({
|
||||
navigate: path => dispatch(doNavigate(path)),
|
||||
back: () => dispatch(doHistoryBack()),
|
||||
forward: () => dispatch(doHistoryForward()),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(Header);
|
||||
|
|
|
@ -3,12 +3,25 @@ import Link from "component/link";
|
|||
import WunderBar from "component/wunderbar";
|
||||
|
||||
export const Header = props => {
|
||||
const { balance, back, navigate, publish } = props;
|
||||
const { balance, back, forward, navigate, publish } = props;
|
||||
|
||||
return (
|
||||
<header id="header">
|
||||
<div className="header__item">
|
||||
<Link onClick={back} button="alt button--flat" icon="icon-arrow-left" title={__("Back")} />
|
||||
<Link
|
||||
onClick={back}
|
||||
button="alt button--flat"
|
||||
icon="icon-arrow-left"
|
||||
title={__("Back")}
|
||||
/>
|
||||
</div>
|
||||
<div className="header__item">
|
||||
<Link
|
||||
onClick={forward}
|
||||
button="alt button--flat"
|
||||
icon="icon-arrow-right"
|
||||
title={__("Forward")}
|
||||
/>
|
||||
</div>
|
||||
<div className="header__item">
|
||||
<Link
|
||||
|
|
Loading…
Add table
Reference in a new issue