Show connect window when last network is removed
This commit is contained in:
parent
2de022235f
commit
000d56a96d
@ -202,7 +202,7 @@ function renderNetworks(data, singleNetwork) {
|
|||||||
sidebar.find(".networks").append(
|
sidebar.find(".networks").append(
|
||||||
templates.network({
|
templates.network({
|
||||||
networks: data.networks,
|
networks: data.networks,
|
||||||
})
|
}).trim()
|
||||||
);
|
);
|
||||||
|
|
||||||
collapsed.forEach((key) => {
|
collapsed.forEach((key) => {
|
||||||
|
@ -16,11 +16,16 @@ socket.on("quit", function(data) {
|
|||||||
|
|
||||||
network.remove();
|
network.remove();
|
||||||
|
|
||||||
const chan = sidebar.find(".chan")
|
const chan = sidebar.find(".chan");
|
||||||
.eq(0)
|
|
||||||
.trigger("click");
|
|
||||||
|
|
||||||
if (chan.length === 0) {
|
if (chan.length === 0) {
|
||||||
sidebar.find(".empty").show();
|
sidebar.find(".empty").show();
|
||||||
|
|
||||||
|
// Open the connect window
|
||||||
|
$("#footer .connect").trigger("click", {
|
||||||
|
pushState: false,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
chan.eq(0).trigger("click");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user