Added raw image count

This commit is contained in:
2025-10-29 21:13:52 +00:00
parent 756103e25f
commit f23d7d4790
3 changed files with 18 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
document.addEventListener('page-loaded', e => {
if (e.detail.page !== "home") return;
const stats = ['Cpu','Ram','Zram','Swap','Disk','Disk0','Images'];
const stats = ['Cpu','Ram','Zram','Swap','Disk','Disk0','Imagesjpg','Imagesraw'];
const elements = {};
const bars = {};
const prev = {};
@@ -32,7 +32,7 @@ document.addEventListener('page-loaded', e => {
const numVal = Number(val) || 0;
// Animate number
if (key === 'Images') {
if (key === 'Imagesjpg' || key === 'Imagesraw') {
// Raw number
animateValue(elements[key], prev[key], numVal, 400, false);
} else {
@@ -55,7 +55,7 @@ document.addEventListener('page-loaded', e => {
// Progress bar
if (bars[key]) {
let pct = key === 'Images' ? Math.min(numVal / 100 * 100, 100) : numVal;
let pct = key === 'Imagesjpg' || key === 'Imagesraw' ? Math.min(numVal / 100 * 100, 100) : numVal;
bars[key].style.width = pct + '%';
}