Show big “Disconnected” text when disconnected

cpsdqs/unified-input
cpsdqs 7 years ago
parent 92c4c2ff98
commit 2acaf9e97a
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 7
      js/term.js

@ -6,6 +6,13 @@ window.termInit = function ({ labels, theme, allFn }) {
const termUpload = TermUpl(conn, input, screen) const termUpload = TermUpl(conn, input, screen)
screen.input = input screen.input = input
conn.on('open', () => { screen.window.statusScreen = null })
conn.on('connect', () => { screen.window.statusScreen = { title: 'Connecting', loading: true } })
conn.on('close', () => { screen.window.statusScreen = { title: 'Disconnected' } })
conn.on('ping', () => { screen.window.statusScreen = { title: 'Disconnected', loading: true } })
conn.on('ping-fail', () => { screen.window.statusScreen = { title: 'Disconnected' } })
conn.on('ping-success', () => { screen.window.statusScreen = { title: 'Reloading', loading: true } })
conn.init() conn.init()
input.init({ allFn }) input.init({ allFn })
termUpload.init() termUpload.init()

Loading…
Cancel
Save