Add ignore option to contextmenu
This commit is contained in:
parent
ee16d98a94
commit
51b0ec1e98
@ -350,6 +350,7 @@ p {
|
|||||||
.context-menu-disconnect::before { content: "\f127"; /* https://fontawesome.com/icons/unlink?style=solid */ }
|
.context-menu-disconnect::before { content: "\f127"; /* https://fontawesome.com/icons/unlink?style=solid */ }
|
||||||
.context-menu-connect::before { content: "\f0c1"; /* https://fontawesome.com/icons/link?style=solid */ }
|
.context-menu-connect::before { content: "\f0c1"; /* https://fontawesome.com/icons/link?style=solid */ }
|
||||||
.context-menu-action-whois::before { content: "\f05a"; /* http://fontawesome.io/icon/info-circle/ */ }
|
.context-menu-action-whois::before { content: "\f05a"; /* http://fontawesome.io/icon/info-circle/ */ }
|
||||||
|
.context-menu-action-ignore::before { content: "\f506"; /* https://fontawesome.com/icons/user-slash?style=solid */ }
|
||||||
.context-menu-action-kick::before { content: "\f05e"; /* http://fontawesome.io/icon/ban/ */ }
|
.context-menu-action-kick::before { content: "\f05e"; /* http://fontawesome.io/icon/ban/ */ }
|
||||||
.context-menu-action-op::before { content: "\f1fa"; /* http://fontawesome.io/icon/at/ */ }
|
.context-menu-action-op::before { content: "\f1fa"; /* http://fontawesome.io/icon/at/ */ }
|
||||||
.context-menu-action-voice::before { content: "\f067"; /* http://fontawesome.io/icon/plus/ */ }
|
.context-menu-action-voice::before { content: "\f067"; /* http://fontawesome.io/icon/plus/ */ }
|
||||||
|
@ -116,18 +116,31 @@ export function generateChannelContextMenu($root, channel, network) {
|
|||||||
|
|
||||||
// Add menu items for queries
|
// Add menu items for queries
|
||||||
if (channel.type === "query") {
|
if (channel.type === "query") {
|
||||||
items.push({
|
items.push(
|
||||||
label: "User information",
|
{
|
||||||
type: "item",
|
label: "User information",
|
||||||
class: "action-whois",
|
type: "item",
|
||||||
action() {
|
class: "action-whois",
|
||||||
$root.switchToChannel(channel);
|
action() {
|
||||||
socket.emit("input", {
|
$root.switchToChannel(channel);
|
||||||
target: channel.id,
|
socket.emit("input", {
|
||||||
text: "/whois " + channel.name,
|
target: channel.id,
|
||||||
});
|
text: "/whois " + channel.name,
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
{
|
||||||
|
label: "Ignore user",
|
||||||
|
type: "item",
|
||||||
|
class: "action-ignore",
|
||||||
|
action() {
|
||||||
|
socket.emit("input", {
|
||||||
|
target: channel.id,
|
||||||
|
text: "/ignore " + channel.name,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel.type === "channel" || channel.type === "query") {
|
if (channel.type === "channel" || channel.type === "query") {
|
||||||
@ -203,6 +216,17 @@ export function generateUserContextMenu($root, channel, network, user) {
|
|||||||
class: "action-whois",
|
class: "action-whois",
|
||||||
action: whois,
|
action: whois,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Ignore user",
|
||||||
|
type: "item",
|
||||||
|
class: "action-ignore",
|
||||||
|
action() {
|
||||||
|
socket.emit("input", {
|
||||||
|
target: channel.id,
|
||||||
|
text: "/ignore " + user.nick,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Direct messages",
|
label: "Direct messages",
|
||||||
type: "item",
|
type: "item",
|
||||||
|
Loading…
Reference in New Issue
Block a user