From 54dc5e6397f5143395e9b37aab0b8a0a74f8f3e9 Mon Sep 17 00:00:00 2001 From: xorzo <80540494+xorzo1@users.noreply.github.com> Date: Sat, 21 May 2022 18:10:06 +0200 Subject: [PATCH] refactor() Added ProgressBar to esx notify - the ProgressBar shows the timeout for when the notification is going to disappear https://imgur.com/nKda41I --- [esx]/esx_notify/nui/css/style.css | 73 ++++++++++++++++++++++++++++++ [esx]/esx_notify/nui/index.html | 70 ++-------------------------- [esx]/esx_notify/nui/js/script.js | 33 ++++++++++---- 3 files changed, 100 insertions(+), 76 deletions(-) diff --git a/[esx]/esx_notify/nui/css/style.css b/[esx]/esx_notify/nui/css/style.css index 4b24467e..3eacd92a 100644 --- a/[esx]/esx_notify/nui/css/style.css +++ b/[esx]/esx_notify/nui/css/style.css @@ -11,4 +11,77 @@ body { color: var(--color); font-family: sans-serif; +} + +.notify { + display: none; + flex: auto; + border-left: 5px solid rgb(34, 132, 189); + position:absolute; + margin: 0 auto; + left: 0; + right: 0; + top: 5%; + min-width:15%; + width:fit-content; + height:50px; + background: rgba(5,5, 5, 0.9); + border-radius: 5px; + animation: growDown 300ms ease-in-out; + padding-right: 10px; +} +.success { + border-left: 5px solid rgb(33, 223, 15) !important; +} +.error { + border-left: 5px solid rgb(231, 35, 28) !important; +} + +.icon { + border: 0; +} + +.innerText { + flex: auto; + margin-top: 15px; + width:100%; +} + +.innerText{ + margin-left: 10px; +} + +p { + flex: auto; + word-wrap: break-word; + margin-left: 40px; + margin-top: 17px; +} + +.innerText .icon { + float: left; + margin-left: 5px; + font-size: 20px; +} + +@keyframes growDown { + 0% { + transform: scaleY(0); + } + 80% { + transform: scaleY(1.1) + } + 100% { + transform: scaleY(1) + } +} + +.prog { + flex: auto; + position:absolute; + margin: 0 auto; + left: 0; + bottom: 0; + background: rgb(75, 75, 75); + height: 4px; } \ No newline at end of file diff --git a/[esx]/esx_notify/nui/index.html b/[esx]/esx_notify/nui/index.html index 1fd3c86c..58817fe1 100644 --- a/[esx]/esx_notify/nui/index.html +++ b/[esx]/esx_notify/nui/index.html @@ -12,85 +12,21 @@
+