aboutsummaryrefslogtreecommitdiff
path: root/xP/public/xP.js
diff options
context:
space:
mode:
Diffstat (limited to 'xP/public/xP.js')
-rw-r--r--xP/public/xP.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/xP/public/xP.js b/xP/public/xP.js
index a5f1218..30491d3 100644
--- a/xP/public/xP.js
+++ b/xP/public/xP.js
@@ -41,7 +41,7 @@ class RelayRpc extends EventTarget {
}
this.ws.onclose = event => {
let message = "Connection closed: " +
- event.code + " (" + event.reason + ")"
+ event.reason + " (" + event.code + ")"
for (const seq in this.promised)
this.promised[seq].reject(message)
@@ -811,14 +811,18 @@ let Input = {
let Main = {
view: vnode => {
- let state = "Connected"
+ let overlay = undefined
if (connecting)
- state = "Connecting..."
+ overlay = m('.overlay', {}, "Connecting...")
else if (rpc.ws === undefined)
- state = "Disconnected"
+ overlay = m('.overlay', {}, [
+ m('', {}, "Disconnected"),
+ m('', {}, m('small', {}, "Reload page to reconnect.")),
+ ])
return m('.xP', {}, [
- m('.title', {}, [`xP (${state})`, m(Toolbar)]),
+ overlay,
+ m('.title', {}, [`xP`, m(Toolbar)]),
m('.middle', {}, [m(BufferList), m(BufferContainer)]),
m(Status),
m(Input),