Wire the settings store through the whole frontend: - Settings page: theme (light/dark/system), currency ($/€) with an editable USD→EUR rate, timezone, and a Claude subscription section (plan → Pro/Max 5×/ Max 20×, monthly cost, start date) with a live token-savings estimate. - Theme applied to <html> from settings + a pre-paint script in index.html to avoid a flash; "system" follows the OS. - fmtCost now renders in the chosen currency (USD→EUR via the rate); all cost displays convert automatically. - New tz-aware fmtDateTime / tzDay helpers; the day-by-day charts bucket by the chosen timezone. - Subscription is no longer hardcoded: analytics + the "since subscription" range + the dashboard value card all read plan/cost/start-date from settings, and show a "set up your subscription" prompt when unconfigured. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html lang="en" class="dark">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover"
|
|
/>
|
|
<meta name="theme-color" content="#0a0a0a" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<title>Claude Agent — context</title>
|
|
<script>
|
|
// Apply the saved (or system) color scheme before first paint to avoid a flash.
|
|
try {
|
|
var t = "system";
|
|
var raw = localStorage.getItem("ai-agent-settings");
|
|
if (raw) t = (JSON.parse(raw).state || {}).theme || "system";
|
|
var dark = t === "dark" || (t === "system" &&
|
|
window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
document.documentElement.classList.toggle("dark", dark);
|
|
} catch (e) {}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|