Show top level dir (#4165)

* Reload FileTree and File when changed externally

* Added tests

* Show project root in files pane

* Cut off titles that are too long

* Fix tests
This commit is contained in:
49fl
2024-10-28 14:29:47 -04:00
committed by GitHub
parent 4a62862ca0
commit 05610bb0f3
11 changed files with 81 additions and 29 deletions

View File

@ -4,7 +4,7 @@ import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
import { CustomIcon } from './CustomIcon'
import { useLocation, useNavigate } from 'react-router-dom'
import { PATHS } from 'lib/paths'
import { createAndOpenNewProject } from 'lib/desktopFS'
import { createAndOpenNewTutorialProject } from 'lib/desktopFS'
import { useAbsoluteFilePath } from 'hooks/useAbsoluteFilePath'
import { useLspContext } from './LspProvider'
import { openExternalBrowserIfDesktop } from 'lib/openWindow'
@ -116,9 +116,10 @@ export function HelpMenu(props: React.PropsWithChildren) {
if (isInProject) {
navigate(filePath + PATHS.ONBOARDING.INDEX)
} else {
createAndOpenNewProject({ onProjectOpen, navigate }).catch(
reportRejection
)
createAndOpenNewTutorialProject({
onProjectOpen,
navigate,
}).catch(reportRejection)
}
}}
>