- Introduced a new function to set the default menu button for the Telegram bot's Web App. - Updated the initData validation process to provide detailed error messages for authorization failures. - Refactored the validate_init_data function to return both username and reason for validation failure. - Enhanced the web application to handle access denial more gracefully, providing users with hints on how to access the calendar. - Improved the README with additional instructions for configuring the bot's menu button and Web App URL. - Updated tests to reflect changes in the validation process and error handling.
33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||
<title>Календарь дежурств</title>
|
||
<link rel="stylesheet" href="style.css">
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<header class="header">
|
||
<button type="button" class="nav" id="prevMonth" aria-label="Предыдущий месяц">‹</button>
|
||
<h1 class="title" id="monthTitle"></h1>
|
||
<button type="button" class="nav" id="nextMonth" aria-label="Следующий месяц">›</button>
|
||
</header>
|
||
<div class="weekdays">
|
||
<span>Пн</span><span>Вт</span><span>Ср</span><span>Чт</span><span>Пт</span><span>Сб</span><span>Вс</span>
|
||
</div>
|
||
<div class="calendar" id="calendar"></div>
|
||
<div class="duty-list" id="dutyList"></div>
|
||
<div class="loading" id="loading">Загрузка…</div>
|
||
<div class="error" id="error" hidden></div>
|
||
<div class="access-denied" id="accessDenied" hidden>
|
||
<p>Доступ запрещён.</p>
|
||
<p class="muted" id="accessDeniedHint">Откройте календарь из Telegram.</p>
|
||
<p class="debug" id="accessDeniedDebug"></p>
|
||
</div>
|
||
</div>
|
||
<script src="https://telegram.org/js/telegram-web-app.js"></script>
|
||
<script src="app.js"></script>
|
||
</body>
|
||
</html>
|