From eea349784558dff8836d85891de4f8ec90c478f7 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 25 Mar 2021 02:48:29 -0400 Subject: [PATCH] fix publish something empty --- ui/page/show/index.js | 9 +++++++++ ui/page/show/view.jsx | 18 ++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ui/page/show/index.js b/ui/page/show/index.js index 888cab2bc..243849d74 100644 --- a/ui/page/show/index.js +++ b/ui/page/show/index.js @@ -1,3 +1,4 @@ +import * as PAGES from 'constants/pages'; import { DOMAIN } from 'config'; import { connect } from 'react-redux'; import { PAGE_SIZE } from 'constants/claim'; @@ -11,7 +12,10 @@ import { makeSelectClaimIsMine, makeSelectClaimIsPending, makeSelectClaimIsStreamPlaceholder, + doClearPublish, + doPrepareEdit, } from 'lbry-redux'; +import { push } from 'connected-react-router'; import { makeSelectChannelInSubscriptions } from 'redux/selectors/subscriptions'; import { selectBlackListedOutpoints } from 'lbryinc'; import ShowPage from './view'; @@ -67,6 +71,11 @@ const select = (state, props) => { const perform = (dispatch) => ({ resolveUri: (uri) => dispatch(doResolveUri(uri)), + beginPublish: (name) => { + dispatch(doClearPublish()); + dispatch(doPrepareEdit({ name })); + dispatch(push(`/$/${PAGES.UPLOAD}`)); + }, }); export default connect(select, perform)(ShowPage); diff --git a/ui/page/show/view.jsx b/ui/page/show/view.jsx index 7039b0220..fb9f6f054 100644 --- a/ui/page/show/view.jsx +++ b/ui/page/show/view.jsx @@ -10,7 +10,9 @@ import Page from 'component/page'; import Button from 'component/button'; import Card from 'component/common/card'; import AbandonedChannelPreview from 'component/abandonedChannelPreview'; +import Yrbl from 'component/yrbl'; import { formatLbryUrlForWeb } from 'util/url'; +import { parseURI } from 'lbry-redux'; type Props = { isResolvingUri: boolean, @@ -27,6 +29,7 @@ type Props = { claimIsMine: boolean, claimIsPending: boolean, isLivestream: boolean, + beginPublish: (string) => void, }; function ShowPage(props: Props) { @@ -41,6 +44,7 @@ function ShowPage(props: Props) { isSubscribed, claimIsPending, isLivestream, + beginPublish, } = props; const signingChannel = claim && claim.signing_channel; @@ -48,6 +52,7 @@ function ShowPage(props: Props) { const claimExists = claim !== null && claim !== undefined; const haventFetchedYet = claim === undefined; const isMine = claim && claim.is_my_output; + const { contentName } = parseURI(uri); useEffect(() => { // @if TARGET='web' @@ -84,11 +89,20 @@ function ShowPage(props: Props) { {(claim === undefined || isResolvingUri) && (
- +
)} {!isResolvingUri && !isSubscribed && ( - {__("There's nothing available at this location.")} +
+ +
+ } + /> + )} {!isResolvingUri && isSubscribed && claim === null && }