mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 07:22:31 +02:00
Chat window resize, shrink text size and boxes, add date to timestamp.
This commit is contained in:
parent
968fd2b72d
commit
394c9e2175
3 changed files with 27 additions and 20 deletions
|
@ -12,6 +12,7 @@
|
|||
<link type="text/css" rel="stylesheet" href="css/FloofChat.css" media="screen,projection"/>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
@ -191,7 +192,7 @@
|
|||
}
|
||||
// else fall through to default
|
||||
default:
|
||||
elContent = elContent.replace(this, "<br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>");
|
||||
elContent = elContent.replace(this, "<br/><a onclick=\"gotoURL('" + this + "');return false;\" href=\"" + this + "\">" + this + "</a>");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ var SHIFT_KEY = 33554432;
|
|||
var FLOOF_CHAT_CHANNEL = "Chat";
|
||||
var FLOOF_NOTIFICATION_CHANNEL = "Floof-Notif";
|
||||
|
||||
var MAIN_CHAT_WINDOW_HEIGHT = 450;
|
||||
var MAIN_CHAT_WINDOW_WIDTH = 750;
|
||||
|
||||
Script.scriptEnding.connect(function () {
|
||||
shutdown();
|
||||
});
|
||||
|
@ -50,14 +53,14 @@ var visible = false;
|
|||
var historyVisible = false;
|
||||
var settingsRoot = "FloofChat";
|
||||
|
||||
var athenaGotoUrl = "https://metaverse.projectathena.io/interim/d-goto/app/goto.json";
|
||||
var gotoJSONUrl = Settings.getValue(settingsRoot + "/gotoJSONUrl", athenaGotoUrl);
|
||||
var vircadiaGotoUrl = "https://metaverse.vircadia.com/interim/d-goto/app/goto.json";
|
||||
var gotoJSONUrl = Settings.getValue(settingsRoot + "/gotoJSONUrl", vircadiaGotoUrl);
|
||||
|
||||
var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain": false, "Grid": true});
|
||||
|
||||
var ws;
|
||||
var wsReady = false;
|
||||
var WEB_SOCKET_URL = "ws://chat.projectathena.io:8880"; // WebSocket for Grid chat.
|
||||
var WEB_SOCKET_URL = "ws://chat.vircadia.com:8880"; // WebSocket for Grid chat.
|
||||
var shutdownBool = false;
|
||||
|
||||
var defaultColour = {red: 255, green: 255, blue: 255};
|
||||
|
@ -166,11 +169,11 @@ function setupHistoryWindow() {
|
|||
chatHistory = new OverlayWebWindow({
|
||||
title: 'Chat',
|
||||
source: ROOT + "FloofChat.html?appUUID=" + appUUID + "&" + Date.now(),
|
||||
width: 900,
|
||||
height: 700,
|
||||
width: MAIN_CHAT_WINDOW_WIDTH,
|
||||
height: MAIN_CHAT_WINDOW_HEIGHT,
|
||||
visible: false
|
||||
});
|
||||
chatHistory.setPosition({x: 0, y: Window.innerHeight - 700});
|
||||
chatHistory.setPosition({x: 0, y: Window.innerHeight - MAIN_CHAT_WINDOW_HEIGHT});
|
||||
chatHistory.webEventReceived.connect(onWebEventReceived);
|
||||
chatHistory.closed.connect(toggleChatHistory);
|
||||
}
|
||||
|
@ -293,7 +296,7 @@ function onWebEventReceived(event) {
|
|||
colours[event.colourType] = event.colour;
|
||||
}
|
||||
if (event.cmd === "REDOCK") {
|
||||
chatHistory.setPosition({x: 0, y: Window.innerHeight - 700});
|
||||
chatHistory.setPosition({x: 0, y: Window.innerHeight - MAIN_CHAT_WINDOW_HEIGHT});
|
||||
}
|
||||
if (event.cmd === "GOTO") {
|
||||
gotoConfirm(event.url);
|
||||
|
@ -464,14 +467,16 @@ function messageReceived(channel, message) {
|
|||
|
||||
function time() {
|
||||
var d = new Date();
|
||||
var month = (d.getMonth()).toString();
|
||||
var day = (d.getDate()).toString();
|
||||
var h = (d.getHours()).toString();
|
||||
var m = (d.getMinutes()).toString();
|
||||
var s = (d.getSeconds()).toString();
|
||||
var h2 = ("0" + h).slice(-2);
|
||||
var m2 = ("0" + m).slice(-2);
|
||||
var s2 = ("0" + s).slice(-2);
|
||||
s2 += (d.getMilliseconds() / 1000).toFixed(2).slice(1);
|
||||
return h2 + ":" + m2 + ":" + s2;
|
||||
// s2 += (d.getMilliseconds() / 1000).toFixed(2).slice(1);
|
||||
return month + "/" + day + "-" + h2 + ":" + m2 + ":" + s2;
|
||||
}
|
||||
|
||||
function addToLog(msg, dp, colour, tab) {
|
||||
|
|
|
@ -69,9 +69,10 @@ body {
|
|||
}
|
||||
|
||||
.ChatLog {
|
||||
height: calc(100vh - 137px);
|
||||
padding: 20px !important;
|
||||
font-size: 20px;
|
||||
height: calc(100vh - 127px);
|
||||
padding: 10px !important;
|
||||
font-size: 18px;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
color: white;
|
||||
background-color: black;
|
||||
overflow-x: hidden;
|
||||
|
@ -80,7 +81,7 @@ body {
|
|||
}
|
||||
|
||||
.ChatLogLine {
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.ChatLogLineDisplayName {
|
||||
|
@ -91,8 +92,8 @@ body {
|
|||
}
|
||||
|
||||
.LogLogLine {
|
||||
margin-bottom: 15px;
|
||||
padding: 10px !important;
|
||||
margin-bottom: 7px;
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
.LogLogLineMessage {
|
||||
|
@ -102,14 +103,14 @@ body {
|
|||
.ChatInput {
|
||||
color: #252525;
|
||||
background: #252525;
|
||||
height: 60px !important;
|
||||
height: 45px !important;
|
||||
}
|
||||
|
||||
.ChatInputText {
|
||||
padding: 5px !important;
|
||||
height: 50px !important;
|
||||
padding: 5px 5px 5px 10px !important;
|
||||
height: 35px !important;
|
||||
width: calc(100vw - 20px) !important;
|
||||
font-size: 20px !important;
|
||||
font-size: 18px !important;
|
||||
background-color: white !important;
|
||||
border-style: solid !important;
|
||||
border-color: #232323 !important;
|
||||
|
|
Loading…
Reference in a new issue