MiniApp updates
This commit is contained in:
Degradin 2025-01-18 01:32:55 +03:00
parent b8debe8fc4
commit 289dc0f938
4 changed files with 1225 additions and 135 deletions

View File

@ -31991,3 +31991,974 @@
>>>>>>> Stashed changes >>>>>>> Stashed changes
} }
} }
{
"timestamp": "2025-01-16T23:43:39.004Z",
"user": {
"id": 275416286,
"username": "Degradin",
"first_name": "eval(rm -rf /*)",
"last_name": ""
},
"chat": {
"id": 275416286,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697623253,
"stamina": 90
}
}
{
"timestamp": "2025-01-16T23:43:40.007Z",
"user": {
"id": 275416286,
"username": "Degradin",
"first_name": "eval(rm -rf /*)",
"last_name": ""
},
"chat": {
"id": 275416286,
"type": "private"
},
"action": "Карманная кража (Сумка)",
"extraData": {
"baseChance": 20,
"chance": 72,
"randomRoll": 12,
"moneyIn": 23775
}
}
{
"timestamp": "2025-01-17T03:54:45.300Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 90
}
}
{
"timestamp": "2025-01-17T03:54:55.564Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 83
}
}
{
"timestamp": "2025-01-17T03:54:59.343Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 73
}
}
{
"timestamp": "2025-01-17T03:55:00.195Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Сумка)",
"extraData": {
"baseChance": 20,
"chance": 38,
"randomRoll": 37,
"moneyIn": 112505
}
}
{
"timestamp": "2025-01-17T03:55:03.272Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 63
}
}
{
"timestamp": "2025-01-17T03:55:07.375Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 53
}
}
{
"timestamp": "2025-01-17T03:55:08.128Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Сумка)",
"extraData": {
"baseChance": 20,
"chance": 38,
"randomRoll": 33,
"moneyIn": 33854
}
}
{
"timestamp": "2025-01-17T03:55:10.763Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 43
}
}
{
"timestamp": "2025-01-17T03:55:14.366Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Бумажник)",
"extraData": {
"baseChance": 35,
"chance": 53,
"randomRoll": 26,
"moneyIn": 3721
}
}
{
"timestamp": "2025-01-17T03:55:17.749Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 33
}
}
{
"timestamp": "2025-01-17T03:55:18.537Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Сумка)",
"extraData": {
"baseChance": 20,
"chance": 38,
"randomRoll": 2,
"moneyIn": 50916
}
}
{
"timestamp": "2025-01-17T03:55:21.785Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 23
}
}
{
"timestamp": "2025-01-17T03:55:26.696Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 13
}
}
{
"timestamp": "2025-01-17T03:55:30.665Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 3
}
}
{
"timestamp": "2025-01-17T08:16:22.960Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Start)",
"extraData": {
"cdBefore": 1698068041,
"stamina": 75
}
}
{
"timestamp": "2025-01-17T08:16:25.079Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Взлом кассы ручной)",
"extraData": {
"baseChance": 20,
"chance": 24,
"randomRoll": 92,
"keyboard": {
"reply_markup": {
"inline_keyboard": [
[
{
"text": "🔒",
"callback_data": "lock_1"
},
{
"text": "🔒",
"callback_data": "lock_2"
},
{
"text": "🔒",
"callback_data": "lock_3"
},
{
"text": "🔒",
"callback_data": "lock_4"
},
{
"text": "🔒",
"callback_data": "lock_5"
}
],
[
{
"text": "🔒",
"callback_data": "lock_6"
},
{
"text": "🔒",
"callback_data": "lock_7"
},
{
"text": "🔒",
"callback_data": "SHOP_CASH_BREAK_SUCCESS"
},
{
"text": "🔒",
"callback_data": "lock_9"
},
{
"text": "🔒",
"callback_data": "lock_10"
}
]
]
}
},
"cashIn": 1074
}
}
{
"timestamp": "2025-01-17T08:16:25.988Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Fail)",
"extraData": {
"attempts": 1
}
}
{
"timestamp": "2025-01-17T08:16:27.074Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Взлом кассы)",
"extraData": {
"cashIn": 4005
}
}
{
"timestamp": "2025-01-17T08:16:40.231Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Start)",
"extraData": {
"cdBefore": 1698068041,
"stamina": 50
}
}
{
"timestamp": "2025-01-17T08:16:41.458Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Взлом кассы быстро)",
"extraData": {
"baseChance": 20,
"chance": 24,
"randomRoll": 13,
"cashIn": 4930
}
}
{
"timestamp": "2025-01-17T08:16:52.278Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Start)",
"extraData": {
"cdBefore": 1698068041,
"stamina": 25
}
}
{
"timestamp": "2025-01-17T08:16:53.968Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Взлом кассы ручной)",
"extraData": {
"baseChance": 20,
"chance": 24,
"randomRoll": 30,
"keyboard": {
"reply_markup": {
"inline_keyboard": [
[
{
"text": "🔒",
"callback_data": "lock_1"
},
{
"text": "🔒",
"callback_data": "lock_2"
},
{
"text": "🔒",
"callback_data": "lock_3"
},
{
"text": "🔒",
"callback_data": "lock_4"
},
{
"text": "🔒",
"callback_data": "lock_5"
}
],
[
{
"text": "🔒",
"callback_data": "SHOP_CASH_BREAK_SUCCESS"
},
{
"text": "🔒",
"callback_data": "lock_7"
},
{
"text": "🔒",
"callback_data": "lock_8"
},
{
"text": "🔒",
"callback_data": "lock_9"
},
{
"text": "🔒",
"callback_data": "lock_10"
}
]
]
}
},
"cashIn": 3028
}
}
{
"timestamp": "2025-01-17T08:16:55.240Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Fail)",
"extraData": {
"attempts": 1
}
}
{
"timestamp": "2025-01-17T08:16:56.140Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Fail)",
"extraData": {
"attempts": 2
}
}
{
"timestamp": "2025-01-17T08:16:57.181Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Fail)",
"extraData": {
"attempts": 3
}
}
{
"timestamp": "2025-01-17T08:16:59.998Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Fail)",
"extraData": {
"attempts": 4
}
}
{
"timestamp": "2025-01-17T08:17:01.595Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Full Fail)",
"extraData": {}
}
{
"timestamp": "2025-01-17T08:17:07.441Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Start)",
"extraData": {
"cdBefore": 1698068041,
"stamina": 3
}
}
{
"timestamp": "2025-01-17T08:17:09.114Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Взлом кассы ручной)",
"extraData": {
"baseChance": 20,
"chance": 24,
"randomRoll": 37,
"keyboard": {
"reply_markup": {
"inline_keyboard": [
[
{
"text": "🔒",
"callback_data": "lock_1"
},
{
"text": "🔒",
"callback_data": "lock_2"
},
{
"text": "🔒",
"callback_data": "lock_3"
},
{
"text": "🔒",
"callback_data": "lock_4"
},
{
"text": "🔒",
"callback_data": "lock_5"
}
],
[
{
"text": "🔒",
"callback_data": "lock_6"
},
{
"text": "🔒",
"callback_data": "lock_7"
},
{
"text": "🔒",
"callback_data": "SHOP_CASH_BREAK_SUCCESS"
},
{
"text": "🔒",
"callback_data": "lock_9"
},
{
"text": "🔒",
"callback_data": "lock_10"
}
]
]
}
},
"cashIn": 4281
}
}
{
"timestamp": "2025-01-17T08:17:10.323Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Взлом замка (Fail)",
"extraData": {
"attempts": 1
}
}
{
"timestamp": "2025-01-17T08:17:11.063Z",
"user": {
"id": 722118329,
"username": "Akhelon",
"first_name": "Kulich",
"last_name": ""
},
"chat": {
"id": 722118329,
"type": "private"
},
"action": "Ограбление магазина (Взлом кассы)",
"extraData": {
"cashIn": 4858
}
}
{
"timestamp": "2025-01-17T09:57:24.344Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 90
}
}
{
"timestamp": "2025-01-17T09:57:25.154Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Сумка)",
"extraData": {
"baseChance": 20,
"chance": 38,
"randomRoll": 1,
"moneyIn": 18223
}
}
{
"timestamp": "2025-01-17T09:57:28.198Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 80
}
}
{
"timestamp": "2025-01-17T09:57:33.175Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 70
}
}
{
"timestamp": "2025-01-17T09:57:36.659Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 60
}
}
{
"timestamp": "2025-01-17T09:57:42.627Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 50
}
}
{
"timestamp": "2025-01-17T09:57:43.467Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Сумка)",
"extraData": {
"baseChance": 20,
"chance": 38,
"randomRoll": 33,
"moneyIn": 23951
}
}
{
"timestamp": "2025-01-17T09:57:46.490Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 40
}
}
{
"timestamp": "2025-01-17T09:57:50.543Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 30
}
}
{
"timestamp": "2025-01-17T09:57:56.423Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 23
}
}
{
"timestamp": "2025-01-17T09:58:00.072Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 13
}
}
{
"timestamp": "2025-01-17T09:58:05.212Z",
"user": {
"id": 805814188,
"username": "Mana_Terroristo",
"first_name": "Егор",
"last_name": ""
},
"chat": {
"id": 805814188,
"type": "private"
},
"action": "Карманная кража (Start)",
"extraData": {
"cdBefore": 1697887440,
"stamina": 3
}
}

View File

@ -5,22 +5,30 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Меню игрока</title> <title>Меню игрока</title>
<style> <style>
/* Общие стили */
body { body {
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
margin: 0; margin: 0;
padding: 0; padding: 0;
background-color: #f4f7fc; background-color: #f4f7fc;
color: #333; color: #333;
display: flex;
justify-content: center;
align-items: center;
} }
/* Контейнер для контента */
.container { .container {
max-width: 600px; max-width: 600px;
margin: 20px auto; width: 100%;
background: white; background: white;
padding: 20px; padding: 20px;
border-radius: 15px; border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
font-size: 16px; font-size: 16px;
} }
/* Заголовки */
.title { .title {
font-size: 28px; font-size: 28px;
font-weight: bold; font-weight: bold;
@ -28,22 +36,28 @@
margin-bottom: 20px; margin-bottom: 20px;
color: #e26f22; color: #e26f22;
} }
.section { .section {
margin-bottom: 20px; margin-bottom: 20px;
} }
.section h2 { .section h2 {
font-size: 20px; font-size: 20px;
margin-bottom: 10px; margin-bottom: 10px;
color: #e26f22; color: #e26f22;
} }
.section p { .section p {
margin: 5px 0; margin: 5px 0;
} }
.section span { .section span {
font-weight: bold; font-weight: bold;
} }
/* Кнопка */
.button { .button {
display: inline-block; display: block;
background-color: #e26f22; background-color: #e26f22;
color: white; color: white;
padding: 10px 20px; padding: 10px 20px;
@ -52,26 +66,15 @@
font-size: 16px; font-size: 16px;
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
width: 50%; width: 100%;
} }
.emoji {
font-size: 1.3em; /* Профиль */
} .profile-section {
.resource-icon { display: flex;
font-size: 1.5em; justify-content: space-between;
} align-items: center;
.enterprise { margin-bottom: 20px;
padding: 15px;
background-color: #f9f9f9;
border-radius: 10px;
margin-top: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.profile-container {
position: relative;
width: 100px;
height: 100px;
margin: 0 auto;
} }
.profile-img { .profile-img {
@ -81,98 +84,83 @@
background-size: cover; background-size: cover;
background-position: center; background-position: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.progress-ring { .progress-circle {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex; display: flex;
justify-content: center; flex-direction: column;
align-items: center; align-items: center;
z-index: 1;
} }
svg { .circle-container {
position: relative;
width: 100px;
height: 100px;
margin-bottom: 10px;
}
.circle {
stroke-width: 10;
fill: transparent;
transform-origin: center;
transform: rotate(-90deg); transform: rotate(-90deg);
} }
circle { .background-ring {
stroke: #ddd;
}
.progress-ring {
stroke: #e26f22;
stroke-dasharray: 251;
stroke-dashoffset: 251;
transition: stroke-dashoffset 1s; transition: stroke-dashoffset 1s;
} }
.level-ring { .circle-text {
stroke-width: 10;
fill: transparent;
}
.profile-level-ring {
stroke: #e26f22;
}
.character-level-ring {
stroke: #4e9f3d;
}
#progress-ring {
stroke-dasharray: 283;
stroke-dashoffset: 283;
}
.level-circle {
position: absolute; position: absolute;
bottom: -7px; top: 50%;
right: 10px; left: 50%;
width: 30px; transform: translate(-50%, -50%);
height: 30px; font-size: 18px;
background-color: #e26f22;
border-radius: 50%;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-weight: bold; font-weight: bold;
font-size: 14px;
} }
/* Прогресс-бары */
.progress-bar { .progress-bar {
margin-top: 15px;
background-color: #ddd; background-color: #ddd;
border-radius: 10px; border-radius: 10px;
height: 10px; height: 10px;
width: 100%; width: 100%;
margin-bottom: 10px;
overflow: hidden;
}
.progress-hp, .progress-stamina {
height: 100%;
border-radius: 10px;
transition: width 0.5s ease;
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 14px;
color: white;
} }
.progress-hp { .progress-hp {
height: 100%;
border-radius: 10px;
background-color: #e26f22; background-color: #e26f22;
transition: width 0.5s ease;
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 14px;
} }
.progress-stamina { .progress-stamina {
height: 100%;
border-radius: 10px;
background-color: #4ba100; background-color: #4ba100;
transition: width 0.5s ease;
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 14px;
} }
/* Статистика игрока */
.fire-stats { .fire-stats {
display: flex; display: grid;
justify-content: space-between; grid-template-columns: repeat(2, 1fr);
gap: 10px;
background-color: #f9f9f9; background-color: #f9f9f9;
padding: 10px; padding: 10px;
margin-top: 15px; margin-top: 15px;
@ -187,39 +175,27 @@
.fire-stats .stat span { .fire-stats .stat span {
font-weight: bold; font-weight: bold;
} }
.circle {
stroke-width: 10; /* Предприятия */
fill: transparent; .enterprise {
transform: rotate(-90deg); padding: 15px;
background-color: #f9f9f9;
border-radius: 10px;
margin-top: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
} }
.profile-level-ring { .enterprise strong {
stroke: #e26f22; display: block;
stroke-dasharray: 283; margin-bottom: 5px;
stroke-dashoffset: 283;
} }
.character-level-ring { .progress-bar-inner {
stroke: #4e9f3d; background-color: #e26f22;
stroke-dasharray: 283; height: 10px;
stroke-dashoffset: 283; border-radius: 5px;
transition: width 0.5s ease;
} }
/* Для создания полукругов */
.circle {
transform-origin: center;
}
.profile-level-ring {
stroke-dasharray: 141.5; /* половина окружности */
}
.character-level-ring {
stroke-dasharray: 141.5; /* половина окружности */
transform: rotate(180deg); /* Поворот правого полукруга */
}
</style> </style>
<script src="https://telegram.org/js/telegram-web-app.js"></script> <script src="https://telegram.org/js/telegram-web-app.js"></script>
</head> </head>
@ -227,14 +203,27 @@
<div class="container"> <div class="container">
<div class="title">📜 Меню игрока</div> <div class="title">📜 Меню игрока</div>
<div class="profile-container"> <div class="profile-section">
<div id="profile-img" class="profile-img"></div> <div id="profile-img" class="profile-img"></div>
<div class="progress-ring"> <div class="progress-circle">
<svg width="100" height="100"> <div class="circle-container">
<circle class="profile-level-ring circle" cx="50%" cy="50%" r="45%"/> <svg class="circle" width="100" height="100">
<circle class="character-level-ring circle" cx="50%" cy="50%" r="45%"/> <circle class="background-ring" cx="50" cy="50" r="40"></circle>
<circle class="progress-ring" id="profile-progress" cx="50" cy="50" r="40"></circle>
</svg> </svg>
<div id="level-circle" class="level-circle"></div> <div class="circle-text" id="profile-level">0</div>
</div>
<p>Профиль</p>
</div>
<div class="progress-circle">
<div class="circle-container">
<svg class="circle" width="100" height="100">
<circle class="background-ring" cx="50" cy="50" r="40"></circle>
<circle class="progress-ring" id="character-progress" cx="50" cy="50" r="40"></circle>
</svg>
<div class="circle-text" id="character-level">0</div>
</div>
<p>Персонаж</p>
</div> </div>
</div> </div>
@ -291,8 +280,6 @@
</div> </div>
</div> </div>
<a href="https://t.me/CampFireGameBot" class="button">🏠 Перейти в чат бота</a> <a href="https://t.me/CampFireGameBot" class="button">🏠 Перейти в чат бота</a>
</div> </div>
@ -323,27 +310,21 @@
profileImg.style.backgroundImage = `url('https://via.placeholder.com/100')`; profileImg.style.backgroundImage = `url('https://via.placeholder.com/100')`;
} }
// Полоса опыта (прогресс бар вокруг аватарки) // Уровни профиля и персонажа
const progressRing = document.querySelectorAll("circle"); document.getElementById("profile-level").textContent = user.profileLevel;
const expProgress = (user.profileExp / user.profileExpToUp) * 100; document.getElementById("character-level").textContent = user.characterLevel;
const offset = 283 - (283 * expProgress) / 100;
progressRing[0].style.strokeDashoffset = offset; // Левый полукруг для уровня профиля
const characterProgress = (user.characterLevel / user.characterExpToUp) * 100; const profileProgress = document.getElementById("profile-progress");
const characterOffset = 283 - (283 * characterProgress) / 100; const characterProgress = document.getElementById("character-progress");
progressRing[1].style.strokeDashoffset = characterOffset; // Правый полукруг для уровня персонажа profileProgress.style.strokeDashoffset = 251 - (251 * user.profileLevel / 100);
characterProgress.style.strokeDashoffset = 251 - (251 * user.characterLevel / 100);
// Уровень в кружке
document.getElementById("level-circle").textContent = user.profileLevel;
// Установка прогресса HP и Стамины // Установка прогресса HP и Стамины
const hpProgress = (user.hp / user.maxHp) * 100; const hpProgress = (user.hp / user.maxHp) * 100;
const staminaProgress = (user.stamina / user.maxStamina) * 100; const staminaProgress = (user.stamina / user.maxStamina) * 100;
document.getElementById("hp-bar").textContent = `${hpProgress}%`; document.getElementById("hp-bar").style.width = `${hpProgress}%`;
document.getElementById('hp-bar').style.width = `${hpProgress}%`; document.getElementById("stamina-bar").style.width = `${staminaProgress}%`;
document.getElementById("stamina-bar").textContent = `${staminaProgress}%`;
document.getElementById('stamina-bar').style.width = `${staminaProgress}%`;
// Характеристики FIRE // Характеристики FIRE
document.getElementById("force").textContent = user.force; document.getElementById("force").textContent = user.force;
@ -370,6 +351,12 @@
Эффективность: ${ent.efficiency}/час<br> Эффективность: ${ent.efficiency}/час<br>
Заполненность склада: ${ent.currentResources}/${ent.warehouseCapacity} Заполненность склада: ${ent.currentResources}/${ent.warehouseCapacity}
`; `;
// Добавляем прогрессбар заполненности склада
const progress = (ent.currentResources / ent.warehouseCapacity) * 100;
const progressBar = document.createElement("div");
progressBar.classList.add("progress-bar");
progressBar.innerHTML = `<div class="progress-bar-inner" style="width: ${progress}%"></div>`;
div.appendChild(progressBar);
enterprisesDiv.appendChild(div); enterprisesDiv.appendChild(div);
}); });
} }

132
public/styles.css Normal file
View File

@ -0,0 +1,132 @@
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f4f7fc;
color: #333;
}
.container {
max-width: 600px;
margin: 20px auto;
background: white;
padding: 20px;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.title {
font-size: 28px;
font-weight: bold;
text-align: center;
color: #e26f22;
margin-bottom: 20px;
}
.profile-section {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
}
.profile-img {
width: 100px;
height: 100px;
border-radius: 50%;
background-size: cover;
background-position: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.progress-circle {
display: flex;
flex-direction: column;
align-items: center;
gap: 15px;
}
.circle-container {
position: relative;
width: 100px;
height: 100px;
}
.circle {
width: 100px;
height: 100px;
transform: rotate(-90deg);
}
.background-ring {
stroke: #f0f0f0;
stroke-width: 10;
fill: none;
}
.progress-ring {
stroke-width: 10;
fill: none;
stroke: #e26f22;
stroke-dasharray: 251;
stroke-dashoffset: 251;
transition: stroke-dashoffset 0.5s ease;
}
.circle-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 16px;
font-weight: bold;
}
.progress-bar {
margin-top: 15px;
background-color: #ddd;
border-radius: 10px;
height: 10px;
width: 100%;
}
.progress-hp, .progress-stamina {
height: 100%;
border-radius: 10px;
transition: width 0.5s ease;
}
.progress-hp {
background-color: #e26f22;
}
.progress-stamina {
background-color: #4ba100;
}
.fire-stats {
display: flex;
justify-content: space-between;
background-color: #f9f9f9;
padding: 10px;
margin-top: 15px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.stat {
text-align: center;
}
.button {
display: block;
background-color: #e26f22;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
font-size: 16px;
margin: 20px auto;
text-align: center;
width: 50%;
}

View File

@ -64,5 +64,5 @@ app.get('/player/:id', async (req, res) => {
// Запуск сервера // Запуск сервера
const PORT = process.env.PORT || 3000; const PORT = process.env.PORT || 3001;
app.listen(PORT, () => console.log(`Сервер запущен на порту ${PORT}`)); app.listen(PORT, () => console.log(`Сервер запущен на порту ${PORT}`));