fix: round €/m² in Telegram, drop "Bilder nachladen" admin button, fix lightbox visibility
- notifications: round sqm_price to whole € in Telegram match messages
(was emitting raw float like "12.345614 €/m²").
- wohnungen: remove the admin-only "Bilder nachladen (N)" button. It
flickered into view whenever a freshly-scraped flat was still in
pending state, which was effectively random from the user's point of
view, and the manual backfill it triggered isn't needed anymore — new
flats are auto-enriched at scrape time. Also drops the dead helpers
it was the sole caller of: enrichment.kick_backfill,
enrichment._backfill_runner, db.flats_needing_enrichment,
db.enrichment_counts.
- lightbox: the modal didn't appear because Tailwind's Play CDN injects
its own .hidden { display: none } rule at runtime, which kept fighting
our class toggle. Switch the show/hide to inline style.display so no
external stylesheet can mask it. Single-class .lightbox now only owns
the layout — the initial-hidden state is on the element via
style="display:none".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
787f848aba
commit
ee7ba6c6ff
8 changed files with 14 additions and 76 deletions
|
|
@ -79,7 +79,6 @@ def _wohnungen_context(user) -> dict:
|
|||
flats_view.append({"row": f, "last": latest_apps.get(f["id"])})
|
||||
|
||||
rejected_view = db.rejected_flats(uid)
|
||||
enrichment_counts = db.enrichment_counts()
|
||||
|
||||
partner = db.get_partner_user(uid)
|
||||
partner_info = None
|
||||
|
|
@ -133,7 +132,6 @@ def _wohnungen_context(user) -> dict:
|
|||
"flats": flats_view,
|
||||
"rejected_flats": rejected_view,
|
||||
"filtered_out_flats": filtered_out_view,
|
||||
"enrichment_counts": enrichment_counts,
|
||||
"partner": partner_info,
|
||||
"map_points": map_points,
|
||||
"has_filters": _has_filters(filters_row),
|
||||
|
|
@ -360,19 +358,6 @@ async def action_submit_forms(
|
|||
return RedirectResponse(request.headers.get("referer", "/einstellungen/profil"), status_code=303)
|
||||
|
||||
|
||||
@router.post("/actions/enrich-all")
|
||||
async def action_enrich_all(
|
||||
request: Request,
|
||||
csrf: str = Form(...),
|
||||
admin=Depends(require_admin),
|
||||
):
|
||||
require_csrf(admin["id"], csrf)
|
||||
queued = enrichment.kick_backfill()
|
||||
db.log_audit(admin["username"], "enrichment.backfill",
|
||||
f"queued={queued}", user_id=admin["id"], ip=client_ip(request))
|
||||
return _wohnungen_partial_or_redirect(request, admin)
|
||||
|
||||
|
||||
@router.post("/actions/enrich-flat")
|
||||
async def action_enrich_flat(
|
||||
request: Request,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue