From 713109167ce4c25daddbb75093b8522d3a863acb Mon Sep 17 00:00:00 2001 From: zeppi Date: Fri, 26 Mar 2021 17:03:52 -0400 Subject: [PATCH] publish, edit, remote_url publish --- ui/component/fileActions/index.js | 2 ++ ui/component/fileActions/view.jsx | 15 ++++++++++++++- ui/component/publishFile/view.jsx | 2 +- ui/component/publishForm/index.js | 12 ++++++------ ui/component/publishForm/view.jsx | 2 +- web/setup/publish.js | 22 ++++++++++++++-------- 6 files changed, 38 insertions(+), 17 deletions(-) diff --git a/ui/component/fileActions/index.js b/ui/component/fileActions/index.js index 9593f5db7..7a2f5e48d 100644 --- a/ui/component/fileActions/index.js +++ b/ui/component/fileActions/index.js @@ -5,6 +5,7 @@ import { makeSelectClaimForUri, doPrepareEdit, selectMyChannelClaims, + makeSelectClaimIsStreamPlaceholder, } from 'lbry-redux'; import { makeSelectCostInfoForUri } from 'lbryinc'; import { doSetPlayingUri } from 'redux/actions/content'; @@ -21,6 +22,7 @@ const select = (state, props) => ({ renderMode: makeSelectFileRenderModeForUri(props.uri)(state), costInfo: makeSelectCostInfoForUri(props.uri)(state), myChannels: selectMyChannelClaims(state), + isLivestreamClaim: makeSelectClaimIsStreamPlaceholder(props.uri)(state), }); const perform = (dispatch) => ({ diff --git a/ui/component/fileActions/view.jsx b/ui/component/fileActions/view.jsx index 3a90aac4a..59a33725e 100644 --- a/ui/component/fileActions/view.jsx +++ b/ui/component/fileActions/view.jsx @@ -25,6 +25,7 @@ type Props = { myChannels: ?Array, doToast: ({ message: string }) => void, clearPlayingUri: () => void, + isLivestreamClaim: boolean, }; function FileActions(props: Props) { @@ -40,6 +41,7 @@ function FileActions(props: Props) { myChannels, clearPlayingUri, doToast, + isLivestreamClaim, } = props; const { push, @@ -112,7 +114,18 @@ function FileActions(props: Props) { className="button--file-action" icon={ICONS.EDIT} label={__('Edit')} - navigate="/$/upload" + navigate="/$/upload?type=livestream" + onClick={() => { + prepareEdit(claim, editUri, fileInfo); + }} + /> + )} + {claimIsMine && isLivestreamClaim && ( +