Merge pull request #460 from Gellipapa/main

fix(esx_banking) fix blips, remove unused links and protect escape spam
This commit is contained in:
Benzo
2022-09-11 18:49:38 +02:00
committed by GitHub
4 changed files with 9 additions and 94 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ end
local function CreateBlips()
local tmpActiveBlips = {}
for i = 1, #Config.Banks do
if type(Config.Banks[i].Blip) == 'table' and Config.Banks[i].Blip.Activate then
if type(Config.Banks[i].Blip) == 'table' and Config.Banks[i].Blip.Enabled then
local blip = AddBlipForCoord(Config.Banks[i].Position.xy)
SetBlipSprite(blip, Config.Banks[i].Blip.Sprite)
SetBlipScale(blip, Config.Banks[i].Blip.Scale)
@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<path d="M474.045,173.813c-4.201,1.371-6.494,5.888-5.123,10.088c7.571,23.199,11.411,47.457,11.411,72.1
c0,62.014-24.149,120.315-68,164.166s-102.153,68-164.167,68s-120.316-24.149-164.167-68S16,318.014,16,256
S40.149,135.684,84,91.833s102.153-68,164.167-68c32.889,0,64.668,6.734,94.455,20.017c28.781,12.834,54.287,31.108,75.81,54.315
c3.004,3.239,8.066,3.431,11.306,0.425c3.24-3.004,3.43-8.065,0.426-11.306c-23-24.799-50.26-44.328-81.024-58.047
C317.287,15.035,283.316,7.833,248.167,7.833c-66.288,0-128.608,25.813-175.48,72.687C25.814,127.392,0,189.712,0,256
c0,66.287,25.814,128.607,72.687,175.479c46.872,46.873,109.192,72.687,175.48,72.687s128.608-25.813,175.48-72.687
c46.873-46.872,72.687-109.192,72.687-175.479c0-26.332-4.105-52.26-12.201-77.064
C482.762,174.736,478.245,172.445,474.045,173.813z"/>
<path d="M504.969,83.262c-4.532-4.538-10.563-7.037-16.98-7.037s-12.448,2.499-16.978,7.034l-7.161,7.161
c-3.124,3.124-3.124,8.189,0,11.313c3.124,3.123,8.19,3.124,11.314-0.001l7.164-7.164c1.51-1.512,3.52-2.344,5.66-2.344
s4.15,0.832,5.664,2.348c1.514,1.514,2.348,3.524,2.348,5.663s-0.834,4.149-2.348,5.663L217.802,381.75
c-1.51,1.512-3.52,2.344-5.66,2.344s-4.15-0.832-5.664-2.348L98.747,274.015c-1.514-1.514-2.348-3.524-2.348-5.663
c0-2.138,0.834-4.149,2.351-5.667c1.51-1.512,3.52-2.344,5.66-2.344s4.15,0.832,5.664,2.348l96.411,96.411
c1.5,1.5,3.535,2.343,5.657,2.343s4.157-0.843,5.657-2.343l234.849-234.849c3.125-3.125,3.125-8.189,0-11.314
c-3.124-3.123-8.189-3.123-11.313,0L212.142,342.129l-90.75-90.751c-4.533-4.538-10.563-7.037-16.98-7.037
s-12.448,2.499-16.978,7.034c-4.536,4.536-7.034,10.565-7.034,16.977c0,6.412,2.498,12.441,7.034,16.978l107.728,107.728
c4.532,4.538,10.563,7.037,16.98,7.037c6.417,0,12.448-2.499,16.977-7.033l275.847-275.848c4.536-4.536,7.034-10.565,7.034-16.978
S509.502,87.794,504.969,83.262z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

+7 -34
View File
@@ -1,3 +1,4 @@
var LOADED = true
class Components{
static allComponents = []
static generateAllComponents(generatedData,generateType = "bank"){
@@ -55,11 +56,12 @@ class Components{
<circle class="loader-path" cx="50" cy="50" r="20"></circle>
</svg>`);
$(appendedDiv).fadeIn(200)
LOADED = true
setTimeout(() => {
$(`${appendedDiv}`).fadeOut(200)
$("#wrapper").fadeIn().css("display","flex");
if(appendedDiv == ".loader") $("#container").fadeIn().css("display","flex")
LOADED = false
}, 2500);
}else if(state == "hide"){
$(`${appendedDiv}`).fadeOut(200)
@@ -264,25 +266,7 @@ class Render {
language = ""
constructor(elementID){
this.elementID = elementID
// this.fullRenderData = renderData
}
// getCurrentTemplate(){
// let functionName = ""
// switch(this.elementID){
// case "bankcard":
// functionName = this.renderBankCard()
// break;
// case "your_money":
// functionName = this.renderMyMoneySection()
// break;
// case "transaction":
// functionName = this.renderTransactions()
// break;
// }
// return functionName;
// }
renderBankCard(){
const bankData = this.fullRenderData
$("#bankcard").empty();
@@ -898,7 +882,6 @@ $(document).ready(function(){
second: false
}
let currentNotify = false
$(document).on('keyup','input[type="number"] , input[type="password"]',function(){
let buttonGroup = $(this).closest('.input-groups-container').find('button');
@@ -927,12 +910,6 @@ $(document).ready(function(){
if($(this).val() != '') {
if($(this).attr("name") == "pincode" && $(this).val().length < 4){
if(!currentNotify){
currentNotify = true
setTimeout(function(){
currentNotify = false
},3000)
}
return
}
@@ -962,12 +939,6 @@ $(document).ready(function(){
let inputValue = $(this).prev('input').val();
if(inputValue == undefined){return}
if((inputValue.length == 0 && inputValue <= 0 )){
if(!currentNotify){
currentNotify = true
setTimeout(function(){
currentNotify = false
},3000)
}
return
}
@@ -997,8 +968,10 @@ $(document).ready(function(){
$(document).keyup(function(e) {
if(e.which == 27) {
Components.loader(".loader","hide")
$.post('https://esx_banking/close', JSON.stringify({}));
if (!LOADED) {
Components.loader(".loader","hide")
$.post('https://esx_banking/close', JSON.stringify({}));
}
}
});
})
+1 -3
View File
@@ -3,7 +3,6 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.12.1/datatables.min.css"/>
<link rel="stylesheet" href="./libs/simple-notify.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="css/app.css" type="text/css" />
</head>
@@ -15,7 +14,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js" integrity="sha512-ElRFoEQdI5Ht6kZvyzXhYG9NqjtkmlkfYk0wr6wHxU9JEHakS7UJZNeml5ALk+8IKlU6jDgMabC3vkumRokgJA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.12.1/datatables.min.js"></script>
<script src="https://kit.fontawesome.com/bc14c07181.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="./libs/simple-notify.min.js"></script>
<script src="scripts/app.js"></script>
</body>
</html>
</html>