make mac header stuff only happen on desktop
This commit is contained in:
parent
33d690040e
commit
7fa30c9355
3 changed files with 22 additions and 7 deletions
|
@ -16,7 +16,9 @@ import usePrevious from 'effects/use-previous';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
|
|
||||||
export const MAIN_WRAPPER_CLASS = 'main-wrapper';
|
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 = {
|
type Props = {
|
||||||
alertError: (string | {}) => void,
|
alertError: (string | {}) => void,
|
||||||
|
@ -126,7 +128,11 @@ function App(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<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}
|
ref={appRef}
|
||||||
onContextMenu={e => openContextMenu(e)}
|
onContextMenu={e => openContextMenu(e)}
|
||||||
>
|
>
|
||||||
|
|
|
@ -11,8 +11,9 @@ import WunderBar from 'component/wunderbar';
|
||||||
import Icon from 'component/common/icon';
|
import Icon from 'component/common/icon';
|
||||||
import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button';
|
import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button';
|
||||||
import Tooltip from 'component/common/tooltip';
|
import Tooltip from 'component/common/tooltip';
|
||||||
|
// @if TARGET='app'
|
||||||
const IS_MAC = process.platform === 'darwin';
|
import { IS_MAC } from 'component/app/view';
|
||||||
|
// @endif
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
balance: string,
|
balance: string,
|
||||||
|
@ -64,7 +65,14 @@ const Header = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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__contents">
|
||||||
<div className="header__navigation">
|
<div className="header__navigation">
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -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",
|
"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.",
|
"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.)",
|
"(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"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue