mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +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 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/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>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -191,7 +192,7 @@
|
||||||
}
|
}
|
||||||
// else fall through to default
|
// else fall through to default
|
||||||
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,9 @@ var SHIFT_KEY = 33554432;
|
||||||
var FLOOF_CHAT_CHANNEL = "Chat";
|
var FLOOF_CHAT_CHANNEL = "Chat";
|
||||||
var FLOOF_NOTIFICATION_CHANNEL = "Floof-Notif";
|
var FLOOF_NOTIFICATION_CHANNEL = "Floof-Notif";
|
||||||
|
|
||||||
|
var MAIN_CHAT_WINDOW_HEIGHT = 450;
|
||||||
|
var MAIN_CHAT_WINDOW_WIDTH = 750;
|
||||||
|
|
||||||
Script.scriptEnding.connect(function () {
|
Script.scriptEnding.connect(function () {
|
||||||
shutdown();
|
shutdown();
|
||||||
});
|
});
|
||||||
|
@ -50,14 +53,14 @@ var visible = false;
|
||||||
var historyVisible = false;
|
var historyVisible = false;
|
||||||
var settingsRoot = "FloofChat";
|
var settingsRoot = "FloofChat";
|
||||||
|
|
||||||
var athenaGotoUrl = "https://metaverse.projectathena.io/interim/d-goto/app/goto.json";
|
var vircadiaGotoUrl = "https://metaverse.vircadia.com/interim/d-goto/app/goto.json";
|
||||||
var gotoJSONUrl = Settings.getValue(settingsRoot + "/gotoJSONUrl", athenaGotoUrl);
|
var gotoJSONUrl = Settings.getValue(settingsRoot + "/gotoJSONUrl", vircadiaGotoUrl);
|
||||||
|
|
||||||
var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain": false, "Grid": true});
|
var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain": false, "Grid": true});
|
||||||
|
|
||||||
var ws;
|
var ws;
|
||||||
var wsReady = false;
|
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 shutdownBool = false;
|
||||||
|
|
||||||
var defaultColour = {red: 255, green: 255, blue: 255};
|
var defaultColour = {red: 255, green: 255, blue: 255};
|
||||||
|
@ -166,11 +169,11 @@ function setupHistoryWindow() {
|
||||||
chatHistory = new OverlayWebWindow({
|
chatHistory = new OverlayWebWindow({
|
||||||
title: 'Chat',
|
title: 'Chat',
|
||||||
source: ROOT + "FloofChat.html?appUUID=" + appUUID + "&" + Date.now(),
|
source: ROOT + "FloofChat.html?appUUID=" + appUUID + "&" + Date.now(),
|
||||||
width: 900,
|
width: MAIN_CHAT_WINDOW_WIDTH,
|
||||||
height: 700,
|
height: MAIN_CHAT_WINDOW_HEIGHT,
|
||||||
visible: false
|
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.webEventReceived.connect(onWebEventReceived);
|
||||||
chatHistory.closed.connect(toggleChatHistory);
|
chatHistory.closed.connect(toggleChatHistory);
|
||||||
}
|
}
|
||||||
|
@ -293,7 +296,7 @@ function onWebEventReceived(event) {
|
||||||
colours[event.colourType] = event.colour;
|
colours[event.colourType] = event.colour;
|
||||||
}
|
}
|
||||||
if (event.cmd === "REDOCK") {
|
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") {
|
if (event.cmd === "GOTO") {
|
||||||
gotoConfirm(event.url);
|
gotoConfirm(event.url);
|
||||||
|
@ -464,14 +467,16 @@ function messageReceived(channel, message) {
|
||||||
|
|
||||||
function time() {
|
function time() {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
|
var month = (d.getMonth()).toString();
|
||||||
|
var day = (d.getDate()).toString();
|
||||||
var h = (d.getHours()).toString();
|
var h = (d.getHours()).toString();
|
||||||
var m = (d.getMinutes()).toString();
|
var m = (d.getMinutes()).toString();
|
||||||
var s = (d.getSeconds()).toString();
|
var s = (d.getSeconds()).toString();
|
||||||
var h2 = ("0" + h).slice(-2);
|
var h2 = ("0" + h).slice(-2);
|
||||||
var m2 = ("0" + m).slice(-2);
|
var m2 = ("0" + m).slice(-2);
|
||||||
var s2 = ("0" + s).slice(-2);
|
var s2 = ("0" + s).slice(-2);
|
||||||
s2 += (d.getMilliseconds() / 1000).toFixed(2).slice(1);
|
// s2 += (d.getMilliseconds() / 1000).toFixed(2).slice(1);
|
||||||
return h2 + ":" + m2 + ":" + s2;
|
return month + "/" + day + "-" + h2 + ":" + m2 + ":" + s2;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToLog(msg, dp, colour, tab) {
|
function addToLog(msg, dp, colour, tab) {
|
||||||
|
|
|
@ -69,9 +69,10 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ChatLog {
|
.ChatLog {
|
||||||
height: calc(100vh - 137px);
|
height: calc(100vh - 127px);
|
||||||
padding: 20px !important;
|
padding: 10px !important;
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
@ -80,7 +81,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ChatLogLine {
|
.ChatLogLine {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ChatLogLineDisplayName {
|
.ChatLogLineDisplayName {
|
||||||
|
@ -91,8 +92,8 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.LogLogLine {
|
.LogLogLine {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 7px;
|
||||||
padding: 10px !important;
|
padding: 6px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.LogLogLineMessage {
|
.LogLogLineMessage {
|
||||||
|
@ -102,14 +103,14 @@ body {
|
||||||
.ChatInput {
|
.ChatInput {
|
||||||
color: #252525;
|
color: #252525;
|
||||||
background: #252525;
|
background: #252525;
|
||||||
height: 60px !important;
|
height: 45px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ChatInputText {
|
.ChatInputText {
|
||||||
padding: 5px !important;
|
padding: 5px 5px 5px 10px !important;
|
||||||
height: 50px !important;
|
height: 35px !important;
|
||||||
width: calc(100vw - 20px) !important;
|
width: calc(100vw - 20px) !important;
|
||||||
font-size: 20px !important;
|
font-size: 18px !important;
|
||||||
background-color: white !important;
|
background-color: white !important;
|
||||||
border-style: solid !important;
|
border-style: solid !important;
|
||||||
border-color: #232323 !important;
|
border-color: #232323 !important;
|
||||||
|
|
Loading…
Reference in a new issue