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", "imagesloaded": "^4.1.4",
"json-loader": "^0.5.4", "json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git", "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", "lbryinc": "lbryio/lbryinc#517c28a183d6ab69a357227809bc7c3c12d8411e",
"lint-staged": "^7.0.2", "lint-staged": "^7.0.2",
"localforage": "^1.7.1", "localforage": "^1.7.1",

View file

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

View file

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

View file

@ -7391,9 +7391,9 @@ lazy-val@^1.0.4:
yargs "^13.2.2" yargs "^13.2.2"
zstd-codec "^0.1.1" zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#3cb3859baf9f179732743bbc5a43e1104094a144: lbry-redux@lbryio/lbry-redux#1fc5afa0c45cfb4126539513088b580db9c4aca1:
version "0.0.1" 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: dependencies:
proxy-polyfill "0.1.6" proxy-polyfill "0.1.6"
reselect "^3.0.0" reselect "^3.0.0"