Loëck Vézien
7 years ago
No known key found for this signature in database
GPG Key ID: CBCDCE384E853AC4
2 changed files with
10 additions and
6 deletions
-
src/components/layout/Default.js
-
src/index.ejs
|
|
@ -35,7 +35,15 @@ type Props = { |
|
|
|
|
|
|
|
class Default extends Component<Props> { |
|
|
|
componentDidMount() { |
|
|
|
window.requestAnimationFrame(() => (this._timeout = setTimeout(() => window.onAppReady(), 300))) |
|
|
|
window.requestAnimationFrame( |
|
|
|
() => |
|
|
|
(this._timeout = setTimeout(() => { |
|
|
|
window.onAppReady() |
|
|
|
if (process.platform === 'darwin') { |
|
|
|
ipcRenderer.send('touch-bar-init') |
|
|
|
} |
|
|
|
}, 300)), |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps: Props) { |
|
|
|
|
|
@ -45,7 +45,7 @@ |
|
|
|
</div> |
|
|
|
<div id="app"></div> |
|
|
|
<script> |
|
|
|
const { remote, ipcRenderer } = require('electron') |
|
|
|
const { remote } = require('electron') |
|
|
|
const { name } = remote.getCurrentWindow() |
|
|
|
|
|
|
|
const preloadEl = document.getElementById('preload') |
|
|
@ -61,10 +61,6 @@ |
|
|
|
|
|
|
|
preloadEl.addEventListener('transitionend', () => preloadEl.remove()) |
|
|
|
} |
|
|
|
|
|
|
|
if (process.platform === 'darwin') { |
|
|
|
ipcRenderer.emit('touch-bar-init') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (name === 'MainWindow') { |
|
|
|