mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-08 13:01:10 +02:00
Load initial paths for file browser
This commit is contained in:
parent
be4a564456
commit
9a0e23a93f
3 changed files with 6 additions and 3 deletions
|
|
@ -133,7 +133,11 @@ function FileBrowserModalContent({
|
|||
className={styles.scroller}
|
||||
scrollDirection="both"
|
||||
>
|
||||
{error ? <div>{translate('ErrorLoadingContents')}</div> : null}
|
||||
{error ? (
|
||||
<Alert kind={kinds.DANGER}>
|
||||
{translate('ErrorLoadingContents')}
|
||||
</Alert>
|
||||
) : null}
|
||||
|
||||
{isFetched && !error ? (
|
||||
<Table horizontalScroll={false} columns={columns}>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ const usePaths = ({
|
|||
path: '/filesystem',
|
||||
queryParams: { path, allowFoldersWithoutTrailingSlashes, includeFiles },
|
||||
queryOptions: {
|
||||
enabled: path.trim().length > 0,
|
||||
placeholderData: keepPreviousData,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public FileSystemController(IFileSystemLookupService fileSystemLookupService,
|
|||
|
||||
[HttpGet]
|
||||
[Produces("application/json")]
|
||||
public IActionResult GetContents(string path, bool includeFiles = false, bool allowFoldersWithoutTrailingSlashes = false)
|
||||
public IActionResult GetContents(string? path, bool includeFiles = false, bool allowFoldersWithoutTrailingSlashes = false)
|
||||
{
|
||||
return Ok(_fileSystemLookupService.LookupContents(path, includeFiles, allowFoldersWithoutTrailingSlashes));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue