enable owners to tag claims and channels disable-support

This commit is contained in:
jessop 2020-10-27 15:54:36 -04:00 committed by Sean Yesmunt
parent 3a0499bb94
commit 91f748d566
4 changed files with 17 additions and 11 deletions

View file

@ -136,7 +136,7 @@
"imagesloaded": "^4.1.4",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#3cb3859baf9f179732743bbc5a43e1104094a144",
"lbry-redux": "lbryio/lbry-redux#1fc5afa0c45cfb4126539513088b580db9c4aca1",
"lbryinc": "lbryio/lbryinc#517c28a183d6ab69a357227809bc7c3c12d8411e",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",

View file

@ -1,10 +1,13 @@
import { connect } from 'react-redux';
import { doOpenModal } from 'redux/actions/app';
import ClaimSupportButton from './view';
import { makeSelectTagInClaimOrChannelForUri } from 'lbry-redux';
export default connect(
null,
{
doOpenModal,
}
)(ClaimSupportButton);
const DISABLE_SUPPORT_TAG = 'disable-support';
const select = (state, props) => ({
disableSupport: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_SUPPORT_TAG)(state),
});
export default connect(select, {
doOpenModal,
})(ClaimSupportButton);

View file

@ -9,11 +9,14 @@ type Props = {
uri: string,
doOpenModal: (string, {}) => void,
fileAction?: boolean,
disableSupport: boolean,
};
export default function ClaimSupportButton(props: Props) {
const { doOpenModal, uri, fileAction } = props;
const { doOpenModal, uri, fileAction, disableSupport } = props;
if (disableSupport) {
return null;
}
return (
<Button
button={fileAction ? undefined : 'alt'}

View file

@ -7391,9 +7391,9 @@ lazy-val@^1.0.4:
yargs "^13.2.2"
zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#3cb3859baf9f179732743bbc5a43e1104094a144:
lbry-redux@lbryio/lbry-redux#1fc5afa0c45cfb4126539513088b580db9c4aca1:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/3cb3859baf9f179732743bbc5a43e1104094a144"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/1fc5afa0c45cfb4126539513088b580db9c4aca1"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"