build ocr
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { Search, Upload as UploadIcon, X, Share2, Lock, LogOut } from 'lucide-react';
|
||||
import { Search, Upload as UploadIcon, X, Share2, Lock, LogOut, Settings } from 'lucide-react';
|
||||
import { useMemes, useTags, useCollections } from '../hooks/useMemes';
|
||||
import { useAuth, useLogout } from '../hooks/useAuth';
|
||||
import { GalleryGrid } from '../components/GalleryGrid';
|
||||
@@ -8,6 +8,7 @@ import { UploadModal } from '../components/UploadModal';
|
||||
import { LoginModal } from '../components/LoginModal';
|
||||
import { SharePanel } from '../components/SharePanel';
|
||||
import { CollectionBar } from '../components/CollectionBar';
|
||||
import { SettingsModal } from '../components/SettingsModal';
|
||||
import type { Meme } from '../api/client';
|
||||
|
||||
export function Gallery() {
|
||||
@@ -19,6 +20,7 @@ export function Gallery() {
|
||||
const [quickShareMeme, setQuickShareMeme] = useState<Meme | null>(null);
|
||||
const [showUpload, setShowUpload] = useState(false);
|
||||
const [showLogin, setShowLogin] = useState(false);
|
||||
const [showSettings, setShowSettings] = useState(false);
|
||||
|
||||
const { data: auth } = useAuth();
|
||||
const logout = useLogout();
|
||||
@@ -116,6 +118,16 @@ export function Gallery() {
|
||||
<span className="hidden sm:inline">Upload</span>
|
||||
</button>
|
||||
|
||||
{isAdmin && (
|
||||
<button
|
||||
onClick={() => setShowSettings(true)}
|
||||
title="Settings"
|
||||
className="flex items-center gap-1.5 px-3 py-2 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-400 hover:text-zinc-200 text-sm transition-colors"
|
||||
>
|
||||
<Settings size={15} />
|
||||
</button>
|
||||
)}
|
||||
|
||||
{isAdmin ? (
|
||||
<button
|
||||
onClick={() => logout.mutate()}
|
||||
@@ -271,6 +283,11 @@ export function Gallery() {
|
||||
onSuccess={() => setShowUpload(true)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Settings modal */}
|
||||
{showSettings && isAdmin && (
|
||||
<SettingsModal onClose={() => setShowSettings(false)} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user