From d7a5177d41adf8f788c6d90bb5b6757154bf71d3 Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Tue, 23 Aug 2022 17:33:25 -0500 Subject: [PATCH] Cleaned up new chat changes to work in the game hall and on Chrome --- .../src/main/web/css/gemp-001/game.css | 63 +++++++++++++++++++ .../src/main/web/css/gemp-001/hall.css | 9 ++- .../src/main/web/js/gemp-022/chat.js | 5 ++ 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css index 53eb344d7..8484dc93b 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css +++ b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css @@ -297,3 +297,66 @@ body { padding-top: 2px; padding-bottom: 2px; } + +.msg-content p a { + color: orange; +} + +.chatMessage h1, +.chatMessage h2, +.chatMessage h3, +.chatMessage h4, +.chatMessage h5, +.chatMessage h6 { + display: inline; + margin-top: 0; + margin-bottom: 0; +} + +.chatMessage p { + margin-top: 0; + margin-bottom: 0; +} + +.chatMessage blockquote { + display: inline-block; + border-left: 5px solid #505050; + margin-left: 5px; + margin-top: 0px; + margin-bottom: 5px; + font-style: italic; +} +.chatMessage blockquote br { + line-height: 0px; + margin: 0px; + content: ""; +} + +.gameMessage div { + display: inline; +} + +.user-mention { + background-color: #FFFF0022; +} + +.user-ping { + background-color: #FF000044; +} + +.message { + display: flex; + flex-direction: row; + gap: 2px; + align-items: flex-start; +} + +.msg-content p { + margin-left: 5px; + margin-top: 0px; + margin-bottom: 7px; +} + +.msg-identifier { + +} \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css index a86233b80..524cf8c07 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css +++ b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css @@ -314,8 +314,11 @@ tr.played { overflow: auto; } -a { - color: orange !important; +#buttonsDiv a, +#motd a, +#bugReport a, +.msg-content p a { + color: orange; } .chatMessage h1, @@ -370,5 +373,5 @@ a { } .msg-identifier { - min-width: 200px; + } \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/chat.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/chat.js index 57d830d11..eb257815d 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/chat.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/chat.js @@ -375,6 +375,11 @@ var ChatBoxUI = Class.extend({ msgClass += " user-mention"; } + if(msgClass == "gameMessage") + { + message = "
" + message + "
"; + } + var messageDiv = $("
" + message + "
"); this.chatMessagesDiv.append(messageDiv);