A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
feat: disable karakeep 2025 wrapped
Mohamed Bassema353d9801d8a
diff --git a/apps/web/app/dashboard/layout.tsx b/apps/web/app/dashboard/layout.tsxindex 81b44a3c..be65e66a 100644--- a/apps/web/app/dashboard/layout.tsx+++ b/apps/web/app/dashboard/layout.tsx@@ -16,7 +16,6 @@ import {Highlighter,Home,Search,- Sparkles,Tag,} from "lucide-react";@@ -35,10 +34,9 @@ export default async function Dashboard({redirect("/");}- const [lists, userSettings, showWrapped] = await Promise.all([+ const [lists, userSettings] = await Promise.all([tryCatch(api.lists.list()),tryCatch(api.users.settings()),- tryCatch(api.users.hasWrapped()),]);if (userSettings.error) {@@ -57,10 +55,6 @@ export default async function Dashboard({throw lists.error;}- if (showWrapped.error) {- throw showWrapped.error;- }-const items = (t: TFunction) =>[{@@ -92,20 +86,10 @@ export default async function Dashboard({icon: <Archive size={18} />,path: "/dashboard/archive",},- // Only show wrapped if user has at least 20 bookmarks- showWrapped.data- ? [- {- name: t("wrapped.button"),- icon: <Sparkles size={18} />,- path: "/dashboard/wrapped",- },- ]- : [],].flat();const mobileSidebar = (t: TFunction) => [- ...items(t).filter((item) => item.path !== "/dashboard/wrapped"),+ ...items(t),{name: t("lists.all_lists"),icon: <ClipboardList size={18} />,diff --git a/apps/web/app/dashboard/wrapped/page.tsx b/apps/web/app/dashboard/wrapped/page.tsxdeleted file mode 100644index f479aca7..00000000--- a/apps/web/app/dashboard/wrapped/page.tsx+++ /dev/null@@ -1,24 +0,0 @@-"use client";--import { useEffect } from "react";-import { useRouter } from "next/navigation";-import { WrappedModal } from "@/components/wrapped";--export default function WrappedPage() {- const router = useRouter();-- const handleClose = () => {- router.push("/dashboard/bookmarks");- };-- // Always show the modal when this page is loaded- useEffect(() => {- // Prevent page from being scrollable when modal is open- document.body.style.overflow = "hidden";- return () => {- document.body.style.overflow = "";- };- }, []);-- return <WrappedModal open={true} onClose={handleClose} />;-}diff --git a/apps/web/app/settings/stats/page.tsx b/apps/web/app/settings/stats/page.tsxindex 6f9db115..28c017f5 100644--- a/apps/web/app/settings/stats/page.tsx+++ b/apps/web/app/settings/stats/page.tsx@@ -1,12 +1,10 @@"use client";-import { useMemo, useState } from "react";+import { useMemo } from "react";import { Badge } from "@/components/ui/badge";-import { Button } from "@/components/ui/button";import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";import { Progress } from "@/components/ui/progress";import { Skeleton } from "@/components/ui/skeleton";-import { WrappedModal } from "@/components/wrapped";import { useTranslation } from "@/lib/i18n/client";import { api } from "@/lib/trpc";import {@@ -28,7 +26,6 @@ import {List,Rss,Smartphone,- Sparkles,TrendingUp,Upload,Zap,@@ -165,8 +162,6 @@ export default function StatsPage() {const { t } = useTranslation();const { data: stats, isLoading } = api.users.stats.useQuery();const { data: userSettings } = api.users.settings.useQuery();- const { data: hasWrapped } = api.users.hasWrapped.useQuery();- const [showWrapped, setShowWrapped] = useState(false);const maxHourlyActivity = useMemo(() => {if (!stats) return 0;@@ -241,16 +236,8 @@ export default function StatsPage() {)}</p></div>- {hasWrapped && (- <Button onClick={() => setShowWrapped(true)} className="gap-2">- <Sparkles className="h-4 w-4" />- View Your 2025 Wrapped- </Button>- )}</div>- <WrappedModal open={showWrapped} onClose={() => setShowWrapped(false)} />-{/* Overview Stats */}<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4"><StatCarddiff --git a/packages/trpc/routers/users.ts b/packages/trpc/routers/users.tsindex 71c23a39..abd50d63 100644--- a/packages/trpc/routers/users.ts+++ b/packages/trpc/routers/users.ts@@ -140,10 +140,18 @@ export const usersAppRouter = router({wrapped: authedProcedure.output(zWrappedStatsResponseSchema).query(async ({ ctx }) => {+ throw new TRPCError({+ code: "BAD_REQUEST",+ message: "This endpoint is currently disabled",+ });const user = await User.fromCtx(ctx);return await user.getWrappedStats(2025);}),hasWrapped: authedProcedure.output(z.boolean()).query(async ({ ctx }) => {+ throw new TRPCError({+ code: "BAD_REQUEST",+ message: "This endpoint is currently disabled",+ });const user = await User.fromCtx(ctx);return await user.hasWrapped();}),