Polish: UI theme colors, onboarding dismiss, Export button in sidebar (#270)
* Light mode style fixes * Fix dismissing onboarding for nested routes * Refactor: move export button to user side panel * Refactor: add project data to modeling page loader * Add new ProjectSidebarMenu * Convert AppHeader to use ProjectSidebarMenu * Move ExportButton to ProjectSidebarMenu * Fix: hide default dir setting in Web * Add DownloadAppBanner when in Prod * Add unit tests to ProjectSidebarMenu * Tiny CSS rounding tweak to sidebars * Fix formatting in unit tests * Update icons and logos to use full-color Kitt * Fix: dim UI on camera drag, not click
This commit is contained in:
@ -1,21 +1,22 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Toolbar } from '../Toolbar'
|
||||
import { useStore } from '../useStore'
|
||||
import UserSidebarMenu from './UserSidebarMenu'
|
||||
import { paths } from '../Router'
|
||||
import { isTauri } from '../lib/isTauri'
|
||||
import { ProjectWithEntryPointMetadata } from '../Router'
|
||||
import ProjectSidebarMenu from './ProjectSidebarMenu'
|
||||
|
||||
interface AppHeaderProps extends React.PropsWithChildren {
|
||||
showToolbar?: boolean
|
||||
filename?: string
|
||||
project?: ProjectWithEntryPointMetadata
|
||||
className?: string
|
||||
enableMenu?: boolean
|
||||
}
|
||||
|
||||
export const AppHeader = ({
|
||||
showToolbar = true,
|
||||
filename = '',
|
||||
project,
|
||||
children,
|
||||
className = '',
|
||||
enableMenu = false,
|
||||
}: AppHeaderProps) => {
|
||||
const { user } = useStore((s) => ({
|
||||
user: s.user,
|
||||
@ -24,23 +25,11 @@ export const AppHeader = ({
|
||||
return (
|
||||
<header
|
||||
className={
|
||||
'overlaid-panes sticky top-0 z-10 py-1 px-5 bg-chalkboard-10/50 dark:bg-chalkboard-100/50 border-b dark:border-b-2 border-chalkboard-30 dark:border-chalkboard-90 flex justify-between items-center ' +
|
||||
'overlaid-panes sticky top-0 z-20 py-1 px-5 bg-chalkboard-10/50 dark:bg-chalkboard-100/50 border-b dark:border-b-2 border-chalkboard-30 dark:border-chalkboard-90 flex justify-between items-center ' +
|
||||
className
|
||||
}
|
||||
>
|
||||
<Link
|
||||
to={isTauri() ? paths.HOME : paths.INDEX}
|
||||
className="flex items-center gap-4"
|
||||
>
|
||||
<img
|
||||
src="/kitt-arcade-winking.svg"
|
||||
alt="KittyCAD App"
|
||||
className="h-9 w-auto"
|
||||
/>
|
||||
<span className="text-sm text-chalkboard-110 dark:text-chalkboard-20 min-w-max">
|
||||
{isTauri() && filename ? filename : 'KittyCAD Modeling App'}
|
||||
</span>
|
||||
</Link>
|
||||
<ProjectSidebarMenu renderAsLink={!enableMenu} project={project} />
|
||||
{/* Toolbar if the context deems it */}
|
||||
{showToolbar && (
|
||||
<div className="max-w-4xl">
|
||||
|
Reference in New Issue
Block a user