diff --git a/static/app-strings.json b/static/app-strings.json index 3bae93a67..3d1e27eab 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1593,5 +1593,9 @@ "You do not have any blocked channels": "You do not have any blocked channels", "Blocked channels will be invisible to you in the app. They will not be able to comment on your content, or reply to you comments left on other channels' content.": "Blocked channels will be invisible to you in the app. They will not be able to comment on your content, or reply to you comments left on other channels' content.", "Muted channels will be invisible to you in the app. They will not know they are muted and can still interact with you and your content.": "Muted channels will be invisible to you in the app. They will not know they are muted and can still interact with you and your content.", + "This channel is blocked": "This channel is blocked", + "This channel is muted": "This channel is muted", + "Are you sure you want to view this content? Viewing will not unblock @%channel%": "Are you sure you want to view this content? Viewing will not unblock @%channel%", + "Are you sure you want to view this content? Viewing will not unmute @%channel%": "Are you sure you want to view this content? Viewing will not unmute @%channel%", "--end--": "--end--" } diff --git a/ui/component/channelContent/view.jsx b/ui/component/channelContent/view.jsx index d0bb99720..e9a42d310 100644 --- a/ui/component/channelContent/view.jsx +++ b/ui/component/channelContent/view.jsx @@ -29,7 +29,7 @@ type Props = { isAuthenticated: boolean, showMature: boolean, tileLayout: boolean, - viewBlockedChannel: boolean, + viewHiddenChannels: boolean, }; function ChannelContent(props: Props) { @@ -45,7 +45,7 @@ function ChannelContent(props: Props) { defaultInfiniteScroll = true, showMature, tileLayout, - viewBlockedChannel, + viewHiddenChannels, } = props; const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0; const [searchQuery, setSearchQuery] = React.useState(''); @@ -122,7 +122,7 @@ function ChannelContent(props: Props) { {claim && claimsInChannel > 0 ? ( ({ page: selectCurrentChannelPage(state), claim: makeSelectClaimForUri(props.uri)(state), isSubscribed: makeSelectIsSubscribed(props.uri, true)(state), - channelIsBlocked: makeSelectChannelIsMuted(props.uri)(state), blackListedOutpoints: selectBlackListedOutpoints(state), subCount: makeSelectSubCountForUri(props.uri)(state), pending: makeSelectClaimIsPending(props.uri)(state), youtubeChannels: selectYoutubeChannels(state), blockedChannels: selectModerationBlockList(state), + mutedChannels: selectMutedChannels(state), }); const perform = (dispatch) => ({ diff --git a/ui/page/channel/view.jsx b/ui/page/channel/view.jsx index b3dcd470b..ce2b68a05 100644 --- a/ui/page/channel/view.jsx +++ b/ui/page/channel/view.jsx @@ -48,6 +48,7 @@ type Props = { pending: boolean, youtubeChannels: ?Array<{ channel_claim_id: string, sync_status: string, transfer_state: string }>, blockedChannels: Array, + mutedChannels: Array, }; function ChannelPage(props: Props) { @@ -59,13 +60,13 @@ function ChannelPage(props: Props) { page, channelIsMine, isSubscribed, - channelIsBlocked, blackListedOutpoints, fetchSubCount, subCount, pending, youtubeChannels, blockedChannels, + mutedChannels, } = props; const { push, @@ -82,6 +83,7 @@ function ChannelPage(props: Props) { const claimId = claim.claim_id; const formattedSubCount = Number(subCount).toLocaleString(); const isBlocked = claim && blockedChannels.includes(claim.permanent_url); + const isMuted = claim && mutedChannels.includes(claim.permanent_url); const isMyYouTubeChannel = claim && youtubeChannels && @@ -159,25 +161,14 @@ function ChannelPage(props: Props) { navigate={`/$/${PAGES.CHANNELS}`} /> )} - {!channelIsBlocked && !channelIsBlackListed && } - {!channelIsBlocked && } - {!channelIsBlocked && (!channelIsBlackListed || isSubscribed) && } + {!channelIsBlackListed && } + {!(isBlocked || isMuted) && } + {!(isBlocked || isMuted) && (!channelIsBlackListed || isSubscribed) && } - {cover && ( - - )} + {cover && }
- +

{title || '@' + channelName} @@ -208,13 +199,19 @@ function ChannelPage(props: Props) {
- {isBlocked && !viewBlockedChannel ? ( + {(isBlocked || isMuted) && !viewBlockedChannel ? (