From 1f768be0485bbfa6b542dd24183fe8389acb9355 Mon Sep 17 00:00:00 2001 From: Md Saban <45597394+mdsaban@users.noreply.github.com> Date: Sat, 12 Oct 2024 18:37:20 +0530 Subject: feature(web): Introduce a new sticky navbar. Fixes 520 (#515) * ui: add global header * fix: design fixes * fix: tests * fix navbar background, hide y scrollbar and change sidebar footer to show version --------- Co-authored-by: MohamedBassem --- apps/web/app/dashboard/archive/page.tsx | 16 +++++----------- apps/web/app/dashboard/bookmarks/page.tsx | 10 +--------- apps/web/app/dashboard/favourites/page.tsx | 2 -- apps/web/app/dashboard/layout.tsx | 30 +++++++++++++++++------------- apps/web/app/dashboard/search/page.tsx | 11 +---------- 5 files changed, 24 insertions(+), 45 deletions(-) (limited to 'apps/web/app') diff --git a/apps/web/app/dashboard/archive/page.tsx b/apps/web/app/dashboard/archive/page.tsx index 5c25d8cc..becb6a58 100644 --- a/apps/web/app/dashboard/archive/page.tsx +++ b/apps/web/app/dashboard/archive/page.tsx @@ -1,19 +1,13 @@ import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks"; -import GlobalActions from "@/components/dashboard/GlobalActions"; import InfoTooltip from "@/components/ui/info-tooltip"; function header() { return ( -
-
-

🗄️ Archive

- -

Archived bookmarks won't appear in the homepage

-
-
-
- -
+
+

🗄️ Archive

+ +

Archived bookmarks won't appear in the homepage

+
); } diff --git a/apps/web/app/dashboard/bookmarks/page.tsx b/apps/web/app/dashboard/bookmarks/page.tsx index c02e6b85..a7b22fef 100644 --- a/apps/web/app/dashboard/bookmarks/page.tsx +++ b/apps/web/app/dashboard/bookmarks/page.tsx @@ -1,18 +1,10 @@ import React from "react"; import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks"; -import GlobalActions from "@/components/dashboard/GlobalActions"; -import { SearchInput } from "@/components/dashboard/search/SearchInput"; export default async function BookmarksPage() { return (
-
- - -
-
- -
+
); } diff --git a/apps/web/app/dashboard/favourites/page.tsx b/apps/web/app/dashboard/favourites/page.tsx index e5959af3..be20bd2f 100644 --- a/apps/web/app/dashboard/favourites/page.tsx +++ b/apps/web/app/dashboard/favourites/page.tsx @@ -1,5 +1,4 @@ import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks"; -import GlobalActions from "@/components/dashboard/GlobalActions"; export default async function FavouritesBookmarkPage() { return ( @@ -7,7 +6,6 @@ export default async function FavouritesBookmarkPage() { header={

⭐️ Favourites

-
} query={{ favourited: true }} diff --git a/apps/web/app/dashboard/layout.tsx b/apps/web/app/dashboard/layout.tsx index b0ac1f7d..cbd51245 100644 --- a/apps/web/app/dashboard/layout.tsx +++ b/apps/web/app/dashboard/layout.tsx @@ -1,3 +1,4 @@ +import Header from "@/components/dashboard/header/Header"; import MobileSidebar from "@/components/dashboard/sidebar/ModileSidebar"; import Sidebar from "@/components/dashboard/sidebar/Sidebar"; import DemoModeBanner from "@/components/DemoModeBanner"; @@ -14,20 +15,23 @@ export default async function Dashboard({ modal: React.ReactNode; }>) { return ( -
- -
- -
-
- {serverConfig.demoMode && } -
- - +
+
+
+ +
+
- {modal} -
{children}
-
+
+ {serverConfig.demoMode && } +
+ + +
+ {modal} +
{children}
+
+
); } diff --git a/apps/web/app/dashboard/search/page.tsx b/apps/web/app/dashboard/search/page.tsx index e7405c85..a239550c 100644 --- a/apps/web/app/dashboard/search/page.tsx +++ b/apps/web/app/dashboard/search/page.tsx @@ -1,24 +1,15 @@ "use client"; -import { Suspense, useRef } from "react"; +import { Suspense } from "react"; import BookmarksGrid from "@/components/dashboard/bookmarks/BookmarksGrid"; -import GlobalActions from "@/components/dashboard/GlobalActions"; -import { SearchInput } from "@/components/dashboard/search/SearchInput"; import { FullPageSpinner } from "@/components/ui/full-page-spinner"; import { useBookmarkSearch } from "@/lib/hooks/bookmark-search"; function SearchComp() { const { data } = useBookmarkSearch(); - const inputRef: React.MutableRefObject = - useRef(null); - return (
-
- - -
{data ? ( ) : ( -- cgit v1.2.3-70-g09d2