From 3f371e5358dc7001a60b3659bcd610e06e268476 Mon Sep 17 00:00:00 2001
From: Matthew <22198949+MafewTM@users.noreply.github.com>
Date: Sun, 20 Oct 2024 20:06:18 -0400
Subject: [PATCH] feat(html): missing ui
---
fxmanifest.lua | 7 ++++
html/index.html | 33 +++++++++++++++++
html/main.css | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
html/script.js | 55 +++++++++++++++++++++++++++++
4 files changed, 189 insertions(+)
create mode 100644 html/index.html
create mode 100644 html/main.css
create mode 100644 html/script.js
diff --git a/fxmanifest.lua b/fxmanifest.lua
index da2569d..fbe2222 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -20,7 +20,14 @@ client_scripts {
server_script 'server/main.lua'
+ui_page 'html/index.html'
+
files {
+ 'html/index.html',
+ 'html/vue.min.js',
+ 'html/script.js',
+ 'html/fingerprint.png',
+ 'html/main.css',
'config/client.lua',
'locales/*.json',
}
diff --git a/html/index.html b/html/index.html
new file mode 100644
index 0000000..c360989
--- /dev/null
+++ b/html/index.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
Spanish Ave | Lagunas Pl
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/html/main.css b/html/main.css
new file mode 100644
index 0000000..cbf1c7e
--- /dev/null
+++ b/html/main.css
@@ -0,0 +1,94 @@
+@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100&display=swap');
+
+html {
+ overflow-x: hidden;
+ overflow-y: hidden;
+}
+
+#helicontainer {
+ font-family: 'Poppins';
+ display:none;
+ position: relative;
+ height: 100vh;
+ width: 100vw;
+ background-color: transparent !important;
+ color: #ffffff;
+ text-transform: uppercase;
+}
+
+.vehicleinfo {
+ display:none;
+}
+
+.heli-model {
+ position:absolute;
+ left: 50%;
+ top: 35%;
+ transform: translate(-50%, -50%);
+ text-shadow:
+ -1px -1px 0 #000,
+ 1px -1px 0 #000,
+ -1px 1px 0 #000,
+ 1px 1px 0 #000;
+}
+
+.heli-plate {
+ position:absolute;
+ left: 50%;
+ bottom: 30%;
+ transform: translate(-50%, -50%);
+ text-shadow:
+ -1px -1px 0 #000,
+ 1px -1px 0 #000,
+ -1px 1px 0 #000,
+ 1px 1px 0 #000;
+}
+
+.heli-street {
+ position:absolute;
+ left: 70%;
+ top: 50.7%;
+ transform: translate(-50%, -50%);
+ text-shadow:
+ -1px -1px 0 #000,
+ 1px -1px 0 #000,
+ -1px 1px 0 #000,
+ 1px 1px 0 #000;
+}
+
+.heli-speed {
+ position:absolute;
+ left: 35%;
+ top: 35%;
+ text-shadow:
+ -1px -1px 0 #000,
+ 1px -1px 0 #000,
+ -1px 1px 0 #000,
+ 1px 1px 0 #000;
+ font-size: 22px;
+}
+
+.heli-rectangle {
+ position:absolute;
+ left: 50%;
+ top: 50%;
+ width: 70px;
+ height: 70px;
+ background: transparent;
+ border: 1px solid #ab0c0c;
+ transform: translate(-50%, -50%);
+}
+
+.scan {
+ position:absolute;
+ left: 37%;
+ bottom: 39%;
+ border: 2px solid #cccccc;
+ background: rgba(155, 155, 155, 0.0);
+ height: 20vh;
+ width: 1vw;
+}
+
+.scanBar {
+ background: #cccccc;
+}
\ No newline at end of file
diff --git a/html/script.js b/html/script.js
new file mode 100644
index 0000000..8042427
--- /dev/null
+++ b/html/script.js
@@ -0,0 +1,55 @@
+HeliCam = {};
+
+HeliCam.Open = () => {
+ $("#helicontainer").css("display", "block");
+ $(".scanBar").css("height", "0%");
+}
+
+HeliCam.UpdateScan = (data) => {
+ $(".scanBar").css("height", data.scanvalue + "%");
+}
+
+HeliCam.UpdateVehicleInfo = (data) => {
+ $(".vehicleinfo").css("display", "block");
+ $(".scanBar").css("height", "100%");
+ $(".heli-model").find("p").html("MODEL: " + data.model);
+ $(".heli-plate").find("p").html("PLATE: " + data.plate);
+ $(".heli-street").find("p").html(data.street);
+ $(".heli-speed").find("p").html(data.speed + " KM/U");
+}
+
+HeliCam.DisableVehicleInfo = () => {
+ $(".vehicleinfo").css("display", "none");
+}
+
+HeliCam.Close = () => {
+ $("#helicontainer").css("display", "none");
+ $(".vehicleinfo").css("display", "none");
+ $(".scanBar").css("height", "0%");
+}
+
+document.onreadystatechange = () => {
+ if (document.readyState === "complete") {
+ window.addEventListener('message', (event) => {
+ if (event.data.type == "heliopen") {
+ HeliCam.Open();
+ } else if (event.data.type == "heliclose") {
+ HeliCam.Close();
+ } else if (event.data.type == "heliscan") {
+ HeliCam.UpdateScan(event.data);
+ } else if (event.data.type == "heliupdateinfo") {
+ HeliCam.UpdateVehicleInfo(event.data);
+ } else if (event.data.type == "disablescan") {
+ HeliCam.DisableVehicleInfo();
+ }
+ });
+ };
+};
+
+$(document).on('keydown', (event) => {
+ switch(event.which) {
+ case 27: // ESC
+ Fingerprint.Close();
+ break;
+ }
+});
\ No newline at end of file