diff --git a/config.json b/config.json index 5b3f34f..4bd7233 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "id": "chatelet", - "version": "0.1.0", + "version": "0.3.0", "name": "Chatelet", "repo": "https://git.atitlan.io/aiolabs/chatelet", "short_description": "Nostr-native room rentals (Airbnb-style) for LNbits", diff --git a/models.py b/models.py index 8a239e3..6fd20a8 100644 --- a/models.py +++ b/models.py @@ -17,6 +17,7 @@ Design notes carried into the field definitions: arbiter of "is this range open" — Nostr events are requests, not locks. """ +import json from datetime import datetime, timezone from enum import Enum @@ -194,6 +195,17 @@ class Block(BaseModel): # --------------------------------------------------------------------------- +def public_room_dict(room: Room) -> dict: + """A Room as public JSON for guests — strips operator-private fields: the + wallet id, and the check-in instructions (address/gate code, delivered only + in the encrypted post-payment DM). Shared by the HTTP and Nostr-RPC guest + doors so neither can leak them.""" + d = json.loads(room.json()) + d.pop("wallet", None) + d.pop("checkin_instructions", None) + return d + + class AvailabilityQuery(BaseModel): room_id: str check_in: str # YYYY-MM-DD inclusive diff --git a/static/js/index.js b/static/js/index.js index e586d16..e1867de 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,15 +1,247 @@ -// Chatelet operator admin page — placeholder. -// Quasar 2 + Vue 3 as UMD globals (no build step). Remember: no -// self-closing tags in UMD templates, and use :style bindings (not