diff --git a/package.json b/package.json index dc16487..f4dffa2 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "react": "^16.8.6", "react-blockies": "^1.4.1", "react-dom": "^16.8.6", - "react-pose": "^4.0.8" + "react-pose": "^4.0.8", + "react-touchbar-electron": "0.0.1" }, "devDependencies": { "@babel/core": "^7.4.4", diff --git a/src/app/App.jsx b/src/app/App.jsx index bc9fac5..2292113 100644 --- a/src/app/App.jsx +++ b/src/app/App.jsx @@ -3,12 +3,12 @@ import PropTypes from 'prop-types' import { Router, Location } from '@reach/router' import { webFrame } from 'electron' import posed, { PoseGroup } from 'react-pose' -import AppProvider from './store/AppProvider' import Titlebar from './components/Titlebar' import Home from './screens/Home' import Preferences from './screens/Preferences' import './App.css' import { defaultAnimation } from './components/Animations' +import Touchbar from './components/Touchbar' // // Disable zooming @@ -37,7 +37,7 @@ PosedRouter.propTypes = { export default class App extends PureComponent { render() { return ( - + <>
@@ -45,7 +45,9 @@ export default class App extends PureComponent {
-
+ + + ) } } diff --git a/src/app/components/Touchbar.js b/src/app/components/Touchbar.js new file mode 100644 index 0000000..abc4e43 --- /dev/null +++ b/src/app/components/Touchbar.js @@ -0,0 +1,50 @@ +import React, { PureComponent } from 'react' +import PropTypes from 'prop-types' +import { TouchBar, Button } from 'react-touchbar-electron' +import { locale } from '../util/moneyFormatter' +import { formatCurrency } from '@coingecko/cryptoformat' +import { AppContext } from '../store/createContext' + +const TouchbarItems = ({ prices, currency, toggleCurrencies }) => ( + <> +