From 8abec3f7c002c6b116d30722b282d5d50a72ed9e Mon Sep 17 00:00:00 2001
From: Degradin <42292046+Degradin@users.noreply.github.com>
Date: Tue, 21 Jan 2025 00:30:10 +0300
Subject: [PATCH] MiniApp updates
---
public/index.html | 208 ++++++++++++++++++++++++++--
public/styles.css | 341 ++++++++++++++++++++++------------------------
2 files changed, 365 insertions(+), 184 deletions(-)
diff --git a/public/index.html b/public/index.html
index 3bf58d4..d48cd76 100644
--- a/public/index.html
+++ b/public/index.html
@@ -4,7 +4,199 @@
Меню игрока
-
+
@@ -136,13 +328,13 @@
characterProgress.style.strokeDashoffset = 251 - (251 * user.characterLevel / 100);
// Установка прогресса HP и Стамины
- const hpProgress = (user.hp / user.maxHp) * 100;
- const staminaProgress = (user.stamina / user.maxStamina) * 100;
+ const hpProgress = user.maxHp ? (user.hp / user.maxHp) * 100 : 0;
+ const staminaProgress = user.maxStamina ? (user.stamina / user.maxStamina) * 100 : 0;
- setInterval(() => {
- document.getElementById("hp-bar").style.width = `${hpProgress}%`;
- document.getElementById("stamina-bar").style.width = `${staminaProgress}%`;
- }, 2000);
+
+ document.getElementById("hp-bar").style.width = `${hpProgress}%`;
+ document.getElementById("stamina-bar").style.width = `${staminaProgress}%`;
+
// Характеристики FIRE
document.getElementById("force").textContent = user.force;
@@ -240,7 +432,7 @@
// Обновляем сайт каждые 5 секунд для получения актуальных данных
setInterval(() => {
window.location.reload();
- }, 5000);
+ }, 30000);