Merge branch 'main' into pierremtb/issue1349

This commit is contained in:
Pierre Jacquier
2024-03-21 07:51:04 -04:00
245 changed files with 31249 additions and 26236 deletions

View File

@ -12,6 +12,7 @@ import { Logo } from './Logo'
import { APP_NAME } from 'lib/constants'
import { useCommandsContext } from 'hooks/useCommandsContext'
import { CustomIcon } from './CustomIcon'
import { useLspContext } from './LspProvider'
const ProjectSidebarMenu = ({
project,
@ -22,14 +23,24 @@ const ProjectSidebarMenu = ({
project?: IndexLoaderData['project']
file?: IndexLoaderData['file']
}) => {
const { onProjectClose } = useLspContext()
return (
<div className="rounded-sm !no-underline h-9 mr-auto max-h-min min-w-max border-0 py-1 px-2 flex items-center gap-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-energy-50 dark:hover:bg-chalkboard-90">
<Link to={paths.HOME} className="group">
<Link
onClick={() => {
onProjectClose(file || null, project?.path || null, false)
}}
to={paths.HOME}
className="group"
>
<Logo className="w-auto h-5 text-chalkboard-120 dark:text-chalkboard-10 group-hover:text-energy-10" />
</Link>
{renderAsLink ? (
<>
<Link
onClick={() => {
onProjectClose(file || null, project?.path || null, false)
}}
to={paths.HOME}
className="!no-underline"
data-testid="project-sidebar-link"
@ -57,6 +68,7 @@ function ProjectMenuPopover({
file?: IndexLoaderData['file']
}) {
const { commandBarSend } = useCommandsContext()
const { onProjectClose } = useLspContext()
return (
<Popover className="relative">
@ -149,8 +161,10 @@ function ProjectMenuPopover({
</ActionButton>
{isTauri() && (
<ActionButton
Element="link"
to={paths.HOME}
Element="button"
onClick={() => {
onProjectClose(file || null, project?.path || null, true)
}}
icon={{
icon: faHome,
className: 'p-1',