Skip to content

Commit a10a424

Browse files
author
Guillaume Chau
committed
feat(electron): wait a little bit on disconnect before showing intro
1 parent f03d67e commit a10a424

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/shell-electron/src/devtools.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ const $ = document.querySelector.bind(document)
88
const $intro = $('#intro')
99

1010
let reload = null
11+
let introTimer
1112

1213
socket.on('vue-devtools-disconnect-devtools', () => {
13-
$intro.classList.remove('hidden')
14+
introTimer = setTimeout(() => {
15+
$intro.classList.remove('hidden')
16+
}, 2000)
1417
})
1518

1619
socket.on('vue-devtools-init', () => {
20+
clearTimeout(introTimer)
1721
$intro.classList.add('hidden')
1822

1923
// Reset attached listeners

0 commit comments

Comments
 (0)