This commit introduces a web-based admin UI to manage the store's status, backed by a simple Node.js/Express server for file writing.
Key features:
- **Admin UI (, ):** A form to update the scrolling message and closed status. It provides a user-friendly experience with loading states, in-page feedback, and change detection.
- **Node.js Backend ():** A simple Express server that serves the static site and provides a endpoint. This endpoint receives data from the admin UI, authenticates it, and writes it to .
- **Enhanced Security:** The password is no longer hardcoded in the client-side JavaScript. Authentication is handled server-side, and the password is read from a file for local development or an environment variable in production.
- **Project Setup (, ):** The project is now a formal Node.js project with dependencies (, , ) and a file to exclude .
This commit introduces functionality to display the store's open/closed status based on a schedule, with an override mechanism for holidays or emergencies.
Changes include:
- : Added IDs to hours paragraphs for easier manipulation.
- : Refactored to be more robust and moved its logic to to prevent race conditions. Removed for status updates from . Fixed lightbox navigation.
- : Added (boolean) and (string) fields to allow overriding the default status.
- : Consolidated all status logic. It now acts as a gatekeeper:
- If in is , it displays and ensures hours are visible.
- If is , it runs the scheduled open/closed logic (originally from ) and updates the status every minute, ensuring hours are always visible.
- : Reverted accidental changes and ensured only necessary status-related styles were added.
This ensures:
- The store's current open/closed status is always displayed.
- An override message can be shown for special closures.
- Store hours are always visible.