From 7fa30c9355a65a07f4edda62298552797de39806 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 15 Oct 2019 12:21:49 -0400 Subject: [PATCH] make mac header stuff only happen on desktop --- src/ui/component/app/view.jsx | 10 ++++++++-- src/ui/component/header/view.jsx | 14 +++++++++++--- static/app-strings.json | 5 +++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/ui/component/app/view.jsx b/src/ui/component/app/view.jsx index 456dd9cb4..b500adac7 100644 --- a/src/ui/component/app/view.jsx +++ b/src/ui/component/app/view.jsx @@ -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 (
openContextMenu(e)} > diff --git a/src/ui/component/header/view.jsx b/src/ui/component/header/view.jsx index 68422545b..e0bf15763 100644 --- a/src/ui/component/header/view.jsx +++ b/src/ui/component/header/view.jsx @@ -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 ( -
+