From b30c508cb344004994899bbda68ff41d442c7ff6 Mon Sep 17 00:00:00 2001 From: Kry9toN Date: Mon, 25 Jan 2021 10:21:59 +0700 Subject: [PATCH] fix delay on progress --- views/css/style.css | 6 +++--- views/js/main.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/views/css/style.css b/views/css/style.css index 60bed7f..2a94ae6 100644 --- a/views/css/style.css +++ b/views/css/style.css @@ -41,13 +41,13 @@ label { .innerBar-ram, .innerBar-cpu { background: linear-gradient(to right, #3fffa2 0%, #ffdb3a 50%, #e5405e 100%); - height: 24px; + height: 20px; width: 0%; } .outerContainer-ram, .outerContainer-cpu { - width: 400px; - height: 24px; + width: 250px; + height: 20px; border-radius: 5px; overflow: hidden; background: lightgray; diff --git a/views/js/main.js b/views/js/main.js index ea2bd36..a3cf31f 100644 --- a/views/js/main.js +++ b/views/js/main.js @@ -20,11 +20,11 @@ socket.on('ram-usage', ({ ram, cpu, username, osInfo, chat, uptime }) => { // Set ram label labelRam.innerHTML = `RAM ${ram} % `; // Set Ram bar - $('.innerBar-ram').animate({ width: `${ram}%` }, 2000); + $('.innerBar-ram').animate({ width: `${ram}%` }, 500); // Set cpu label labelCpu.innerHTML = `CPU ${cpu} % `; // Set cpu bar - $('.innerBar-cpu').animate({ width: `${cpu}%` }, 2000); + $('.innerBar-cpu').animate({ width: `${cpu}%` }, 500); // Check if (cpu > 90) { notify(cpu)