diff --git a/components/app.js b/components/app.js
index c4dc3b0..00b1a27 100644
--- a/components/app.js
+++ b/components/app.js
@@ -1634,6 +1634,7 @@ export default class App extends Component {
onChannelClick=${this.handleChannelClick}
onClose=${() => this.close(activeBuffer)}
onJoin=${() => this.handleJoinClick(activeBuffer)}
+ onReconnect=${() => this.reconnect()}
onAddNetwork=${this.handleAddNetworkClick}
onManageNetwork=${() => this.handleManageNetworkClick(activeBuffer.server)}
/>
diff --git a/components/buffer-header.js b/components/buffer-header.js
index 7638326..3819111 100644
--- a/components/buffer-header.js
+++ b/components/buffer-header.js
@@ -21,23 +21,6 @@ function NickStatus(props) {
}
export default function BufferHeader(props) {
- function handleCloseClick(event) {
- event.preventDefault();
- props.onClose();
- }
- function handleJoinClick(event) {
- event.preventDefault();
- props.onJoin();
- }
- function handleAddNetworkClick(event) {
- event.preventDefault();
- props.onAddNetwork();
- }
- function handleManageNetworkClick(event) {
- event.preventDefault();
- props.onManageNetwork();
- }
-
let fullyConnected = props.server.status === ServerStatus.REGISTERED;
if (props.bouncerNetwork) {
fullyConnected = fullyConnected && props.bouncerNetwork.state === "connected";
@@ -82,9 +65,15 @@ export default function BufferHeader(props) {
let joinButton = html`
`;
+ let reconnectButton = html`
+
+ `;
if (props.server.isBouncer) {
if (props.server.bouncerNetID) {
@@ -95,7 +84,7 @@ export default function BufferHeader(props) {
actions.push(html`
`);
}
@@ -104,27 +93,31 @@ export default function BufferHeader(props) {
actions.push(html`
`);
+ } else if (props.server.status === ServerStatus.DISCONNECTED) {
+ actions.push(reconnectButton);
}
actions.push(html`
`);
}
} else {
if (fullyConnected) {
actions.push(joinButton);
+ } else if (props.server.status === ServerStatus.DISCONNECTED) {
+ actions.push(reconnectButton);
}
actions.push(html`
`);
}
@@ -138,7 +131,7 @@ export default function BufferHeader(props) {
`);
} else {
@@ -146,7 +139,7 @@ export default function BufferHeader(props) {
actions.push(html`
`);
}
@@ -154,7 +147,7 @@ export default function BufferHeader(props) {
`);
}
@@ -213,7 +206,7 @@ export default function BufferHeader(props) {
`;
break;