From 618ecfb6392be8eef60019e80d3893538b03d505 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 2 Apr 2020 10:26:32 -0400 Subject: [PATCH] drop follow label for mobile inside claimPreviewTile to save space --- static/app-strings.json | 1 - ui/component/claimPreviewTile/view.jsx | 2 +- ui/component/subscribeButton/view.jsx | 7 ++++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 7e160d014..be009501c 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1085,7 +1085,6 @@ "Kannada": "Kannada", "Transcoding this %size%MB file should take under %processTime% %units%.": "Transcoding this %size%MB file should take under %processTime% %units%.", "FFmpeg not configured. More in %settings_link%.": "FFmpeg not configured. More in %settings_link%.", - "File Details": "File Details", "LBC Details": "LBC Details", "Publish Amount": "Publish Amount", "Supports and Tips": "Supports and Tips", diff --git a/ui/component/claimPreviewTile/view.jsx b/ui/component/claimPreviewTile/view.jsx index 2f6a33751..0c2df5157 100644 --- a/ui/component/claimPreviewTile/view.jsx +++ b/ui/component/claimPreviewTile/view.jsx @@ -187,7 +187,7 @@ function ClaimPreviewTile(props: Props) {
{isChannel ? (
- + {claimsInChannel === 1 ? __('%claimsInChannel% publish', { claimsInChannel }) diff --git a/ui/component/subscribeButton/view.jsx b/ui/component/subscribeButton/view.jsx index df76b6707..57ecda021 100644 --- a/ui/component/subscribeButton/view.jsx +++ b/ui/component/subscribeButton/view.jsx @@ -5,6 +5,7 @@ import React, { useRef } from 'react'; import { parseURI } from 'lbry-redux'; import Button from 'component/button'; import useHover from 'effects/use-hover'; +import useIsMobile from 'effects/use-is-mobile'; type SubscriptionArgs = { channelName: string, @@ -20,6 +21,7 @@ type Props = { doOpenModal: (id: string) => void, showSnackBarOnSubscribe: boolean, doToast: ({ message: string }) => void, + shrinkOnMobile: boolean, }; export default function SubscribeButton(props: Props) { @@ -32,14 +34,17 @@ export default function SubscribeButton(props: Props) { isSubscribed, showSnackBarOnSubscribe, doToast, + shrinkOnMobile = false, } = props; const buttonRef = useRef(); const isHovering = useHover(buttonRef); + const isMobile = useIsMobile(); const { channelName } = parseURI(permanentUrl); const claimName = '@' + channelName; const subscriptionHandler = isSubscribed ? doChannelUnsubscribe : doChannelSubscribe; const subscriptionLabel = isSubscribed ? __('Following') : __('Follow'); const unfollowOverride = isSubscribed && isHovering && __('Unfollow'); + const label = isMobile && shrinkOnMobile ? '' : unfollowOverride || subscriptionLabel; return permanentUrl ? (