diff --git a/src/main/index.js b/src/main/index.js index 03b21b2..51a461d 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -80,18 +80,20 @@ const createWindow = async () => { app.on('ready', async () => { await prepareNext('./src/renderer') - - createWindow() + await createWindow() mainWindow.webContents.on('dom-ready', () => { switchTheme() - switchAccentColor() // add platform as class mainWindow.webContents.executeJavaScript( `document.getElementsByTagName('html')[0].classList.add('${process.platform}')` ) }) + + mainWindow.webContents.on('did-finish-load', () => { + switchAccentColor() + }) }) // Quit when all windows are closed. diff --git a/src/main/touchbar.js b/src/main/touchbar.js index d321bba..0324cfa 100644 --- a/src/main/touchbar.js +++ b/src/main/touchbar.js @@ -8,7 +8,7 @@ const createButton = ( value, key, mainWindow, - accentColor, + accentColor = '#f6388a', currentCurrency = 'ocean' ) => new TouchBarButton({ diff --git a/src/renderer/pages/_app.jsx b/src/renderer/pages/_app.jsx index 8436c55..421c762 100644 --- a/src/renderer/pages/_app.jsx +++ b/src/renderer/pages/_app.jsx @@ -6,12 +6,6 @@ import Router from 'next/router' import '../global.css' import Layout from '../Layout' -// -// Disable zooming -// -// webFrame.setVisualZoomLevelLimits(1, 1) -// webFrame.setLayoutZoomLevelLimits(0, 0) - export default function App({ Component, pageProps }) { useEffect(() => { global.ipcRenderer.on('goTo', (evt, route) => { diff --git a/src/renderer/pages/preferences.jsx b/src/renderer/pages/preferences.jsx index f6a7af3..357183d 100644 --- a/src/renderer/pages/preferences.jsx +++ b/src/renderer/pages/preferences.jsx @@ -3,16 +3,16 @@ import Link from 'next/link' import AccountsList from '../components/AccountsList' import styles from './preferences.module.css' -const Preferences = () => ( -
-

Preferences

{' '} - - - × - - - -
-) - -export default Preferences +export default function Preferences() { + return ( +
+

Preferences

{' '} + + + × + + + +
+ ) +} diff --git a/src/renderer/store/AppProvider.jsx b/src/renderer/store/AppProvider.jsx index 819a918..8d3f462 100644 --- a/src/renderer/store/AppProvider.jsx +++ b/src/renderer/store/AppProvider.jsx @@ -38,7 +38,7 @@ export default class AppProvider extends PureComponent { async componentDidMount() { // listener for accent color - global.ipcRenderer.on('accent-color', (event, accentColor) => { + global.ipcRenderer.on('accent-color', (evt, accentColor) => { this.setState({ accentColor }) })