Refactor core structure and notification UI

Major refactor to centralize QBCore and replace the web UI stack:

- Move QBConfig into a unified QBCore.Config and initialize QBCore.PlayerData; add shared/functions.lua.
- Remove legacy client/main.lua and server/main.lua exports and update fxmanifest to include shared/functions and drop those main scripts.
- Update client event handling: adapt player data events to QBCore:Client:OnPlayerUpdated and trigger job/gang update events; remove deprecated exploitable handlers.
- Web UI rewrite: remove Vue/Quasar dependency and config module; implement a lightweight vanilla JS notification system (html/js/app.js) with updated html and css assets, plus drawtext tweaks.
- CSS overhaul for notification styling and animations; HTML head/meta/font cleanup.
- Server fixes: use QBCore.Shared.Locations in teleport command and strengthen numeric parsing/validation for coords.
- Add .gitattributes for consistent text/eol handling and small code cleanups (thread/comment removal).

These changes consolidate config/shared logic under QBCore, simplify the frontend dependencies, and fix a few parsing/event issues.
This commit is contained in:
Kakarot
2026-05-19 18:13:35 -05:00
parent 891b039bf3
commit 74ac036d4a
28 changed files with 1242 additions and 1419 deletions
+13 -9
View File
@@ -92,7 +92,7 @@ QBCore.Commands.Add('tp', Lang:t('command.tp.help'), { { name = Lang:t('command.
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
else
local location = QBShared.Locations[args[1]]
local location = QBCore.Shared.Locations[args[1]]
if location then
TriggerClientEvent('QBCore:Command:TeleportToCoords', source, location.x, location.y, location.z, location.w)
else
@@ -101,12 +101,12 @@ QBCore.Commands.Add('tp', Lang:t('command.tp.help'), { { name = Lang:t('command.
end
else
if args[1] and args[2] and args[3] then
local x = tonumber((args[1]:gsub(',', ''))) + .0
local y = tonumber((args[2]:gsub(',', ''))) + .0
local z = tonumber((args[3]:gsub(',', ''))) + .0
local heading = args[4] and tonumber((args[4]:gsub(',', ''))) + .0 or false
if x ~= 0 and y ~= 0 and z ~= 0 then
TriggerClientEvent('QBCore:Command:TeleportToCoords', source, x, y, z, heading)
local x = tonumber((args[1]:gsub(',', '')))
local y = tonumber((args[2]:gsub(',', '')))
local z = tonumber((args[3]:gsub(',', '')))
local heading = args[4] and tonumber((args[4]:gsub(',', ''))) or false
if x and y and z then
TriggerClientEvent('QBCore:Command:TeleportToCoords', source, x + .0, y + .0, z + .0, heading and heading + .0 or false)
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.wrong_format'), 'error')
end
@@ -240,7 +240,9 @@ end, 'admin')
-- Job
QBCore.Commands.Add('job', Lang:t('command.job.help'), {}, false, function(source)
local PlayerJob = QBCore.Functions.GetPlayer(source).PlayerData.job
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return end
local PlayerJob = Player.PlayerData.job
TriggerClientEvent('QBCore:Notify', source, Lang:t('info.job_info', { value = PlayerJob.label, value2 = PlayerJob.grade.name, value3 = PlayerJob.onduty }))
end, 'user')
@@ -256,7 +258,9 @@ end, 'admin')
-- Gang
QBCore.Commands.Add('gang', Lang:t('command.gang.help'), {}, false, function(source)
local PlayerGang = QBCore.Functions.GetPlayer(source).PlayerData.gang
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return end
local PlayerGang = Player.PlayerData.gang
TriggerClientEvent('QBCore:Notify', source, Lang:t('info.gang_info', { value = PlayerGang.label, value2 = PlayerGang.grade.name }))
end, 'user')