Compare commits
No commits in common. "97475599a73d75f6c0e1f019a28c7e131bbd9061" and "1beeb9fdbce0bd84dd8a4c911048a74815cae88a" have entirely different histories.
97475599a7
...
1beeb9fdbc
3 changed files with 6 additions and 18 deletions
|
@ -62,10 +62,6 @@
|
||||||
<hr style='width: 75%;' />
|
<hr style='width: 75%;' />
|
||||||
${m.text}
|
${m.text}
|
||||||
`
|
`
|
||||||
msg.oncontextmenu = () => {
|
|
||||||
document.getElementById('msg-context-menu').style.display = 'flex';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let history = document.getElementById('chat-history');
|
let history = document.getElementById('chat-history');
|
||||||
// this is to force update everytime we get a duplicate msg to allow msg editing (yay)
|
// this is to force update everytime we get a duplicate msg to allow msg editing (yay)
|
||||||
let exists = Array.from(history.children).filter(e => e.style.order == m.id)[0];
|
let exists = Array.from(history.children).filter(e => e.style.order == m.id)[0];
|
||||||
|
@ -141,6 +137,7 @@
|
||||||
background-color:#0f0f2f;
|
background-color:#0f0f2f;
|
||||||
}
|
}
|
||||||
.chat-message {
|
.chat-message {
|
||||||
|
|
||||||
background-color: #ffffd6;
|
background-color: #ffffd6;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
|
@ -188,10 +185,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="msg-context-menu" class="chat-message" style="display: none; position: absolute; z-index: 1000; top: 0px;">
|
|
||||||
<ul>
|
|
||||||
<li onclick='document.getElementById("msg-context-menu").style.display="none"'>Edit</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,5 +1,5 @@
|
||||||
const tavern = {
|
const tavern = {
|
||||||
socket: socket = new WebSocket('ws:/' + window.location.host + '/ws'),
|
socket: socket = new WebSocket('ws://localhost:3001/ws'),
|
||||||
connected: false,
|
connected: false,
|
||||||
loggedIn: false,
|
loggedIn: false,
|
||||||
call: (f, ...args) => {
|
call: (f, ...args) => {
|
||||||
|
|
|
@ -41,12 +41,8 @@ impl GameServer {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if msg.source.is_empty() {
|
if msg.source.is_empty() {
|
||||||
msg.source = format!("({})", id.clone());
|
msg.source = id.clone();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
msg.source = format!("{} ({})", msg.source, id.clone());
|
|
||||||
}
|
|
||||||
|
|
||||||
self.chat.push((id.clone(), msg.clone()));
|
self.chat.push((id.clone(), msg.clone()));
|
||||||
_ = broadcast.send((None, api::Response::Message(msg)));
|
_ = broadcast.send((None, api::Response::Message(msg)));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue