-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: renterd refine file explorer modes
- Loading branch information
1 parent
c9984e4
commit 8d0c5ea
Showing
21 changed files
with
312 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'renterd': patch | ||
--- | ||
|
||
The file breadcrumb nav now shows the root as "Buckets". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'renterd': patch | ||
--- | ||
|
||
The explorer mode switcher button is now disabled when viewing buckets. Closes https://github.com/SiaFoundation/renterd/issues/973 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'renterd': minor | ||
--- | ||
|
||
File explorer navigation actions now retain the active explorer mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'renterd': minor | ||
--- | ||
|
||
The selected file explorer mode is now persisted between sessions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Button, Tooltip } from '@siafoundation/design-system' | ||
import { BucketIcon, Earth16, Folder16 } from '@siafoundation/react-icons' | ||
import { useFilesManager } from '../../contexts/filesManager' | ||
|
||
export function FilesExplorerModeButton() { | ||
const { isViewingBuckets, toggleExplorerMode, activeExplorerMode } = | ||
useFilesManager() | ||
|
||
if (isViewingBuckets) { | ||
return ( | ||
<Tooltip content="Viewing all buckets"> | ||
<div> | ||
<Button state="waiting"> | ||
<BucketIcon size={16} /> | ||
</Button> | ||
</div> | ||
</Tooltip> | ||
) | ||
} | ||
|
||
return ( | ||
<Button | ||
onClick={toggleExplorerMode} | ||
tip={ | ||
activeExplorerMode === 'directory' | ||
? 'Viewing directory explorer' | ||
: 'Viewing all bucket files' | ||
} | ||
> | ||
{activeExplorerMode === 'directory' ? <Folder16 /> : <Earth16 />} | ||
</Button> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
import { FilesDirectory } from '../FilesDirectory' | ||
import { useSearchParams } from '@siafoundation/next' | ||
import { FilesFlat } from '../FilesFlat' | ||
import { useFilesManager } from '../../contexts/filesManager' | ||
|
||
export function Files() { | ||
const { isViewingBuckets } = useFilesManager() | ||
const params = useSearchParams() | ||
const { isViewingBuckets, activeExplorerMode } = useFilesManager() | ||
|
||
if (params.get('view') === 'flat' && !isViewingBuckets) { | ||
return <FilesFlat /> | ||
if (activeExplorerMode === 'directory' || isViewingBuckets) { | ||
return <FilesDirectory /> | ||
} | ||
|
||
return <FilesDirectory /> | ||
return <FilesFlat /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.