diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8c4b8dc..b264643 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,5 +1,5 @@ import { useState, useCallback, useEffect, useRef } from "react"; -import { Search, Settings, Globe, ImageIcon, Loader2, ExternalLink, ChevronLeft, ChevronRight, SlidersHorizontal, RefreshCw, Images, BookmarkIcon } from "lucide-react"; +import { Search, Globe, ImageIcon, Loader2, ExternalLink, ChevronLeft, ChevronRight, SlidersHorizontal, RefreshCw } from "lucide-react"; import { SearchBar } from "@/components/SearchBar"; import { WebResults } from "@/components/WebResults"; import { ImageResults } from "@/components/ImageResults"; @@ -8,6 +8,7 @@ import { SettingsModal } from "@/components/SettingsModal"; import { ErrorToast } from "@/components/ErrorToast"; import { BackgroundGallery } from "@/components/BackgroundGallery"; import { Bookmarks } from "@/components/Bookmarks"; +import { AppHeader } from "@/components/AppHeader"; import { search as apiSearch, isImageResult, getBackground, refreshBackground, getBookmarkedUrls, addBookmark, removeBookmarkByUrl, type SearchResponse, type WebResult, type ImageResult, type BackgroundInfo } from "@/lib/api"; import { cn } from "@/lib/utils"; @@ -227,12 +228,12 @@ function App() { // Gallery page if (showGallery) { - return ; + return setShowSettings(true)} onShowBookmarks={handleShowBookmarks} />; } // Bookmarks page if (showBookmarks) { - return ; + return setShowSettings(true)} onShowGallery={handleShowGallery} />; } const bgUrl = bgInfo?.enabled && bgInfo?.url ? bgInfo.url : null; @@ -240,7 +241,7 @@ function App() { // Home page (no search yet) if (!hasSearched) { return ( -
+
{/* Background image */} {bgUrl && (
)} - {/* Top-right: settings + nav menu */} -
- - - - - + {/* Shared header */} + setShowSettings(true)} + onShowBookmarks={handleShowBookmarks} + onShowGallery={handleShowGallery} + transparent={!!bgUrl} + /> {/* Center content */} -
-

- - Hey Search - -

-

- Private metasearch engine -

-
+
+
+

+ + Hey Search + +

+

+ Private metasearch engine +

+
- doSearch(q, category)} className="w-full" /> + doSearch(q, category)} className="w-full" /> - {/* Category switch */} -
- {([ - { key: "web" as const, label: "Web", icon: Globe }, - { key: "images" as const, label: "Images", icon: ImageIcon }, - ]).map(({ key, label, icon: Icon }) => ( - - ))} + {/* Category switch */} +
+ {([ + { key: "web" as const, label: "Web", icon: Globe }, + { key: "images" as const, label: "Images", icon: ImageIcon }, + ]).map(({ key, label, icon: Icon }) => ( + + ))} +
{/* Bottom-right: new image button */} @@ -402,30 +363,19 @@ function App() { {statusMessage}
- {/* Header */} -
-
- - doSearch(q)} className="flex-1" /> - -
+ {/* Shared header with search bar in center slot */} + setShowSettings(true)} + onShowBookmarks={handleShowBookmarks} + onShowGallery={handleShowGallery} + > + doSearch(q)} /> + - {/* Category tabs */} -
+
{/* Content */}
@@ -554,28 +504,8 @@ function App() {
{/* Footer */} -