feat: features 025-032 - favoritos, contatos, trabalhe-conosco, area-cliente, navbar, hero-light-dark, performance-homepage
- feat(025): favoritos locais com FavoritesContext, HeartButton, PublicFavoritesPage
- feat(026): central de contatos admin (leads/contatos unificados)
- feat(027): configuração da página de contato via admin
- feat(028): trabalhe conosco - candidaturas com upload e admin
- feat(029): UX área do cliente - visitas, comparação, perfil
- feat(030): navbar UX - menu mobile, ThemeToggle, useFavorites
- feat(031): hero light/dark - imagens separadas por tema, upload, preview, seed
- feat(032): performance homepage - Promise.all parallel fetches, sessionStorage cache,
preload hero image, loading=lazy nos cards, useInView hook, will-change carrossel,
keyframes em index.css, AgentsCarousel e HomeScrollScene via props
- fix: light mode HomeScrollScene - gradiente, cores de texto, scroll hint
migrations: g1h2i3j4k5l6 (source em leads), h1i2j3k4l5m6 (contact_config),
i1j2k3l4m5n6 (job_applications), j2k3l4m5n6o7 (hero theme images)
This commit is contained in:
parent
6ef5a7a17e
commit
cf5603243c
106 changed files with 11927 additions and 1367 deletions
|
|
@ -694,6 +694,9 @@ def seed() -> None:
|
|||
hero_cta_label="Ver Imóveis",
|
||||
hero_cta_url="/imoveis",
|
||||
featured_properties_limit=6,
|
||||
hero_image_url="https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1920&q=80",
|
||||
hero_image_light_url="https://images.unsplash.com/photo-1600585154526-990dced4db0d?auto=format&fit=crop&w=1920&q=80",
|
||||
hero_image_dark_url="https://images.unsplash.com/photo-1600607687644-aac4c3eac7f4?auto=format&fit=crop&w=1920&q=80",
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -775,6 +778,50 @@ def seed() -> None:
|
|||
db.session.commit()
|
||||
print(f"Admin: {ADMIN_EMAIL}")
|
||||
|
||||
# ── Generic admin (credenciais simples para demo) ────────────────────
|
||||
GENERIC_ADMIN_EMAIL = "admin@demo.com"
|
||||
GENERIC_ADMIN_PASSWORD = "admin1234"
|
||||
gadmin = ClientUser.query.filter_by(email=GENERIC_ADMIN_EMAIL).first()
|
||||
if not gadmin:
|
||||
gadmin = ClientUser(
|
||||
name="Admin Demo",
|
||||
email=GENERIC_ADMIN_EMAIL,
|
||||
password_hash=bcrypt.hashpw(
|
||||
GENERIC_ADMIN_PASSWORD.encode(), bcrypt.gensalt()
|
||||
).decode(),
|
||||
role="admin",
|
||||
)
|
||||
db.session.add(gadmin)
|
||||
else:
|
||||
gadmin.password_hash = bcrypt.hashpw(
|
||||
GENERIC_ADMIN_PASSWORD.encode(), bcrypt.gensalt()
|
||||
).decode()
|
||||
gadmin.role = "admin"
|
||||
db.session.commit()
|
||||
print(f"Generic admin: {GENERIC_ADMIN_EMAIL}")
|
||||
|
||||
# ── Demo user (sem acesso admin) ─────────────────────────────────────
|
||||
DEMO_EMAIL = "usuario@demo.com"
|
||||
DEMO_PASSWORD = "demo1234"
|
||||
demo = ClientUser.query.filter_by(email=DEMO_EMAIL).first()
|
||||
if not demo:
|
||||
demo = ClientUser(
|
||||
name="Usuário Demo",
|
||||
email=DEMO_EMAIL,
|
||||
password_hash=bcrypt.hashpw(
|
||||
DEMO_PASSWORD.encode(), bcrypt.gensalt()
|
||||
).decode(),
|
||||
role="user",
|
||||
)
|
||||
db.session.add(demo)
|
||||
else:
|
||||
demo.password_hash = bcrypt.hashpw(
|
||||
DEMO_PASSWORD.encode(), bcrypt.gensalt()
|
||||
).decode()
|
||||
demo.role = "user"
|
||||
db.session.commit()
|
||||
print(f"Demo user: {DEMO_EMAIL}")
|
||||
|
||||
total_amenities = sum(len(v) for v in AMENITIES.values())
|
||||
total_types = sum(1 + len(c["subtypes"]) for c in PROPERTY_TYPES)
|
||||
total_cities = len(LOCATIONS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue