move models button to topbar with folders list
This commit is contained in:
+6
-7
@@ -46,9 +46,10 @@ import { indexdb } from "./db-tables/indexdb";
|
||||
import EnableTwowaySyncConfirm from "./settings/EnableTwowaySyncConfirm";
|
||||
import { deepJsonDiffCheck } from "./utils/deepJsonDiffCheck";
|
||||
const AppEventListener = React.lazy(() => import("./topbar/AppEventListener"));
|
||||
const ModelManagerTopbar = React.lazy(
|
||||
() => import("./model-manager/topbar/ModelManagerTopbar"),
|
||||
const ModelsListDrawer = React.lazy(
|
||||
() => import("./model-manager/models-list-drawer/ModelsListDrawer"),
|
||||
);
|
||||
|
||||
const usedWsEvents = [
|
||||
// InstallProgress.tsx
|
||||
"download_progress",
|
||||
@@ -544,11 +545,6 @@ export default function App() {
|
||||
draggable={false}
|
||||
>
|
||||
<Topbar curFlowName={curFlowName} setCurFlowName={setCurFlowName} />
|
||||
{loadChild && (
|
||||
<Suspense>
|
||||
<ModelManagerTopbar />
|
||||
</Suspense>
|
||||
)}
|
||||
{loadChild && route === "recentFlows" && (
|
||||
<Suspense>
|
||||
<RecentFilesDrawer
|
||||
@@ -565,6 +561,9 @@ export default function App() {
|
||||
<GalleryModal onclose={() => setRoute("root")} />
|
||||
</Suspense>
|
||||
)}
|
||||
{route === "modelList" && (
|
||||
<ModelsListDrawer onClose={() => setRoute("root")} />
|
||||
)}
|
||||
</Box>
|
||||
<ServerEventListener />
|
||||
<AppEventListener />
|
||||
|
||||
@@ -92,6 +92,15 @@ export function Topbar({ curFlowName, setCurFlowName }: Props) {
|
||||
<IconTriangleInvertedFilled size={8} />
|
||||
</HStack>
|
||||
</Button>
|
||||
<Button
|
||||
size={"sm"}
|
||||
colorScheme="blue"
|
||||
aria-label="My models"
|
||||
onClick={() => setRoute("modelList")}
|
||||
px={1}
|
||||
>
|
||||
Models
|
||||
</Button>
|
||||
<Tooltip label="New workflow">
|
||||
<Button
|
||||
size={"sm"}
|
||||
|
||||
@@ -4,4 +4,5 @@ export type WorkspaceRoute =
|
||||
| "recentFlows"
|
||||
| "gallery"
|
||||
| "versionHistory"
|
||||
| "saveAsModal";
|
||||
| "saveAsModal"
|
||||
| "modelList";
|
||||
|
||||
Reference in New Issue
Block a user