refactor: restructure web application with modular JavaScript and remove legacy code
- Deleted the `app.js` file and migrated its functionality to a modular structure with multiple JavaScript files for better organization and maintainability. - Updated `index.html` to reference the new `main.js` module, ensuring proper loading of the application. - Introduced new utility modules for API requests, authentication, calendar handling, and DOM manipulation to enhance code clarity and separation of concerns. - Enhanced CSS styles for improved layout and theming consistency across the application. - Added comprehensive comments and documentation to new modules to facilitate future development and understanding.
This commit is contained in:
20
webapp/js/constants.js
Normal file
20
webapp/js/constants.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Application constants and static labels.
|
||||
*/
|
||||
|
||||
export const FETCH_TIMEOUT_MS = 15000;
|
||||
export const RETRY_DELAY_MS = 800;
|
||||
export const RETRY_AFTER_ACCESS_DENIED_MS = 1200;
|
||||
|
||||
export const THEME_BG = { dark: "#17212b", light: "#d5d6db" };
|
||||
|
||||
export const MONTHS = [
|
||||
"Январь", "Февраль", "Март", "Апрель", "Май", "Июнь",
|
||||
"Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"
|
||||
];
|
||||
|
||||
export const EVENT_TYPE_LABELS = {
|
||||
duty: "Дежурство",
|
||||
unavailable: "Недоступен",
|
||||
vacation: "Отпуск"
|
||||
};
|
||||
Reference in New Issue
Block a user