From bdbe781befe5b6fcab148c655a53563eba458380 Mon Sep 17 00:00:00 2001 From: Greg Date: Tue, 27 May 2025 00:51:03 +0200 Subject: [PATCH] refactor: migrate from bcrypt.js to Nginx basic authentication --- index.html | 6 +----- js/app.js | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/index.html b/index.html index ace1cfb..359c6f7 100644 --- a/index.html +++ b/index.html @@ -6,10 +6,7 @@ Keep My Weight - Personal Weight & Meal Tracker - - - - +
@@ -207,7 +204,6 @@ - diff --git a/js/app.js b/js/app.js index 810f2fb..da57f0a 100644 --- a/js/app.js +++ b/js/app.js @@ -3,10 +3,7 @@ * Entry point for the application, initializes all components */ document.addEventListener('DOMContentLoaded', () => { - // Initialize authentication first - Auth.init(); - - // Initialize all other modules + // Initialize all modules DataManager.init(); UI.init(); Charts.init(); @@ -15,22 +12,17 @@ document.addEventListener('DOMContentLoaded', () => { UI.renderWeightTable(); UI.renderMealTable(); - // Add logout button to settings tab + // Add security information to settings tab const settingsCard = document.querySelector('#settings-content .card:last-child'); if (settingsCard) { - const logoutSection = document.createElement('div'); - logoutSection.className = 'form-group'; - logoutSection.innerHTML = ` + const securitySection = document.createElement('div'); + securitySection.className = 'form-group'; + securitySection.innerHTML = `

Security

-

Log out of your weight tracker application

- +

Your data is protected by Nginx basic authentication.

+

To log out, close your browser or clear your browser's authentication cache.

`; - settingsCard.appendChild(logoutSection); - - // Add logout functionality - document.getElementById('logout-button').addEventListener('click', () => { - Auth.logout(); - }); + settingsCard.appendChild(securitySection); } console.log('Weight Tracker app initialized successfully');