30 lines
981 B
JavaScript
30 lines
981 B
JavaScript
/**
|
|
* Main Application Module
|
|
* Entry point for the application, initializes all components
|
|
*/
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
// Initialize all modules
|
|
DataManager.init();
|
|
UI.init();
|
|
Charts.init();
|
|
|
|
// Render initial data
|
|
UI.renderWeightTable();
|
|
UI.renderMealTable();
|
|
|
|
// Add security information to settings tab
|
|
const settingsCard = document.querySelector('#settings-content .card:last-child');
|
|
if (settingsCard) {
|
|
const securitySection = document.createElement('div');
|
|
securitySection.className = 'form-group';
|
|
securitySection.innerHTML = `
|
|
<h3>Security</h3>
|
|
<p>Your data is protected by Nginx basic authentication.</p>
|
|
<p>To log out, close your browser or clear your browser's authentication cache.</p>
|
|
`;
|
|
settingsCard.appendChild(securitySection);
|
|
}
|
|
|
|
console.log('Weight Tracker app initialized successfully');
|
|
});
|