Files
raucao 73b34a3ead Add OpenRouter usage stats widget
Add a per-user OpenRouter usage integration that reads the management key
and displays a single spend total next to the Bitcoin ticker.

The total is configurable to Today, This week or This month, defaulting to
Today. Analytics queries are widened to the previous UTC hour boundary and
then filtered locally so buckets in non-whole-hour timezones are not
clipped.
2026-11-13 14:51:38 +04:00

43 lines
1.2 KiB
Plaintext

import { pageTitle } from 'ember-page-title';
import DefaultClock from '../components/default-clock.gjs';
import BitcoinTicker from '../components/bitcoin-ticker.gjs';
import OpenRouterUsage from '../components/openrouter-usage.gjs';
import SiteLinks from '../components/site-links.gjs';
import SettingsButton from '../components/settings-button.gjs';
import UpcomingEvents from '../components/upcoming-events.gjs';
import Wallpaper from '../components/wallpaper.gjs';
import WallpaperCredit from '../components/wallpaper-credit.gjs';
<template>
{{pageTitle "New Tab"}}
<Wallpaper />
<div class="col-start-1 row-start-1 row-span-2 flex items-start p-12">
<UpcomingEvents />
</div>
<div class="fixed bottom-12 left-12 z-10 flex items-center">
<SettingsButton />
</div>
<div class="fixed right-12 bottom-12 z-10 flex items-center justify-end">
<WallpaperCredit />
</div>
<div class="col-start-3 row-start-1 flex items-start justify-end pt-12 pr-12">
<SiteLinks />
</div>
<div
class="col-start-2 row-start-1 flex items-start justify-center gap-6 pt-12"
>
<BitcoinTicker />
<OpenRouterUsage />
</div>
<div class="col-start-2 row-start-2 flex items-center justify-center">
<DefaultClock />
</div>
</template>