Skip to content

Commit

Permalink
fix delay on progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Kry9toN committed Jan 25, 2021
1 parent 6505191 commit b30c508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions views/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions views/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ socket.on('ram-usage', ({ ram, cpu, username, osInfo, chat, uptime }) => {
// Set ram label
labelRam.innerHTML = `<span>RAM ${ram} % </span>`;
// Set Ram bar
$('.innerBar-ram').animate({ width: `${ram}%` }, 2000);
$('.innerBar-ram').animate({ width: `${ram}%` }, 500);
// Set cpu label
labelCpu.innerHTML = `<span>CPU ${cpu} % </span>`;
// Set cpu bar
$('.innerBar-cpu').animate({ width: `${cpu}%` }, 2000);
$('.innerBar-cpu').animate({ width: `${cpu}%` }, 500);
// Check
if (cpu > 90) {
notify(cpu)
Expand Down

0 comments on commit b30c508

Please sign in to comment.