commit
8004e051aa
@ -452,9 +452,9 @@ $(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
sidebar.on("click", ".close", function() {
|
function closeChan(chan) {
|
||||||
var cmd = "/close";
|
var cmd = "/close";
|
||||||
var chan = $(this).closest(".chan");
|
|
||||||
if (chan.hasClass("lobby")) {
|
if (chan.hasClass("lobby")) {
|
||||||
cmd = "/quit";
|
cmd = "/quit";
|
||||||
var server = chan.find(".name").html();
|
var server = chan.find(".name").html();
|
||||||
@ -471,11 +471,15 @@ $(function() {
|
|||||||
opacity: 0.4,
|
opacity: 0.4,
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sidebar.on("click", ".close", function() {
|
||||||
|
closeChan($(this).closest(".chan"));
|
||||||
});
|
});
|
||||||
|
|
||||||
const contextMenuActions = {
|
const contextMenuActions = {
|
||||||
close: function(itemData) {
|
close: function(itemData) {
|
||||||
$(`.networks .chan[data-target="${itemData}"] .close`).click();
|
closeChan($(`.networks .chan[data-target="${itemData}"]`));
|
||||||
},
|
},
|
||||||
focusChan: function(itemData) {
|
focusChan: function(itemData) {
|
||||||
$(`.networks .chan[data-target="${itemData}"]`).click();
|
$(`.networks .chan[data-target="${itemData}"]`).click();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{#each channels}}
|
{{#each channels}}
|
||||||
<div data-id="{{id}}" data-target="#chan-{{id}}" data-title="{{name}}" class="chan {{type}} chan-{{slugify name}}">
|
<div data-id="{{id}}" data-target="#chan-{{id}}" data-title="{{name}}" class="chan {{type}} chan-{{slugify name}}">
|
||||||
<span class="badge{{#if highlight}} highlight{{/if}}">{{#if unread}}{{roundBadgeNumber unread}}{{/if}}</span>
|
<span class="badge{{#if highlight}} highlight{{/if}}">{{#if unread}}{{roundBadgeNumber unread}}{{/if}}</span>
|
||||||
<button class="close" aria-label="Close"></button>
|
{{#equal type "lobby"}}{{else}}<button class="close" aria-label="Close"></button>{{/equal}}
|
||||||
<span class="name" title="{{name}}">{{name}}</span>
|
<span class="name" title="{{name}}">{{name}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
Loading…
Reference in New Issue
Block a user