mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:01:22 +00:00
feat(esx_notifty): new design
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local Debug = ESX.GetConfig().EnableDebug
|
||||
local Debug = true
|
||||
|
||||
---@param notificatonType string the notification type
|
||||
---@param length number the length of the notification
|
||||
|
||||
@@ -2,7 +2,7 @@ fx_version 'adamant'
|
||||
|
||||
lua54 'yes'
|
||||
game 'gta5'
|
||||
version '1.11.1'
|
||||
version '1.11.0'
|
||||
author 'ESX-Framework'
|
||||
description 'A beautiful and simple NUI notification system for ESX'
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ body {
|
||||
min-width: 20rem;
|
||||
width: fit-content;
|
||||
height: 3.5rem;
|
||||
background: rgba(5, 5, 5, 0.9);
|
||||
border-radius: 0.5rem;
|
||||
background: rgba(15, 15, 15, 0.9);
|
||||
border-radius: 0.4rem;
|
||||
margin-top: 0.5rem;
|
||||
animation: anim 300ms ease-in-out;
|
||||
align-items: center;
|
||||
@@ -47,24 +47,27 @@ body {
|
||||
|
||||
#root .icon {
|
||||
float: left;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#root .text {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
#root .error {
|
||||
border-bottom: 3px solid #c0392b;
|
||||
color: #c0392b;
|
||||
border: 2px solid #c0392b;
|
||||
}
|
||||
|
||||
#root .success {
|
||||
border-bottom: 3px solid #2ecc71;
|
||||
color: #2ecc71;
|
||||
border: 2px solid #2ecc71;
|
||||
}
|
||||
|
||||
#root .info {
|
||||
border-bottom: 3px solid #2980b9;
|
||||
color: #fb9b04;
|
||||
border: 2px solid #fb9b04;
|
||||
}
|
||||
|
||||
.material-symbols-outlined {
|
||||
|
||||
@@ -15,15 +15,15 @@ const types = {
|
||||
|
||||
// the color codes example `i ~r~love~s~ donuts`
|
||||
const codes = {
|
||||
"~r~": "red",
|
||||
"~r~": "#c0392b",
|
||||
"~b~": "#378cbf",
|
||||
"~g~": "green",
|
||||
"~g~": "#2ecc71",
|
||||
"~y~": "yellow",
|
||||
"~p~": "purple",
|
||||
"~c~": "grey",
|
||||
"~m~": "#212121",
|
||||
"~u~": "black",
|
||||
"~o~": "orange",
|
||||
"~o~": "#fb9b04",
|
||||
};
|
||||
|
||||
w.addEventListener("message", (event) => {
|
||||
@@ -67,8 +67,8 @@ notification = (data) => {
|
||||
`).appendTo(`#root`);
|
||||
|
||||
setTimeout(() => {
|
||||
notification.fadeOut(700);
|
||||
}, data.length);
|
||||
notification.fadeOut(70);
|
||||
}, 10000);
|
||||
|
||||
return notification;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user