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
+18 -12
View File
@@ -9,36 +9,42 @@ local function tPrint(tbl, indent)
print(formatting)
tPrint(v, indent + 1)
elseif tblType == 'boolean' then
print(('%s^1 %s ^0'):format(formatting, v))
print(('%s ^1%s^0'):format(formatting, v))
elseif tblType == 'function' then
print(('%s^9 %s ^0'):format(formatting, v))
print(('%s ^9%s^0'):format(formatting, v))
elseif tblType == 'number' then
print(('%s^5 %s ^0'):format(formatting, v))
print(('%s ^5%s^0'):format(formatting, v))
elseif tblType == 'string' then
print(("%s ^2'%s' ^0"):format(formatting, v))
print(('%s ^2\'%s\'^0'):format(formatting, v))
elseif tblType == 'nil' then
print(('%s ^8nil^0'):format(formatting))
else
print(('%s^2 %s ^0'):format(formatting, v))
print(('%s ^2%s^0'):format(formatting, tostring(v)))
end
end
else
print(('%s ^0%s'):format(string.rep(' ', indent), tbl))
print(('%s ^0%s'):format(string.rep(' ', indent), tostring(tbl)))
end
end
RegisterServerEvent('QBCore:DebugSomething', function(tbl, indent, resource)
print(('\x1b[4m\x1b[36m[ %s : DEBUG]\x1b[0m'):format(resource))
RegisterNetEvent('QBCore:DebugSomething', function(tbl, indent, resource)
resource = resource or 'unknown'
print(('^4[ %s : DEBUG]^0'):format(resource))
tPrint(tbl, indent)
print('\x1b[4m\x1b[36m[ END DEBUG ]\x1b[0m')
print('^4[ END DEBUG ]^0')
end)
function QBCore.Debug(tbl, indent)
TriggerEvent('QBCore:DebugSomething', tbl, indent, GetInvokingResource() or 'qb-core')
local resource = GetInvokingResource() or 'qb-core'
print(('^4[ %s : DEBUG]^0'):format(resource))
tPrint(tbl, indent)
print('^4[ END DEBUG ]^0')
end
function QBCore.ShowError(resource, msg)
print('\x1b[31m[' .. resource .. ':ERROR]\x1b[0m ' .. msg)
print(('^1[%s:ERROR]^0 %s'):format(resource, msg))
end
function QBCore.ShowSuccess(resource, msg)
print('\x1b[32m[' .. resource .. ':LOG]\x1b[0m ' .. msg)
print(('^2[%s:LOG]^0 %s'):format(resource, msg))
end