merge both repos! atempt 1 by making the file system the same!

This commit is contained in:
RezHackXYZ 2025-05-29 13:11:49 +05:30
parent badb303ea6
commit 2fe58ee6be
No known key found for this signature in database
128 changed files with 2320 additions and 4285 deletions

View file

@ -0,0 +1,31 @@
export function updateTime(RowsObject, Digit, type) {
let DigitsHeight = parseInt(type == "sec" ? "75" : "200");
let LastZeroPos = Digit == 1 ? 10 : Digit == 0 && type == "hour" ? 2 : 6;
let currentTime;
if (type == "hour") {
if (new Date().getHours() > 12) {
currentTime = parseInt((new Date().getHours() - 12).toString().padStart(2, "0")[Digit]);
} else {
currentTime = parseInt(new Date().getHours().toString().padStart(2, "0")[Digit]);
}
} else if (type == "min") {
currentTime = parseInt(new Date().getMinutes().toString().padStart(2, "0")[Digit]);
} else if (type == "sec") {
currentTime = parseInt(new Date().getSeconds().toString().padStart(2, "0")[Digit]);
}
if (currentTime == 0) {
if (RowsObject.scrollTop != 0) {
RowsObject.scrollTop = LastZeroPos * DigitsHeight;
setTimeout(() => {
RowsObject.scroll({
top: 0,
behavior: "instant",
});
}, 500);
}
} else {
RowsObject.scrollTop = currentTime * DigitsHeight;
}
}