diff --git a/config.lua b/config.lua index a10eedf..8966088 100644 --- a/config.lua +++ b/config.lua @@ -47,23 +47,23 @@ QBConfig.Notify.NotificationStyling = { -- The "icon" key is the css-icon code, this project uses `Material Icons` & `Font Awesome` QBConfig.Notify.VariantDefinitions = { success = { - color = 'green', + classes = 'success', icon = 'done' }, primary = { - color = 'blue', + classes = 'primary', icon = 'info' }, error = { - color = 'red', + classes = 'error', icon = 'dangerous' }, police = { - color = 'blue', + classes = 'police', icon = 'local_police' }, ambulance = { - color = 'red', + classes = 'ambulance', icon = 'fas fa-ambulance' } } diff --git a/fxmanifest.lua b/fxmanifest.lua index 44d61ba..e28111e 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -30,6 +30,7 @@ ui_page 'html/index.html' files { 'html/index.html', + 'html/style.css', 'html/*.js' } diff --git a/html/app.js b/html/app.js index 652e9dd..50ff2fb 100644 --- a/html/app.js +++ b/html/app.js @@ -20,7 +20,7 @@ const app = Vue.createApp({ if (data?.action !== "notify") return; const { text, length, type, caption } = data; - const { color, icon } = determineStyleFromVariant(type); + const { classes, icon } = determineStyleFromVariant(type); // Make sure we have sucessfully fetched out config properly if (!NOTIFY_CONFIG) { @@ -44,7 +44,7 @@ const app = Vue.createApp({ position: NOTIFY_CONFIG.NotificationStyling.position ?? "right", timeout: length, caption, - color, + classes, icon, }); }; diff --git a/html/index.html b/html/index.html index 97ef4b2..5abf792 100644 --- a/html/index.html +++ b/html/index.html @@ -18,6 +18,10 @@ rel="stylesheet" type="text/css" /> +