Merge pull request #3310 from thelounge/xpaw/improve-raw

Improve raw messages
This commit is contained in:
Pavel Djundik 2019-07-18 11:58:46 +03:00 committed by GitHub
commit 03233c3f4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,13 @@
<template>
<span class="content">{{ message.text }}</span>
</template>
<script>
export default {
name: "MessageTypeRaw",
props: {
network: Object,
message: Object,
},
};
</script>

View file

@ -271,6 +271,7 @@ kbd {
#chat .whois .from::before,
#chat .nick .from::before,
#chat .action .from::before,
#chat .raw .from::before,
#chat .toggle-button::after,
#chat .toggle-content .more-caret::before,
#chat .scroll-down-arrow::after,
@ -418,6 +419,15 @@ kbd {
color: #ff4136;
}
#chat .raw .from::before {
content: "\f101"; /* https://fontawesome.com/icons/angle-double-right?style=solid */
}
#chat .raw.self .from::before {
content: "\f359"; /* https://fontawesome.com/icons/arrow-alt-circle-left?style=solid */
color: #2ecc40;
}
#chat .action .from::before {
content: "\f005"; /* http://fontawesome.io/icon/star/ */
}

View file

@ -46,6 +46,7 @@ class Msg {
this.type !== Msg.Type.ERROR &&
this.type !== Msg.Type.TOPIC_SET_BY &&
this.type !== Msg.Type.MODE_CHANNEL &&
this.type !== Msg.Type.RAW &&
this.type !== Msg.Type.WHOIS;
}
}
@ -73,6 +74,7 @@ Msg.Type = {
TOPIC: "topic",
TOPIC_SET_BY: "topic_set_by",
WHOIS: "whois",
RAW: "raw",
};
module.exports = Msg;

View file

@ -115,9 +115,8 @@ module.exports = function(irc, network) {
if (Helper.config.debug.raw) {
irc.on("raw", function(message) {
network.channels[0].pushMessage(client, new Msg({
from: message.from_server ? "«" : "»",
self: !message.from_server,
type: "raw",
type: Msg.Type.RAW,
text: message.line,
}), true);
});