fix(ui): удалён FAB закладок — перекрывал поле ввода чата в PWA
FAB (z-40, fixed right-bottom) ложился поверх композера чата и кнопок отправки. Добавление закладки уже доступно: меню значка «Закладки» в MobileBottomNav (мобильный) и сайдбар (десктоп) — функционал дублировался.
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useLocation } from 'wouter';
|
||||
import { CreateBookmarkModal } from '@/components/CreateBookmarkModal';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
const BOOKMARKABLE_PATHS = [
|
||||
'/forms/',
|
||||
'/tasks/',
|
||||
'/dashboard',
|
||||
'/kanban/',
|
||||
'/reports/',
|
||||
'/home',
|
||||
];
|
||||
|
||||
export function AddBookmarkFAB() {
|
||||
const [location] = useLocation();
|
||||
|
||||
const isBookmarkable = BOOKMARKABLE_PATHS.some((path) => location === path || location.startsWith(path));
|
||||
if (!isBookmarkable) return null;
|
||||
|
||||
const currentUrl = typeof window !== 'undefined' ? window.location.pathname + window.location.search : location;
|
||||
|
||||
return (
|
||||
<CreateBookmarkModal
|
||||
defaultUrl={currentUrl}
|
||||
trigger={
|
||||
<Button
|
||||
size="icon"
|
||||
className="fixed bottom-[calc(4rem+max(12px,env(safe-area-inset-bottom)))] right-[calc(1rem+env(safe-area-inset-right))] z-40 rounded-full shadow-lg md:hidden"
|
||||
aria-label="Добавить закладку"
|
||||
>
|
||||
<Plus className="w-5 h-5" aria-hidden="true" />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { Loader2, AlertTriangle } from 'lucide-react';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { Sidebar } from '@/components/Sidebar';
|
||||
import { AddBookmarkFAB } from '@/components/AddBookmarkFAB';
|
||||
import { apiRequest } from '@/lib/queryClient';
|
||||
import { isAdmin } from '@/lib/permissions';
|
||||
|
||||
@@ -82,9 +81,12 @@ function BillingBlockedOverlay() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Единый persistent shell приложения: auth-gate, биллинг-оверлей, Sidebar и
|
||||
* AddBookmarkFAB монтируются один раз и не размонтируются при переходах между
|
||||
* shell-страницами. Контент (Switch с роутами) рендерится как children.
|
||||
* Единый persistent shell приложения: auth-gate, биллинг-оверлей, Sidebar
|
||||
* монтируются один раз и не размонтируются при переходах между shell-страницами.
|
||||
* Контент (Switch с роутами) рендерится как children.
|
||||
* FAB закладок удалён — добавление закладки доступно в меню значка «Закладки»
|
||||
* на мобильном (MobileBottomNav) и в сайдбаре на десктопе; FAB перекрывал
|
||||
* поле ввода чата (z-40 поверх композера).
|
||||
*/
|
||||
export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
const { user, isLoading } = useAuth();
|
||||
@@ -138,7 +140,6 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
{showBlockedOverlay && <BillingBlockedOverlay />}
|
||||
</AnimatePresence>
|
||||
{children}
|
||||
<AddBookmarkFAB />
|
||||
</Sidebar>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user