A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
feat(web): A slightly better looking banner when no bookmarks are found
MohamedBassemd86628dfabe8
diff --git a/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx b/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsxindex b8e8d1e6..8ac90d0a 100644--- a/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx+++ b/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx@@ -1,4 +1,5 @@import { useEffect, useMemo } from "react";+import NoBookmarksBanner from "@/components/dashboard/bookmarks/NoBookmarksBanner";import { ActionButton } from "@/components/ui/action-button";import useBulkActionsStore from "@/lib/bulkActions";import {@@ -70,7 +71,7 @@ export default function BookmarksGrid({}, [loadMoreButtonInView]);if (bookmarks.length == 0 && !showEditorCard) {- return <p>No bookmarks</p>;+ return <NoBookmarksBanner />;}const children = [diff --git a/apps/web/components/dashboard/bookmarks/NoBookmarksBanner.tsx b/apps/web/components/dashboard/bookmarks/NoBookmarksBanner.tsxnew file mode 100644index 00000000..70788f44--- /dev/null+++ b/apps/web/components/dashboard/bookmarks/NoBookmarksBanner.tsx@@ -0,0 +1,19 @@+import { useTranslation } from "@/lib/i18n/client";+import { Bookmark } from "lucide-react";++export default function NoBookmarksBanner() {+ const { t } = useTranslation();+ return (+ <div className="flex flex-col items-center justify-center rounded-lg bg-slate-50 p-10 text-center shadow-sm dark:bg-slate-700/50 dark:shadow-md">+ <div className="mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-700">+ <Bookmark className="h-8 w-8 text-slate-400 dark:text-slate-300" />+ </div>+ <h3 className="mb-2 text-xl font-medium text-slate-700 dark:text-slate-100">+ {t("banners.no_bookmarks.title")}+ </h3>+ <p className="mb-6 max-w-md text-slate-500 dark:text-slate-400">+ {t("banners.no_bookmarks.description")}+ </p>+ </div>+ );+}diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.jsonindex f266fcd9..2a181285 100644--- a/apps/web/lib/i18n/locales/en/translation.json+++ b/apps/web/lib/i18n/locales/en/translation.json@@ -346,6 +346,12 @@"updated": "List has been updated!"}},+ "banners": {+ "no_bookmarks": {+ "title": "No bookmarks yet",+ "description": "Save interesting articles, links, and pages to access them quickly later."+ }+ },"cleanups": {"cleanups": "Cleanups","duplicate_tags": {