mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 17:23:31 +00:00
+5
-5
@@ -47,23 +47,23 @@ QBConfig.Notify.NotificationStyling = {
|
|||||||
-- The "icon" key is the css-icon code, this project uses `Material Icons` & `Font Awesome`
|
-- The "icon" key is the css-icon code, this project uses `Material Icons` & `Font Awesome`
|
||||||
QBConfig.Notify.VariantDefinitions = {
|
QBConfig.Notify.VariantDefinitions = {
|
||||||
success = {
|
success = {
|
||||||
color = 'green',
|
classes = 'success',
|
||||||
icon = 'done'
|
icon = 'done'
|
||||||
},
|
},
|
||||||
primary = {
|
primary = {
|
||||||
color = 'blue',
|
classes = 'primary',
|
||||||
icon = 'info'
|
icon = 'info'
|
||||||
},
|
},
|
||||||
error = {
|
error = {
|
||||||
color = 'red',
|
classes = 'error',
|
||||||
icon = 'dangerous'
|
icon = 'dangerous'
|
||||||
},
|
},
|
||||||
police = {
|
police = {
|
||||||
color = 'blue',
|
classes = 'police',
|
||||||
icon = 'local_police'
|
icon = 'local_police'
|
||||||
},
|
},
|
||||||
ambulance = {
|
ambulance = {
|
||||||
color = 'red',
|
classes = 'ambulance',
|
||||||
icon = 'fas fa-ambulance'
|
icon = 'fas fa-ambulance'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ ui_page 'html/index.html'
|
|||||||
|
|
||||||
files {
|
files {
|
||||||
'html/index.html',
|
'html/index.html',
|
||||||
|
'html/style.css',
|
||||||
'html/*.js'
|
'html/*.js'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@ const app = Vue.createApp({
|
|||||||
if (data?.action !== "notify") return;
|
if (data?.action !== "notify") return;
|
||||||
|
|
||||||
const { text, length, type, caption } = data;
|
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
|
// Make sure we have sucessfully fetched out config properly
|
||||||
if (!NOTIFY_CONFIG) {
|
if (!NOTIFY_CONFIG) {
|
||||||
@@ -44,7 +44,7 @@ const app = Vue.createApp({
|
|||||||
position: NOTIFY_CONFIG.NotificationStyling.position ?? "right",
|
position: NOTIFY_CONFIG.NotificationStyling.position ?? "right",
|
||||||
timeout: length,
|
timeout: length,
|
||||||
caption,
|
caption,
|
||||||
color,
|
classes,
|
||||||
icon,
|
icon,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,6 +18,10 @@
|
|||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
/>
|
/>
|
||||||
|
<link
|
||||||
|
href="style.css"
|
||||||
|
rel="stylesheet"
|
||||||
|
/>
|
||||||
<script
|
<script
|
||||||
src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"
|
src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"
|
||||||
defer
|
defer
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
.success {
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
background-color: rgba(23, 23, 23, 80%);
|
||||||
|
border-left: 5px solid #20bb44
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary {
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
background-color: rgba(23, 23, 23, 80%);
|
||||||
|
border-left: 5px solid #1c75d2
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
background-color: rgba(23, 23, 23, 80%);
|
||||||
|
border-left: 5px solid #c10114
|
||||||
|
}
|
||||||
|
|
||||||
|
.police {
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
background-color: rgba(23, 23, 23, 80%);
|
||||||
|
border-left: 5px solid #2197f2
|
||||||
|
}
|
||||||
|
|
||||||
|
.ambulance {
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
background-color: rgba(23, 23, 23, 80%);
|
||||||
|
border-left: 5px solid #f44236
|
||||||
|
}
|
||||||
+5
-5
@@ -21,23 +21,23 @@ export const BrowserMockConfigData = {
|
|||||||
},
|
},
|
||||||
VariantDefinitions: {
|
VariantDefinitions: {
|
||||||
success: {
|
success: {
|
||||||
color: "green",
|
classes: "success",
|
||||||
icon: "done",
|
icon: "done",
|
||||||
},
|
},
|
||||||
primary: {
|
primary: {
|
||||||
color: "blue",
|
classes: "primary",
|
||||||
icon: "info",
|
icon: "info",
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
color: "red",
|
classes: "error",
|
||||||
icon: "dangerous",
|
icon: "dangerous",
|
||||||
},
|
},
|
||||||
police: {
|
police: {
|
||||||
color: "blue",
|
classes: "police",
|
||||||
icon: "local_police",
|
icon: "local_police",
|
||||||
},
|
},
|
||||||
ambulance: {
|
ambulance: {
|
||||||
color: "red",
|
classes: "ambulance",
|
||||||
icon: "fas fa-ambulance",
|
icon: "fas fa-ambulance",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user