- Changed the default language in `index.html` from Russian to English, updating the title and button aria-labels for improved accessibility. - Refactored the `buildFetchOptions` function in `api.js` to include an optional external abort signal, enhancing request management. - Updated `fetchDuties` and `fetchCalendarEvents` to support request cancellation using the new abort signal, improving error handling. - Added unit tests for the API functions to ensure proper functionality, including handling of 403 errors and request cancellations. - Enhanced CSS styles for duty markers to improve visual consistency. - Removed unused code and improved the overall structure of the JavaScript files for better maintainability.
32 lines
1.3 KiB
HTML
32 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||
<link rel="icon" href="favicon.png" type="image/png">
|
||
<title></title>
|
||
<link rel="stylesheet" href="style.css">
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="calendar-sticky" id="calendarSticky">
|
||
<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>
|
||
<div class="duty-list" id="dutyList"></div>
|
||
<div class="loading" id="loading"><span class="loading__spinner" aria-hidden="true"></span><span class="loading__text"></span></div>
|
||
<div class="error" id="error" hidden></div>
|
||
<div class="access-denied" id="accessDenied" hidden></div>
|
||
</div>
|
||
<script src="https://telegram.org/js/telegram-web-app.js"></script>
|
||
<script type="module" src="js/main.js"></script>
|
||
</body>
|
||
</html>
|