mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
2f635069e0
Co-Authored-By: Tim Miller-Williams <timmw@users.noreply.github.com>
24 lines
525 B
JavaScript
24 lines
525 B
JavaScript
"use strict";
|
|
|
|
const $ = require("jquery");
|
|
const socket = require("../socket");
|
|
const sidebar = $("#sidebar");
|
|
const {vueApp} = require("../vue");
|
|
const store = require("../store").default;
|
|
|
|
socket.on("quit", function(data) {
|
|
store.commit("removeNetwork", data.network);
|
|
|
|
vueApp.$nextTick(() => {
|
|
const chan = sidebar.find(".chan");
|
|
|
|
if (chan.length === 0) {
|
|
// Open the connect window
|
|
$("#footer .connect").trigger("click", {
|
|
pushState: false,
|
|
});
|
|
} else {
|
|
chan.eq(0).trigger("click");
|
|
}
|
|
});
|
|
});
|