mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 16:23:21 +00:00
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:
+4
-5
@@ -1,5 +1,4 @@
|
||||
QBShared = QBShared or {}
|
||||
QBShared.Vehicles = QBShared.Vehicles or {}
|
||||
QBCore.Shared.Vehicles = QBCore.Shared.Vehicles or {}
|
||||
|
||||
local Vehicles = {
|
||||
--- Compacts (0)
|
||||
@@ -765,10 +764,10 @@ local Vehicles = {
|
||||
{ model = 'formula', name = 'PR4', brand = 'Progen', price = 100000, category = 'openwheel', type = 'automobile', shop = 'none' },
|
||||
}
|
||||
|
||||
QBShared.VehicleHashes = QBShared.VehicleHashes or {}
|
||||
QBCore.Shared.VehicleHashes = QBCore.Shared.VehicleHashes or {}
|
||||
for i = 1, #Vehicles do
|
||||
local hash = joaat(Vehicles[i].model)
|
||||
QBShared.Vehicles[Vehicles[i].model] = {
|
||||
QBCore.Shared.Vehicles[Vehicles[i].model] = {
|
||||
spawncode = Vehicles[i].model,
|
||||
name = Vehicles[i].name,
|
||||
brand = Vehicles[i].brand,
|
||||
@@ -779,5 +778,5 @@ for i = 1, #Vehicles do
|
||||
type = Vehicles[i].type,
|
||||
shop = Vehicles[i].shop
|
||||
}
|
||||
QBShared.VehicleHashes[hash] = QBShared.Vehicles[Vehicles[i].model]
|
||||
QBCore.Shared.VehicleHashes[hash] = QBCore.Shared.Vehicles[Vehicles[i].model]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user