From 2076bd8bcde8ba9f4ac84c4bd4b703393f0733a4 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Mon, 12 Sep 2022 20:40:48 +0200 Subject: [PATCH 1/3] some issue fix and responsive table fix --- [esx_addons]/esx_banking/client/main.lua | 4 ---- [esx_addons]/esx_banking/html/config.json | 8 +++++++ [esx_addons]/esx_banking/html/css/app.css | 7 ++++++ [esx_addons]/esx_banking/html/scripts/app.js | 25 +++++++++++++------- [esx_addons]/esx_banking/locales/en.lua | 6 +---- [esx_addons]/esx_banking/locales/hu.lua | 6 +---- 6 files changed, 33 insertions(+), 23 deletions(-) diff --git a/[esx_addons]/esx_banking/client/main.lua b/[esx_addons]/esx_banking/client/main.lua index 9d84e734..3dd4a489 100644 --- a/[esx_addons]/esx_banking/client/main.lua +++ b/[esx_addons]/esx_banking/client/main.lua @@ -126,14 +126,10 @@ function OpenUi(atm) openATM = atm, datas = { your_money_panel = { - title = _U('your_money_title'), - desc = _U('your_money_desc'), accountsData = {{ - title = _U('your_money_cash'), name = "cash", amount = data.money }, { - title = _U('your_money_bank'), name = "bank", amount = data.bankMoney }} diff --git a/[esx_addons]/esx_banking/html/config.json b/[esx_addons]/esx_banking/html/config.json index 5eacc1c5..5ded13f2 100644 --- a/[esx_addons]/esx_banking/html/config.json +++ b/[esx_addons]/esx_banking/html/config.json @@ -71,6 +71,10 @@ } ], "LAUNGAGE": { + "your_money_title":"Balance", + "your_money_desc":"Here you can see your current balance and cash.", + "your_money_cash_label":"Your cash", + "your_money_bank_label":"Your bank balance", "withdraw":"WITHDRAW", "deposit":"DEPOSIT", "transfer":"TRANSFER", @@ -165,6 +169,10 @@ ], "LAUNGAGE": { + "your_money_title":"Egyenleged", + "your_money_desc":"Itt láthatod a jelenlegi egyenleged és készpénzed.", + "your_money_cash_label":"Készpénz", + "your_money_bank_label":"Banki egyenleged", "withdraw":"KIVÉTEL", "deposit":"BETÉTEL", "transfer":"UTALÁS", diff --git a/[esx_addons]/esx_banking/html/css/app.css b/[esx_addons]/esx_banking/html/css/app.css index 3c53fbfd..0c70a9c0 100644 --- a/[esx_addons]/esx_banking/html/css/app.css +++ b/[esx_addons]/esx_banking/html/css/app.css @@ -758,3 +758,10 @@ table.dataTable tbody tr:hover { padding: 3vmin; border-radius: 1.38vmin; } + +/*MEDIA QUERY*/ +@media only screen and (max-width: 1280px) { + .dataTables_scrollBody{ + max-height: 310px !important; + } +} diff --git a/[esx_addons]/esx_banking/html/scripts/app.js b/[esx_addons]/esx_banking/html/scripts/app.js index a2bc9585..179b481a 100644 --- a/[esx_addons]/esx_banking/html/scripts/app.js +++ b/[esx_addons]/esx_banking/html/scripts/app.js @@ -57,6 +57,8 @@ class Components{ `); $(appendedDiv).fadeIn(200) LOADED = true + + setTimeout(() => { $(`${appendedDiv}`).fadeOut(200) $("#wrapper").fadeIn().css("display","flex"); @@ -371,14 +373,13 @@ class Render { renderMyMoneySection(){ const moneyData = this.fullRenderData $("#your-money-panel").empty(); - let template = `

${moneyData.title}

-

${moneyData.desc}

+ let template = `

${this.language.your_money_title}

+

${this.language.your_money_desc}

`; moneyData.accountsData.forEach((data)=>{ - template += `
-

${data.title}

+

${this.language[`your_money_${data.name}_label`]}

${this.language.moneyFormat.replace("__replaceData__",data.amount)}
`; @@ -480,8 +481,7 @@ class Pincode { } } - -const timeZone = localStorage.getItem("TIME_ZONE") +var timeZone = "" class Utils { static dateFormat(date){ if(typeof(date) == "number"){ @@ -489,8 +489,7 @@ class Utils { }else{ var newDate = date } - - return newDate.toLocaleString([timeZone], { + return newDate.toLocaleString([Utils.getTimeZone()], { weekday:"long", hour:"2-digit", minute:"2-digit", @@ -529,6 +528,14 @@ class Utils { } return genNum; } + + static setTimeZone(newTimeZone){ + timeZone = newTimeZone + } + + static getTimeZone(){ + return timeZone + } } class Graph{ @@ -643,7 +650,7 @@ $(document).ready(function(){ if(data[data.lang] != null){ lang = data.lang } - localStorage.setItem("TIME_ZONE",lang == "EN" ? "en-GB" : "hu-HU") + Utils.setTimeZone(lang == "EN" ? "en-GB" : "hu-HU") formData = new GlobalStore(data[lang]["DYNAMIC_FORM_DATA"]) language = new GlobalStore(data[lang]["LAUNGAGE"]) }).fail(function(error){ diff --git a/[esx_addons]/esx_banking/locales/en.lua b/[esx_addons]/esx_banking/locales/en.lua index 5fd8777b..9f5453c8 100644 --- a/[esx_addons]/esx_banking/locales/en.lua +++ b/[esx_addons]/esx_banking/locales/en.lua @@ -12,9 +12,5 @@ Locales['en'] = { ['not_enough_money'] = "Not enough money! You need %s money!", ['pincode_not_found'] = "Invalid PIN code", ['pincode_found'] = "Valid PIN code...", - ['bank_name'] = "Fleeca Bank", - ['your_money_title'] = "Balance", - ['your_money_desc'] = "Here you can see your current balance and cash.", - ['your_money_cash'] = "Your cash", - ['your_money_bank'] = "Your bank balance" + ['bank_name'] = "Fleeca Bank" } \ No newline at end of file diff --git a/[esx_addons]/esx_banking/locales/hu.lua b/[esx_addons]/esx_banking/locales/hu.lua index a5877b32..0d74a8c4 100644 --- a/[esx_addons]/esx_banking/locales/hu.lua +++ b/[esx_addons]/esx_banking/locales/hu.lua @@ -12,9 +12,5 @@ Locales['hu'] = { ['not_enough_money'] = "Nincs elég pénzed, még szükséged lesz ennyire: %s", ['pincode_not_found'] = "Érvénytelen PIN kód", ['pincode_found'] = "Érvényes PIN kód...", - ['bank_name'] = "Fleeca Bank", - ['your_money_title'] = "Egyenleg", - ['your_money_desc'] = "Itt láthatod a jelenlegi egyenleged és készpénzed.", - ['your_money_cash'] = "Készpénz", - ['your_money_bank'] = "Banki egyenleged" + ['bank_name'] = "Fleeca Bank" } \ No newline at end of file From 7faa154cee5a8331c48a5babded2350d0a298041 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Mon, 12 Sep 2022 20:58:15 +0200 Subject: [PATCH 2/3] add IT translate and change default timezone --- [esx_addons]/esx_banking/html/config.json | 97 ++++++++++++++++++++ [esx_addons]/esx_banking/html/scripts/app.js | 2 +- [esx_addons]/esx_banking/locales/it.lua | 16 ++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 [esx_addons]/esx_banking/locales/it.lua diff --git a/[esx_addons]/esx_banking/html/config.json b/[esx_addons]/esx_banking/html/config.json index 5ded13f2..0deac798 100644 --- a/[esx_addons]/esx_banking/html/config.json +++ b/[esx_addons]/esx_banking/html/config.json @@ -195,5 +195,102 @@ "tableFullLanguage":"Hungarian" } } + }, + "IT":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Close", + "bankTitle":"Fleeca Bank", + "mainExitButtonText": "Disconnettersi" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"conferma", + "inputPlaceholder": "4 cifre...", + "title":"IMPOSTAZIONE CODICE PIN", + "description": "Qui puoi impostare o modificare il codice PIN.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"conferma", + "inputPlaceholder": "Quantità", + "title":"RITIRARE", + "description": "Qui puoi prelevare i tuoi soldi dalla banca.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"conferma", + "inputPlaceholder": "Quantità", + "title":"DEPOSITARE", + "description": "Qui puoi depositare i tuoi soldi in banca.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"trasferisci", + "inputPlaceholder": "Quantità", + "inputPlaceholder2": "Giocatore ID", + "title":"TRASFERIMENTO", + "description": "Qui puoi trasferire i tuoi soldi a qualcun altro." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"CRONOLOGIA DELLE TRANSAZIONI", + "description": "Qui puoi vedere la cronologia delle tue operazioni.", + "moreHistoryText": "Mostra più cronologia", + "moreGraphText": "Mostra tutto il grafico" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Enter PIN", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Close" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"Fleeca Bank", + "closeButtonText":"Disconnettersi" + } + ], + "LAUNGAGE": { + "your_money_title":"saldo", + "your_money_desc":"qui puoi vedere il saldo attuale e contanti.", + "your_money_cash":"i tuoi soldi", + "your_money_bank":"il tuo saldo bancario", + "withdraw":"RITIRARE", + "deposit":"DEPOSITARE", + "transfer":"TRASFERIMENTO", + "transferReceive":"TRASFERIMENTO RICEVUTO", + "moneyFormat":"$__replaceData__", + "graphTitle":"Il tuo bilancio", + "moreGraphTitle": "grafico", + "moreHistoryTitle":"Mostra la cronologia", + "inputErrorTitle":"I dati non sono corretti", + "inputErrorMessage":"Non può essere vuoto o un valore inferiore a 1!", + "showPincodeErrorTitle":"PIN errato", + "showPincodeErrorMessage":"Il pin deve contenere almeno 4 caratteri!", + "tableLang":{ + "typeLabel": "Tipo di transazione", + "balanceLabel":"bilancio", + "amountLabel":"quantità", + "timeLabel":"tempo", + "searchInputPlaceholder":"Cerca ...", + "_comment": "tabella Opzioni complete della lingua: inglese, ungherese, italiana puoi trovare qui tutte le lingue: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"Italiano" + } + } } } diff --git a/[esx_addons]/esx_banking/html/scripts/app.js b/[esx_addons]/esx_banking/html/scripts/app.js index 179b481a..2cf8afe5 100644 --- a/[esx_addons]/esx_banking/html/scripts/app.js +++ b/[esx_addons]/esx_banking/html/scripts/app.js @@ -650,7 +650,7 @@ $(document).ready(function(){ if(data[data.lang] != null){ lang = data.lang } - Utils.setTimeZone(lang == "EN" ? "en-GB" : "hu-HU") + Utils.setTimeZone(lang == "HU" ? "hu-HU" : "en-GB") formData = new GlobalStore(data[lang]["DYNAMIC_FORM_DATA"]) language = new GlobalStore(data[lang]["LAUNGAGE"]) }).fail(function(error){ diff --git a/[esx_addons]/esx_banking/locales/it.lua b/[esx_addons]/esx_banking/locales/it.lua new file mode 100644 index 00000000..ed5de004 --- /dev/null +++ b/[esx_addons]/esx_banking/locales/it.lua @@ -0,0 +1,16 @@ +Locales['it'] = { + ['invalid_amount'] = 'questa è una somma di denaro non valida', + ['deposit_money'] = 'hai depositato $%s', + ['withdraw_money'] = 'hai prelevato $%s', + ['pincode_money'] = 'hai un nuovo codice pin %s', + ['transfer_money'] = 'hai trasferito con successo il denaro a $%s ID: %s', + ['receive_transfer'] = 'hai ricevuto un trasferimento di denaro da $%s ID: %s', + ['press_e_banking'] = 'premi [E] per accedere alla banca', + ['access_bank'] = 'accedi alla banca', + ['banking_blip'] = 'Banca', + ['cant_do_it'] = "non puoi farlo!", + ['not_enough_money'] = "non hai abbastanza soldi! hai bisogno di %s soldi!", + ['pincode_not_found'] = "codice PIN errato", + ['pincode_found'] = "codice PIN valido...", + ['bank_name'] = "Fleeca Bank", +} \ No newline at end of file From 3936625dc7dfd733bf19a029fc08225357753b4b Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Mon, 12 Sep 2022 21:25:33 +0200 Subject: [PATCH 3/3] add some images in readme --- readme.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7b3dcc98..55d557c6 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,12 @@ +

ESX BANKING

+ +## BANK UI +![esx_banking_pic1](https://user-images.githubusercontent.com/22717950/189738189-375101ac-c86b-4ce8-8df3-19d740c3809c.png) +## ATM UI +![esx_banking_pic2](https://user-images.githubusercontent.com/22717950/189738199-a325092b-5f1d-4c7f-8950-d660d053ed0f.png) +![esx_banking_pic3](https://user-images.githubusercontent.com/22717950/189738210-7af2c7d5-7fa1-4f70-8460-743ee9258f88.png) + +

ESX Legacy

Discord - Website - Documentation @@ -7,7 +16,7 @@


-### Supporters +### Supporters Interested in helping us? [Take a look at our patreon](https://www.patreon.com/esx "Take a look at our patreon")