Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fixes and legacy cleanup #253

Merged
merged 5 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,13 @@ const hintstrings = new Map([
"Use /ignore <username> to hide messages from pesky chatters"
],
["mutespermanent", "Mutes are never persistent, don't worry it will pass!"],
[
"stalkmentionshint",
"Use the /stalk <nick> or /mentions <nick> to keep up to date"
],
[
"tagshint",
`Use the /tag <nick> <color> to highlight users you like. There are preset colors to choose from ${tagcolors.join(
", "
)}`
]
)}, or \`/tag <nick> #HEXCODE\``
],
["contextmenu", "Right click a user to access quick options!"]
]);
const settingsdefault = new Map([
["schemaversion", 2],
Expand Down Expand Up @@ -172,14 +169,15 @@ const commandsinfo = new Map([
],
["unban", { desc: "Unban a user", admin: true }],
["timestampformat", { desc: "Set the time format of the chat." }],
["stalk", { desc: "Return a list of messages from <nick>", alias: ["s"] }],
[
"mentions",
{
desc: "Return a list of messages where <nick> is mentioned",
alias: ["m"]
}
],
// Disabling /stalk and /mentions until functionality is added.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go ahead and delete this stuff since it’s deleted above

// ["stalk", { desc: "Return a list of messages from <nick>", alias: ["s"] }],
// [
// "mentions",
// {
// desc: "Return a list of messages where <nick> is mentioned",
// alias: ["m"]
// }
// ],
["tag", { desc: "Mark a users messages" }],
["untag", { desc: "No longer mark the users messages" }],
["exit", { desc: "Exit the conversation you are in." }],
Expand Down Expand Up @@ -1826,11 +1824,11 @@ class Chat {
MessageBuilder.info(
`Tagged nicks: ${[...this.taggednicks.keys()].join(
","
)}. Available colors: ${tagcolors.join(",")}`
)}. Preset colors: ${tagcolors.join(",")}, or /tag user #HEXCODE`
).into(this);
} else {
MessageBuilder.info(
`No tagged nicks. Available colors: ${tagcolors.join(",")}`
`No tagged nicks. Preset colors: ${tagcolors.join(",")}, or /tag user #HEXCODE`
Copy link
Member

@jbpratt jbpratt Jun 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be pulled out into variables as it looks like this is below as well

).into(this);
}
return;
Expand Down Expand Up @@ -1882,11 +1880,11 @@ class Chat {
MessageBuilder.info(
`Tagged nicks: ${[...this.taggednicks.keys()].join(
","
)}. Available colors: ${tagcolors.join(",")}`
)}. Preset colors: ${tagcolors.join(",")}, or \`/tag user #HEXCODE\``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This as well

).into(this);
} else {
MessageBuilder.info(
`No tagged nicks. Available colors: ${tagcolors.join(",")}`
`No tagged nicks. Preset colors: ${tagcolors.join(",")}, or \`/tag user #HEXCODE\``
).into(this);
}
return;
Expand Down
8 changes: 6 additions & 2 deletions assets/chat/js/menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,12 @@ class ChatContextMenu {
show(e) {
e.preventDefault()
this.ui.show()
this.ui.css("left", event.pageX)
this.ui.css("top", event.pageY)
this.ui.css("left", this.event.pageX)
if (this.event.pageY > (this.chat.ui.height() * 0.66)) {
this.ui.css("top", (this.event.pageY - this.ui.height()))
} else {
this.ui.css("top", this.event.pageY)
}
}

hide() {
Expand Down