-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
113 additions
and
12 deletions.
There are no files selected for viewing
Empty file.
10 changes: 10 additions & 0 deletions
10
ui2/src/features/nodes/components/Commander/DocumentsByTypeCommander/ActionButtons.tsx
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,10 @@ | ||
import {Group} from "@mantine/core" | ||
import ViewOptionsMenu from "../ViewOptionsMenu" | ||
|
||
export default function ActionButtons() { | ||
return ( | ||
<Group> | ||
<ViewOptionsMenu /> | ||
</Group> | ||
) | ||
} |
11 changes: 11 additions & 0 deletions
11
ui2/src/features/nodes/components/Commander/DocumentsByTypeCommander/DocumentTypeFilter.tsx
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,11 @@ | ||
import {Select} from "@mantine/core" | ||
|
||
export default function DocumentTypeFilter() { | ||
return ( | ||
<Select | ||
searchable | ||
placeholder="Pick Document Type" | ||
data={["React", "Angular", "Vue", "Svelte"]} | ||
/> | ||
) | ||
} |
19 changes: 19 additions & 0 deletions
19
...features/nodes/components/Commander/DocumentsByTypeCommander/DocumentsByTypeCommander.tsx
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,19 @@ | ||
import ToggleSecondaryPanel from "@/components/DualPanel/ToggleSecondaryPanel" | ||
import {Box, Group, Stack} from "@mantine/core" | ||
import ActionButtons from "./ActionButtons" | ||
import DocumentTypeFilter from "./DocumentTypeFilter" | ||
|
||
export default function DocumentsByCategoryCommander() { | ||
return ( | ||
<Box> | ||
<Group justify="space-between"> | ||
<DocumentTypeFilter /> | ||
<Group> | ||
<ActionButtons /> | ||
<ToggleSecondaryPanel /> | ||
</Group> | ||
</Group> | ||
<Stack>Empty</Stack> | ||
</Box> | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
ui2/src/features/nodes/components/Commander/DocumentsByTypeCommander/index.tsx
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,3 @@ | ||
import DocumentsByCategoryCommander from "./DocumentsByTypeCommander" | ||
|
||
export default DocumentsByCategoryCommander |
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,5 +1,18 @@ | ||
import {useAppSelector} from "@/app/hooks" | ||
import PanelContext from "@/contexts/PanelContext" | ||
import {selectCommanderViewOption} from "@/features/ui/uiSlice" | ||
import {useContext} from "react" | ||
|
||
import DocumentsByTypeCommander from "./DocumentsByTypeCommander" | ||
import NodesCommander from "./NodesCommander" | ||
|
||
export default function Commander() { | ||
return <NodesCommander /> | ||
const mode = useContext(PanelContext) | ||
const viewOption = useAppSelector(s => selectCommanderViewOption(s, mode)) | ||
|
||
if (viewOption == "list" || viewOption == "tile") { | ||
return <NodesCommander /> | ||
} | ||
|
||
return <DocumentsByTypeCommander /> | ||
} |
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