|
|
|
@ -1,7 +1,7 @@ |
|
|
|
import React, { useMemo } from 'react' |
|
|
|
import { useLocation } from 'react-router-dom' |
|
|
|
import { SidebarTrigger } from '@/components/ui/sidebar' |
|
|
|
import { Button } from '@/components/ui/button' |
|
|
|
import { buttonVariants } from '@/components/ui/button' |
|
|
|
import ThemeToggle from '@/components/layout/ThemeToggle' |
|
|
|
import ServerHealthTrigger from '@/components/layout/ServerHealthTrigger' |
|
|
|
import LanguageSwitcher from '@/components/layout/LanguageSwitcher' |
|
|
|
@ -9,6 +9,7 @@ import { getNavigationConfig } from '@/config/navigation' |
|
|
|
import { useSupportPortalUrl } from '@/features/support/supportPortal' |
|
|
|
import { useTranslation } from '@/i18n' |
|
|
|
import { Ic } from '@/icons' |
|
|
|
import { cn } from '@/lib/utils' |
|
|
|
|
|
|
|
export default function Topbar() { |
|
|
|
const { pathname } = useLocation() |
|
|
|
@ -66,25 +67,22 @@ export default function Topbar() { |
|
|
|
<LanguageSwitcher /> |
|
|
|
|
|
|
|
{/* دکمه گزارش مشکلات (پرتال پشتیبانی CRM) */} |
|
|
|
<Button |
|
|
|
variant="outline" |
|
|
|
size="sm" |
|
|
|
asChild |
|
|
|
className="h-9 px-2.5 sm:px-3 rounded-xl border-border/70 bg-card/40 hover:bg-card text-xs font-semibold gap-2 shadow-xs transition-all" |
|
|
|
<a |
|
|
|
href={supportPortalUrl} |
|
|
|
target="_blank" |
|
|
|
rel="noopener noreferrer" |
|
|
|
title={t('topbar.reportIssues')} |
|
|
|
aria-label={t('topbar.reportIssues')} |
|
|
|
className={cn( |
|
|
|
buttonVariants({ variant: 'outline', size: 'sm' }), |
|
|
|
'h-9 px-2.5 sm:px-3 rounded-xl border-border/70 bg-card/40 hover:bg-card text-xs font-semibold gap-2 shadow-xs transition-all', |
|
|
|
)} |
|
|
|
> |
|
|
|
<a |
|
|
|
href={supportPortalUrl} |
|
|
|
target="_blank" |
|
|
|
rel="noopener noreferrer" |
|
|
|
title={t('topbar.reportIssues')} |
|
|
|
aria-label={t('topbar.reportIssues')} |
|
|
|
> |
|
|
|
<Ic name="headset" className="size-4 text-primary shrink-0" /> |
|
|
|
<span className="hidden sm:inline-block text-[12px] text-foreground"> |
|
|
|
{t('topbar.reportIssues')} |
|
|
|
</span> |
|
|
|
</a> |
|
|
|
</Button> |
|
|
|
<Ic name="headset" className="size-4 text-primary shrink-0" /> |
|
|
|
<span className="hidden sm:inline-block text-[12px] text-foreground"> |
|
|
|
{t('topbar.reportIssues')} |
|
|
|
</span> |
|
|
|
</a> |
|
|
|
|
|
|
|
{/* نشانگر وضعیت اتصال سرور */} |
|
|
|
<ServerHealthTrigger /> |
|
|
|
|