make mac header stuff only happen on desktop

This commit is contained in:
Sean Yesmunt 2019-10-15 12:21:49 -04:00
parent 33d690040e
commit 7fa30c9355
3 changed files with 22 additions and 7 deletions

View file

@ -16,7 +16,9 @@ import usePrevious from 'effects/use-previous';
import Button from 'component/button';
export const MAIN_WRAPPER_CLASS = 'main-wrapper';
const IS_MAC = process.platform === 'darwin';
// @if TARGET='app'
export const IS_MAC = process.platform === 'darwin';
// @endif
type Props = {
alertError: (string | {}) => void,
@ -126,7 +128,11 @@ function App(props: Props) {
return (
<div
className={classnames(MAIN_WRAPPER_CLASS, { [`${MAIN_WRAPPER_CLASS}--mac`]: IS_MAC })}
className={classnames(MAIN_WRAPPER_CLASS, {
// @if TARGET='app'
[`${MAIN_WRAPPER_CLASS}--mac`]: IS_MAC,
// @endif
})}
ref={appRef}
onContextMenu={e => openContextMenu(e)}
>

View file

@ -11,8 +11,9 @@ import WunderBar from 'component/wunderbar';
import Icon from 'component/common/icon';
import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button';
import Tooltip from 'component/common/tooltip';
const IS_MAC = process.platform === 'darwin';
// @if TARGET='app'
import { IS_MAC } from 'component/app/view';
// @endif
type Props = {
balance: string,
@ -64,7 +65,14 @@ const Header = (props: Props) => {
}
return (
<header className={classnames('header', { 'header--minimal': minimal, 'header--mac': IS_MAC })}>
<header
className={classnames('header', {
'header--minimal': minimal,
// @if TARGET='app'
'header--mac': IS_MAC,
// @endif
})}
>
<div className="header__contents">
<div className="header__navigation">
<Button

View file

@ -803,5 +803,6 @@
"Enter a LBRY URL or search for videos, music, games and more": "Enter a LBRY URL or search for videos, music, games and more",
"This app will automatically download new free content from channels you are subscribed to. You may configure this in Settings or on the Subscriptions page.": "This app will automatically download new free content from channels you are subscribed to. You may configure this in Settings or on the Subscriptions page.",
"(Only available on the desktop app.)": "(Only available on the desktop app.)",
"If we have your email address, we will send you notifications related to new content. You may configure these emails from the Help page.": "If we have your email address, we will send you notifications related to new content. You may configure these emails from the Help page."
}
"If we have your email address, we will send you notifications related to new content. You may configure these emails from the Help page.": "If we have your email address, we will send you notifications related to new content. You may configure these emails from the Help page.",
"Light": "Light"
}