Files
pictureFrame-webApp/templates/token/approved.html.twig
T
football2801 a302ac09b4
CI / test (push) Has been cancelled
feat(design): v2 opt-in (atmospheric dusks) — Settings toggle, cookie-mirrored
Lets users opt into the new atmospheric design without affecting users on v1.
Adds a beta-flag toggle in Settings → Design. Server-side preference persists
across devices; a cookie mirrors it so unauthenticated Twig pages do correct
first-paint without an extra DB roundtrip.

Backend:
- User.designVersion column (nullable VARCHAR(10); null defaults to 'v1')
- Migration Version20260515120000
- PATCH /api/user/design endpoint accepting 'v1'|'v2', sets wevisto_design cookie
- SpaController injects data-design on <html> + refreshes the cookie on every
  SPA load (keeps cross-device pref in sync)
- Twig templates (base, login, register, help, setup, token-*) read the
  cookie via {{ app.request.cookies.get('wevisto_design')|default('v1') }}
  so login/setup pages also respect the user's design choice

Frontend:
- design-v2.scss — opt-in overlay scoped under [data-design="v2"]. Overrides
  --color-* tokens to dusk variants per theme (warm-craft → amber, ocean-dusk
  stays, etc.), adds harbor photo backdrop via body::before with theme tint
  via body::after. Glass-card blur on existing surfaces. v1 untouched.
- harbor.jpg shipped as a public asset (270KB, single-fetch, cached)
- User type gains designVersion ('v1' | 'v2')
- SettingsView toggle (Original / Atmospheric) calls the API, updates the
  data-design attribute optimistically, reverts on failure

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:28:44 -04:00

30 lines
1.4 KiB
Twig

<!DOCTYPE html>
<html lang="en" data-design="{{ app.request.cookies.get('wevisto_design')|default('v1') }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="/build/favicon.svg">
<link rel="icon" type="image/png" sizes="32x32" href="/build/icons/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/build/icons/favicon-16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/build/icons/apple-touch-icon.png">
<title>Photo added — WeVisto</title>
<style>
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:system-ui,sans-serif;min-height:100dvh;background:#fdf6ee;color:#3a2e22;display:flex;align-items:center;justify-content:center;padding:2rem 1rem}
.card{width:100%;max-width:420px;text-align:center}
.icon{font-size:3rem;margin-bottom:1rem}
h1{font-size:1.4rem;font-weight:700;margin-bottom:.5rem}
p{color:#8a7060;font-size:.875rem;margin-bottom:1.5rem}
a{display:inline-block;padding:.75rem 1.5rem;background:#c97c3a;color:#fff;border-radius:10px;text-decoration:none;font-weight:700}
</style>
</head>
<body>
<div class="card">
<div class="icon">✓</div>
<h1>Photo added to your frame</h1>
<p>It'll appear in your rotation once it's been processed.</p>
<a href="/">Go to your frames</a>
</div>
</body>
</html>