mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
Improve raw messages
This commit is contained in:
parent
01347787b7
commit
e04bfe39bf
4 changed files with 26 additions and 2 deletions
13
client/components/MessageTypes/raw.vue
Normal file
13
client/components/MessageTypes/raw.vue
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<template>
|
||||||
|
<span class="content">{{ message.text }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "MessageTypeRaw",
|
||||||
|
props: {
|
||||||
|
network: Object,
|
||||||
|
message: Object,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -271,6 +271,7 @@ kbd {
|
||||||
#chat .whois .from::before,
|
#chat .whois .from::before,
|
||||||
#chat .nick .from::before,
|
#chat .nick .from::before,
|
||||||
#chat .action .from::before,
|
#chat .action .from::before,
|
||||||
|
#chat .raw .from::before,
|
||||||
#chat .toggle-button::after,
|
#chat .toggle-button::after,
|
||||||
#chat .toggle-content .more-caret::before,
|
#chat .toggle-content .more-caret::before,
|
||||||
#chat .scroll-down-arrow::after,
|
#chat .scroll-down-arrow::after,
|
||||||
|
@ -418,6 +419,15 @@ kbd {
|
||||||
color: #ff4136;
|
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 {
|
#chat .action .from::before {
|
||||||
content: "\f005"; /* http://fontawesome.io/icon/star/ */
|
content: "\f005"; /* http://fontawesome.io/icon/star/ */
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ class Msg {
|
||||||
this.type !== Msg.Type.ERROR &&
|
this.type !== Msg.Type.ERROR &&
|
||||||
this.type !== Msg.Type.TOPIC_SET_BY &&
|
this.type !== Msg.Type.TOPIC_SET_BY &&
|
||||||
this.type !== Msg.Type.MODE_CHANNEL &&
|
this.type !== Msg.Type.MODE_CHANNEL &&
|
||||||
|
this.type !== Msg.Type.RAW &&
|
||||||
this.type !== Msg.Type.WHOIS;
|
this.type !== Msg.Type.WHOIS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +74,7 @@ Msg.Type = {
|
||||||
TOPIC: "topic",
|
TOPIC: "topic",
|
||||||
TOPIC_SET_BY: "topic_set_by",
|
TOPIC_SET_BY: "topic_set_by",
|
||||||
WHOIS: "whois",
|
WHOIS: "whois",
|
||||||
|
RAW: "raw",
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Msg;
|
module.exports = Msg;
|
||||||
|
|
|
@ -115,9 +115,8 @@ module.exports = function(irc, network) {
|
||||||
if (Helper.config.debug.raw) {
|
if (Helper.config.debug.raw) {
|
||||||
irc.on("raw", function(message) {
|
irc.on("raw", function(message) {
|
||||||
network.channels[0].pushMessage(client, new Msg({
|
network.channels[0].pushMessage(client, new Msg({
|
||||||
from: message.from_server ? "«" : "»",
|
|
||||||
self: !message.from_server,
|
self: !message.from_server,
|
||||||
type: "raw",
|
type: Msg.Type.RAW,
|
||||||
text: message.line,
|
text: message.line,
|
||||||
}), true);
|
}), true);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue