mirror of
https://github.com/kremalicious/blowfish.git
synced 2024-12-27 15:17:51 +01:00
fix initial accent color
This commit is contained in:
parent
c70bc0d984
commit
77d02fe45e
@ -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.
|
||||
|
@ -8,7 +8,7 @@ const createButton = (
|
||||
value,
|
||||
key,
|
||||
mainWindow,
|
||||
accentColor,
|
||||
accentColor = '#f6388a',
|
||||
currentCurrency = 'ocean'
|
||||
) =>
|
||||
new TouchBarButton({
|
||||
|
@ -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) => {
|
||||
|
@ -3,16 +3,16 @@ import Link from 'next/link'
|
||||
import AccountsList from '../components/AccountsList'
|
||||
import styles from './preferences.module.css'
|
||||
|
||||
const Preferences = () => (
|
||||
<div className={styles.preferences}>
|
||||
<h1 className={styles.title}>Preferences</h1>{' '}
|
||||
<Link href="/">
|
||||
<a className={styles.close} title="Close Preferences">
|
||||
×
|
||||
</a>
|
||||
</Link>
|
||||
<AccountsList />
|
||||
</div>
|
||||
)
|
||||
|
||||
export default Preferences
|
||||
export default function Preferences() {
|
||||
return (
|
||||
<div className={styles.preferences}>
|
||||
<h1 className={styles.title}>Preferences</h1>{' '}
|
||||
<Link href="/">
|
||||
<a className={styles.close} title="Close Preferences">
|
||||
×
|
||||
</a>
|
||||
</Link>
|
||||
<AccountsList />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -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 })
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user