read.markets/app/templates/verify.html
Giorgio Gilestro daa3f79a52 mobile: cache-bust static assets so browser picks up CSS/JS edits
User reported phone still showing old behaviour (Qty/Avg portfolio
columns visible) even though the server-side JS had been updated.
Root cause: every <link>/<script> URL was a plain
/static/css/foo.css with no query string, so mobile Chrome served
the file from its HTTP cache rather than refetching it.

Adds a process-startup timestamp to the Jinja environment as
ASSET_VERSION (computed once when templates_env is imported). Every
<link>/<script> reference now appends `?v={{ ASSET_VERSION }}` so a
container restart bumps the URL and the browser refetches. 38 URLs
across 8 templates updated via sed; tests still pass.

Side benefit: future CSS/JS edits no longer require users to hard-
refresh.
2026-05-28 19:20:49 +02:00

49 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ BRAND_NAME }} · Verify email</title>
<script>
(function() {
try { document.documentElement.dataset.theme = localStorage.getItem('cassandra.theme') || 'light'; }
catch (e) { document.documentElement.dataset.theme = 'light'; }
})();
</script>
<link rel="stylesheet" href="{{ url_for('static', path='/css/tokens.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/layout.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/auth.css') }}?v={{ ASSET_VERSION }}" />
</head>
<body>
<div class="auth-shell">
<div class="auth-card">
<div class="auth-card__brand">{{ BRAND_NAME }}</div>
<div class="auth-card__hint">verify your email</div>
<p class="auth-card__lede">
We sent a {{ ttl_minutes }}-minute code to <strong>{{ email }}</strong>.
Enter the 6 digits below to finish signing in.
</p>
{% if error %}<div class="auth-error">{{ error }}</div>{% endif %}
{% if sent %}<div class="auth-info">{{ sent }}</div>{% endif %}
<form method="post" action="/verify" autocomplete="off">
<label>Verification code
<input type="text" name="code" inputmode="numeric" pattern="[0-9]{6}"
minlength="6" maxlength="6" required autofocus>
</label>
<button type="submit">Verify</button>
</form>
<form method="post" action="/verify/resend" style="margin-top:0.75rem;">
<button type="submit" class="auth-card__resend">Resend code</button>
</form>
<div class="auth-card__alt">
Wrong email? <a href="/logout">Start over →</a>
</div>
</div>
</div>
</body>
</html>