Add login, role-based portals, and browser-local admin image upload
This commit is contained in:
@@ -24,3 +24,20 @@ src/app/page.tsx
|
||||
src/components/MeasuredText.tsx
|
||||
README.md
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
The app now includes simple browser-local authentication with two hardcoded accounts:
|
||||
|
||||
- `admin` / `admin` — Admin portal (`/admin`)
|
||||
- `user` / `user` — User portal (`/user`)
|
||||
|
||||
The logged-in role is stored in `localStorage`. The **Login / Logout** control lives in the Navbar.
|
||||
|
||||
## Admin portal
|
||||
|
||||
Visit `/admin` after logging in as `admin` to upload images. Images are previewed in a gallery and can be deleted individually. For now, uploaded images are stored as base64 strings in the browser's `localStorage` under the key `la-huasca-admin-images` — they are not persisted on a server.
|
||||
|
||||
## User portal
|
||||
|
||||
Visit `/user` after logging in as `user` to see a member portal with mock reservations, discount coupons, offers, the WiFi password, and a list of benefits.
|
||||
|
||||
Reference in New Issue
Block a user