New features: - Multi-profile management (create, switch, rename, delete) - Knowledge browser with document viewer - MCP server settings screen - Skills hub with marketplace search fallback - Context usage tracking and display Improvements: - eslint added and auto-fixed (69 issues resolved) - Settings dialog restructured (Agent, Smart Routing, Voice, Display sections) - Navigation updated with Profiles tab across desktop/mobile - Security contact updated to GitHub advisories + X DM - .gitignore hardened (.runtime/, internal dev docs) - Version bumped to 1.0.0 Build: clean | TypeScript: 0 errors | Tests: 4/4 passing
64 lines
1.7 KiB
TypeScript
64 lines
1.7 KiB
TypeScript
/**
|
|
* MobilePageHeader — native app-style sticky top bar for non-chat pages.
|
|
* Shows hamburger on the left, page title centered, optional right action.
|
|
*/
|
|
import type { ReactNode } from 'react'
|
|
import { openHamburgerMenu } from '@/components/mobile-hamburger-menu'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
type MobilePageHeaderProps = {
|
|
title: string
|
|
right?: ReactNode
|
|
className?: string
|
|
}
|
|
|
|
export function MobilePageHeader({
|
|
title,
|
|
right,
|
|
className,
|
|
}: MobilePageHeaderProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'md:hidden flex items-center h-12 px-2 shrink-0',
|
|
'border-b bg-surface',
|
|
className,
|
|
)}
|
|
style={{
|
|
borderColor: 'var(--color-border, #e5e7eb)',
|
|
paddingTop: 'env(safe-area-inset-top, 0px)',
|
|
}}
|
|
>
|
|
<button
|
|
type="button"
|
|
aria-label="Open navigation menu"
|
|
onClick={openHamburgerMenu}
|
|
className="shrink-0 flex items-center justify-center w-11 h-11 rounded-xl active:bg-white/10 transition-colors touch-manipulation z-10"
|
|
>
|
|
<svg
|
|
width="20"
|
|
height="16"
|
|
viewBox="0 0 20 16"
|
|
fill="none"
|
|
className="opacity-70"
|
|
style={{ color: 'var(--color-ink, #111)' }}
|
|
>
|
|
<path
|
|
d="M1 1.5H19M1 8H19M1 14.5H13"
|
|
stroke="currentColor"
|
|
strokeWidth="1.6"
|
|
strokeLinecap="round"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
<span
|
|
className="flex-1 text-center text-[15px] font-semibold truncate -ml-11"
|
|
style={{ color: 'var(--color-ink, #111)' }}
|
|
>
|
|
{title}
|
|
</span>
|
|
<div className="shrink-0 w-9">{right ?? null}</div>
|
|
</div>
|
|
)
|
|
}
|