From 2f9278d5ccc59d3ab0de17c6a5407d8da412cf9f Mon Sep 17 00:00:00 2001 From: btzr-io Date: Fri, 30 Jul 2021 18:26:44 -0500 Subject: [PATCH] dont' show open-in-desktop button on web-mobile version --- ui/component/claimMenuList/view.jsx | 6 ++++-- ui/component/fileActions/view.jsx | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/component/claimMenuList/view.jsx b/ui/component/claimMenuList/view.jsx index dfdba70ba..0cb9e6973 100644 --- a/ui/component/claimMenuList/view.jsx +++ b/ui/component/claimMenuList/view.jsx @@ -9,6 +9,7 @@ import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button'; import Icon from 'component/common/icon'; import { generateShareUrl, generateRssUrl, generateLbryContentUrl } from 'util/url'; import { useHistory } from 'react-router'; +import { useIsMobile } from 'effects/use-screensize'; import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux'; const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL; @@ -94,6 +95,7 @@ function ClaimMenuList(props: Props) { editedCollection, isAuthenticated, } = props; + const isMobile = useIsMobile(); const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@'); const isChannel = !incognitoClaim && !contentSigningChannel; const { channelName } = parseURI(contentChannelUri); @@ -230,7 +232,7 @@ function ClaimMenuList(props: Props) { } function handleOpenInDesktop() { - window.open(claim.permanent_url); + window.open(claim.permanent_url, '_top'); } return ( @@ -407,7 +409,7 @@ function ClaimMenuList(props: Props) { )} - {IS_WEB && ( + {IS_WEB && !isMobile && (
diff --git a/ui/component/fileActions/view.jsx b/ui/component/fileActions/view.jsx index 639f6e4f7..a2e32dc31 100644 --- a/ui/component/fileActions/view.jsx +++ b/ui/component/fileActions/view.jsx @@ -114,7 +114,7 @@ function FileActions(props: Props) { } function handleOpenInDesktop() { - window.open(claim.permanent_url); + window.open(claim.permanent_url, '_top'); } const lhsSection = ( @@ -192,7 +192,7 @@ function FileActions(props: Props) { )} {/* @endif */} - {IS_WEB && ( + {IS_WEB && !isMobile && (