bugfix: site renamed. Name component created.

This commit is contained in:
2026-08-19 02:41:05 +03:30
parent 80167c622c
commit e5c39c6b7e
12 changed files with 76 additions and 31 deletions

View File

@@ -0,0 +1,44 @@
import type { CSSProperties } from 'react';
export const BRAND_NAME = 'Nudentic';
/** Light-theme primary — use in print/PDF where theme tokens are unsafe. */
export const BRAND_PRIMARY_HEX = '#009cae';
type BrandWordmarkProps = {
className?: string;
style?: CSSProperties;
/**
* i-dot color. Omit to use the theme primary token.
* Pass a hex (e.g. `BRAND_PRIMARY_HEX`) for print/PDF capture.
*/
dotColor?: string;
};
function BrandI({ fill }: { fill: string }) {
return (
<svg
aria-hidden
viewBox="0 0 24 80"
className="inline-block h-[0.78em] w-[0.26em] overflow-visible align-baseline ms-[0.05em] me-[0.04em]"
>
<circle cx="12" cy="10" r="8" fill={fill} />
<rect x="6" y="28" width="12" height="52" rx="1.2" fill="currentColor" />
</svg>
);
}
export function BrandWordmark({ className, style, dotColor }: BrandWordmarkProps) {
const tittleFill = dotColor ?? 'var(--color-primary)';
return (
<span dir="ltr" className={className} style={style}>
<span className="sr-only">{BRAND_NAME}</span>
<span aria-hidden>
Nudent
<BrandI fill={tittleFill} />
c
</span>
</span>
);
}

View File

@@ -21,6 +21,7 @@ import { usePendingConnectionsCount } from '@/lib/hooks/usePendingConnectionsCou
import { useTabBadgeCounts } from '@/lib/hooks/useTabBadgeCounts';
import { badgeCountForPath } from '@/lib/tabBadgeUtils';
import { NavBadgePill } from '@/components/ui/shared/NavBadgePill';
import { BrandWordmark } from '@/components/ui/shared/BrandWordmark';
import {
canViewAppointmentsTab,
canViewCases,
@@ -110,7 +111,9 @@ function Sidebar({ mobileOpen = false, onClose }: SidebarProps) {
}`}
>
<div className="h-[71px] px-4 flex items-center justify-between gap-2">
<h1 className="text-lg font-medium tracking-tight truncate">{tCommon('appName')}</h1>
<h1 className="min-w-0 truncate">
<BrandWordmark className="text-lg font-medium tracking-tight" />
</h1>
{onClose ? (
<button
type="button"