Compare commits

...
4 Commits
Author SHA1 Message Date
Kostas Drakontidis 7ce2d111be Disabled zoom & fixed indentation 2025-05-18 20:48:26 +03:00
admin d2b606a03a Added about page 2025-05-17 13:43:27 +03:00
admin 8a01233feb Update app.conf.sample 2025-05-17 12:25:48 +03:00
admin a794688270 Update auth.ejs 2025-05-17 11:18:19 +03:00
10 changed files with 81 additions and 13 deletions
+8
View File
@@ -307,4 +307,12 @@ router.get("/", async (req, res) => {
} }
}); });
router.get("/about", (req, res) => {
res.render("about", {
page_title: app_conf.name,
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
version: app_conf.version
});
});
module.exports = router; module.exports = router;
+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<title>
<%= page_title %>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="<%= css_path %>">
</head>
<body>
<div class="control_div" style="display: flex; flex-direction: row; justify-content: space-between;">
<label style="font-size: 200%;">CRTelemetry SQLite3</label>
</div>
<div class="main_div">
<center>
<label>Version <%= version %></label>
<br>
<a href="https://github.com/Centaurus-Racing-Team/5G-telemetry" target="_blank"
style="font-size: 150%;">GitHub</a>
</center>
<br>
<a href="/app"><span>&#129152; </span>Return</a>
</div>
</body>
</html>
+1
View File
@@ -6,6 +6,7 @@
<%= page_title %> <%= page_title %>
</title> </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link <link
+3 -1
View File
@@ -6,6 +6,7 @@
<%= page_title %> <%= page_title %>
</title> </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link <link
@@ -20,7 +21,8 @@
style='font-family: "Ubuntu", sans-serif; font-weight: 500; font-style: normal; font-size: 200%;'>Centaurus style='font-family: "Ubuntu", sans-serif; font-weight: 500; font-style: normal; font-size: 200%;'>Centaurus
Racing Team</label> Racing Team</label>
</div> </div>
<div class="main_div" style="display: flex; flex-direction: column; justify-content: space-between;"> <div class="main_div"
style="display: flex; flex-direction: column; justify-content: space-between; font-size: 150%; margin-top: 15px; margin-bottom: 15px;">
<div style="display: flex; flex-direction: row; justify-content: space-evenly;"> <div style="display: flex; flex-direction: row; justify-content: space-evenly;">
<label>CRTelemetry SQLite3</label> <label>CRTelemetry SQLite3</label>
<a href="<%= protocol %>://<%= host %>/app">Enter</a> <a href="<%= protocol %>://<%= host %>/app">Enter</a>
+1
View File
@@ -6,6 +6,7 @@
<%= page_title %> <%= page_title %>
</title> </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link <link
+5 -2
View File
@@ -6,6 +6,7 @@
<%= page_title %> <%= page_title %>
</title> </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link <link
@@ -20,8 +21,10 @@
<div class="control_div" style="display: flex; flex-direction: row; justify-content: space-between;"> <div class="control_div" style="display: flex; flex-direction: row; justify-content: space-between;">
<label style="font-size: 200%;">CRTelemetry SQLite3</label> <label style="font-size: 200%;">CRTelemetry SQLite3</label>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<label id="upload" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129093; </span>Upload</label> <label id="upload" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129093;
<label id="download" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129095; </span>Download</label> </span>Upload</label>
<label id="download" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129095;
</span>Download</label>
<label id="logout" style="cursor: pointer; margin-left: 10px;"><span>&#129092; </span>Logout</label> <label id="logout" style="cursor: pointer; margin-left: 10px;"><span>&#129092; </span>Logout</label>
</div> </div>
</div> </div>
+8 -2
View File
@@ -6,6 +6,7 @@
<%= page_title %> <%= page_title %>
</title> </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link <link
@@ -21,8 +22,10 @@
<label style="font-size: 200%;">CRTelemetry SQLite3</label> <label style="font-size: 200%;">CRTelemetry SQLite3</label>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<label id="add" style="cursor: pointer; margin-right: 10px;"><span>&#43; </span>Add</label> <label id="add" style="cursor: pointer; margin-right: 10px;"><span>&#43; </span>Add</label>
<label id="upload" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129093; </span>Upload</label> <label id="upload" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129093;
<label id="download" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129095; </span>Download</label> </span>Upload</label>
<label id="download" style="cursor: pointer; margin-left: 10px; margin-right: 10px;"><span>&#129095;
</span>Download</label>
<label id="logout" style="cursor: pointer; margin-left: 10px;"><span>&#129092; </span>Logout</label> <label id="logout" style="cursor: pointer; margin-left: 10px;"><span>&#129092; </span>Logout</label>
</div> </div>
</div> </div>
@@ -35,6 +38,9 @@
<%- table_data %> <%- table_data %>
</table> </table>
</div> </div>
<div class="about_div">
<center><a href="/app/about">About</label></center>
</div>
</body> </body>
</html> </html>
+1 -1
View File
@@ -1,11 +1,11 @@
module.exports = { module.exports = {
version: "1.0",
name: "CRTelemetry", name: "CRTelemetry",
host: "localhost", host: "localhost",
protocol: "http", protocol: "http",
port: 80, port: 80,
username: "admin", username: "admin",
password: "password", password: "password",
token_ttl: 1800,
logger: { logger: {
level: "info", level: "info",
error_path: "/app/logs/error.log", error_path: "/app/logs/error.log",
+18 -5
View File
@@ -2,14 +2,17 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #121212; background-color: #121212;
font-family: "Ubuntu", sans-serif; font-family: "Ubuntu", sans-serif;
font-weight: 500; font-weight: 500;
font-style: normal; font-style: normal;
-webkit-user-select: none; /* Safari */ -webkit-user-select: none;
-ms-user-select: none; /* IE 10 and IE 11 */ /* Safari */
user-select: none; /* Standard syntax */ -ms-user-select: none;
/* IE 10 and IE 11 */
user-select: none;
/* Standard syntax */
} }
a:visited { a:visited {
@@ -27,6 +30,7 @@ a:hover {
margin: 3px; margin: 3px;
padding: 5px; padding: 5px;
border-radius: 5px; border-radius: 5px;
overflow: auto;
} }
.main_div { .main_div {
@@ -35,6 +39,15 @@ a:hover {
margin: 3px; margin: 3px;
padding: 5px; padding: 5px;
border-radius: 5px; border-radius: 5px;
overflow: auto;
}
.about_div {
color: #ececec;
background-color: #272727;
margin: 3px;
padding: 5px;
border-radius: 5px;
} }
table { table {
+2 -2
View File
@@ -17,11 +17,11 @@ commit.onmousedown = async function () {
commit.ondblclick = async function () { commit.ondblclick = async function () {
if (sql_row[1].cells[0].firstChild.value) { if (sql_row[1].cells[0].firstChild.value) {
let req_body = {}; let req_body = {};
for (let i = 1; i < sql_row[1].cells.length; i++) { for (let i = 1; i < sql_row[1].cells.length; i++) {
req_body[sql_row[0].cells[i].firstChild.textContent] = sql_row[1].cells[i].firstChild[sql_row[1].cells[i].firstChild.selectedIndex].text; req_body[sql_row[0].cells[i].firstChild.textContent] = sql_row[1].cells[i].firstChild[sql_row[1].cells[i].firstChild.selectedIndex].text;
} }
try { try {
const response = await fetch(`/app/add?element=${sql_row[1].cells[0].firstChild.value}`, { const response = await fetch(`/app/add?element=${sql_row[1].cells[0].firstChild.value}`, {
method: "POST", method: "POST",