aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/app/settings/stats
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-07-06 18:26:41 +0000
committerMohamed Bassem <me@mbassem.com>2025-07-06 18:51:40 +0000
commit0e94ad36b580534877871ece247ed6085b5749ef (patch)
tree4585a326d2a2e36d34c6627c047ccec49b3e1b4d /apps/web/app/settings/stats
parentb60ece578304df21602d39c7022a7a4dbc6437e0 (diff)
downloadkarakeep-0e94ad36b580534877871ece247ed6085b5749ef.tar.zst
feat: Add a new timezone user setting
Diffstat (limited to 'apps/web/app/settings/stats')
-rw-r--r--apps/web/app/settings/stats/page.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/web/app/settings/stats/page.tsx b/apps/web/app/settings/stats/page.tsx
index ab4fb22c..599e5362 100644
--- a/apps/web/app/settings/stats/page.tsx
+++ b/apps/web/app/settings/stats/page.tsx
@@ -110,6 +110,7 @@ function StatCard({
export default function StatsPage() {
const { t } = useTranslation();
const { data: stats, isLoading } = api.users.stats.useQuery();
+ const { data: userSettings } = api.users.settings.useQuery();
const maxHourlyActivity = useMemo(() => {
if (!stats) return 0;
@@ -176,6 +177,11 @@ export default function StatsPage() {
</h1>
<p className="text-muted-foreground">
Insights into your bookmarking habits and collection
+ {userSettings?.timezone && userSettings.timezone !== "UTC" && (
+ <span className="block text-sm">
+ Times shown in {userSettings.timezone} timezone
+ </span>
+ )}
</p>
</div>
@@ -443,6 +449,11 @@ export default function StatsPage() {
<CardTitle className="flex items-center gap-2">
<Clock className="h-5 w-5" />
{t("settings.stats.activity_patterns.activity_by_hour")}
+ {userSettings?.timezone && userSettings.timezone !== "UTC" && (
+ <span className="text-xs font-normal text-muted-foreground">
+ ({userSettings.timezone})
+ </span>
+ )}
</CardTitle>
</CardHeader>
<CardContent>
@@ -462,6 +473,11 @@ export default function StatsPage() {
<CardTitle className="flex items-center gap-2">
<BarChart3 className="h-5 w-5" />
{t("settings.stats.activity_patterns.activity_by_day")}
+ {userSettings?.timezone && userSettings.timezone !== "UTC" && (
+ <span className="text-xs font-normal text-muted-foreground">
+ ({userSettings.timezone})
+ </span>
+ )}
</CardTitle>
</CardHeader>
<CardContent>