@@ -5,19 +5,7 @@ import {useParams, useRouter} from "next/navigation";
55import {
66 AuroraBackground ,
77 ContextStoreProvider ,
8- DataTypeView ,
9- DLayout ,
10- DNamespaceMemberView ,
11- DNamespaceProjectView ,
12- DNamespaceRoleView ,
13- DNamespaceView ,
14- DOrganizationView ,
15- DRuntimeView ,
16- DUserView ,
178 Flex ,
18- FlowTypeView ,
19- FunctionDefinitionView ,
20- useUserSession
219} from "@code0-tech/pictor" ;
2210import React from "react" ;
2311import { GraphqlClient } from "@core/util/graphql-client" ;
@@ -33,12 +21,24 @@ import {RoleService} from "@edition/role/services/Role.service";
3321import { FlowService } from "@edition/flow/services/Flow.service" ;
3422import { FunctionService } from "@edition/function/services/Function.service" ;
3523import { DatatypeService } from "@edition/datatype/services/Datatype.service" ;
36- import { FlowTypeService } from "@edition/flowtype/services/FlowTypeService " ;
24+ import { FlowTypeService } from "@edition/flowtype/services/FlowType.service " ;
3725import { FileTabsView } from "@code0-tech/pictor/dist/components/file-tabs/FileTabs.view" ;
3826import { FileTabsService } from "@code0-tech/pictor/dist/components/file-tabs/FileTabs.service" ;
3927import Image from "next/image" ;
28+ import { UserView } from "@edition/user/services/User.view" ;
29+ import { OrganizationView } from "@edition/organization/services/Organization.view" ;
30+ import { MemberView } from "@edition/member/services/Member.view" ;
31+ import { NamespaceView } from "@edition/namespace/services/Namespace.view" ;
32+ import { RuntimeView } from "@edition/runtime/services/Runtime.view" ;
33+ import { ProjectView } from "@edition/project/services/Project.view" ;
34+ import { RoleView } from "@edition/role/services/Role.view" ;
35+ import { FunctionView } from "@edition/function/services/Function.view" ;
36+ import { DataTypeView } from "@edition/datatype/services/DataType.view" ;
37+ import { FlowTypeView } from "@edition/flowtype/services/FlowType.view" ;
38+ import { useUserSession } from "@edition/user/hooks/User.session.hook" ;
39+ import { Layout } from "@code0-tech/pictor/dist/components/layout/Layout" ;
4040
41- export default function Layout ( { bar, tab, children} : {
41+ export default function FlowLayout ( { bar, tab, children} : {
4242 bar : React . ReactNode ,
4343 tab : React . ReactNode ,
4444 children : React . ReactNode
@@ -59,15 +59,15 @@ export default function Layout({bar, tab, children}: {
5959
6060 if ( currentSession === null ) router . push ( "/login" )
6161
62- const user = usePersistentReactiveArrayService < DUserView , UserService > ( `dashboard::users::${ currentSession ?. id } ` , ( store ) => new UserService ( graphqlClient , store ) )
63- const organization = usePersistentReactiveArrayService < DOrganizationView , OrganizationService > ( `dashboard::organizations::${ currentSession ?. id } ` , ( store ) => new OrganizationService ( graphqlClient , store ) )
64- const member = usePersistentReactiveArrayService < DNamespaceMemberView , MemberService > ( `dashboard::members::${ currentSession ?. id } ` , ( store ) => new MemberService ( graphqlClient , store ) )
65- const namespace = usePersistentReactiveArrayService < DNamespaceView , NamespaceService > ( `dashboard::namespaces::${ currentSession ?. id } ` , ( store ) => new NamespaceService ( graphqlClient , store ) )
66- const runtime = usePersistentReactiveArrayService < DRuntimeView , RuntimeService > ( `dashboard::global_runtimes::${ currentSession ?. id } ` , ( store ) => new RuntimeService ( graphqlClient , store ) )
67- const project = usePersistentReactiveArrayService < DNamespaceProjectView , ProjectService > ( `dashboard::projects::${ currentSession ?. id } ` , ( store ) => new ProjectService ( graphqlClient , store ) )
68- const role = usePersistentReactiveArrayService < DNamespaceRoleView , RoleService > ( `dashboard::roles::${ currentSession ?. id } ` , ( store ) => new RoleService ( graphqlClient , store ) )
62+ const user = usePersistentReactiveArrayService < UserView , UserService > ( `dashboard::users::${ currentSession ?. id } ` , ( store ) => new UserService ( graphqlClient , store ) )
63+ const organization = usePersistentReactiveArrayService < OrganizationView , OrganizationService > ( `dashboard::organizations::${ currentSession ?. id } ` , ( store ) => new OrganizationService ( graphqlClient , store ) )
64+ const member = usePersistentReactiveArrayService < MemberView , MemberService > ( `dashboard::members::${ currentSession ?. id } ` , ( store ) => new MemberService ( graphqlClient , store ) )
65+ const namespace = usePersistentReactiveArrayService < NamespaceView , NamespaceService > ( `dashboard::namespaces::${ currentSession ?. id } ` , ( store ) => new NamespaceService ( graphqlClient , store ) )
66+ const runtime = usePersistentReactiveArrayService < RuntimeView , RuntimeService > ( `dashboard::global_runtimes::${ currentSession ?. id } ` , ( store ) => new RuntimeService ( graphqlClient , store ) )
67+ const project = usePersistentReactiveArrayService < ProjectView , ProjectService > ( `dashboard::projects::${ currentSession ?. id } ` , ( store ) => new ProjectService ( graphqlClient , store ) )
68+ const role = usePersistentReactiveArrayService < RoleView , RoleService > ( `dashboard::roles::${ currentSession ?. id } ` , ( store ) => new RoleService ( graphqlClient , store ) )
6969 const flow = usePersistentReactiveArrayService < Flow , FlowService > ( `dashboard::flows::${ currentSession ?. id } ` , ( store ) => new FlowService ( graphqlClient , store ) )
70- const functions = usePersistentReactiveArrayService < FunctionDefinitionView , FunctionService > ( `dashboard::functions::${ currentSession ?. id } ` , ( store ) => new FunctionService ( graphqlClient , store ) )
70+ const functions = usePersistentReactiveArrayService < FunctionView , FunctionService > ( `dashboard::functions::${ currentSession ?. id } ` , ( store ) => new FunctionService ( graphqlClient , store ) )
7171 const datatype = usePersistentReactiveArrayService < DataTypeView , DatatypeService > ( `dashboard::datatypes::${ currentSession ?. id } ` , ( store ) => new DatatypeService ( graphqlClient , store ) )
7272 const flowtype = usePersistentReactiveArrayService < FlowTypeView , FlowTypeService > ( `dashboard::flowtypes::${ currentSession ?. id } ` , ( store ) => new FlowTypeService ( graphqlClient , store ) )
7373 const file = usePersistentReactiveArrayService < FileTabsView , FileTabsService > ( `dashboard::files::${ flowId } ` , FileTabsService , [ ] )
@@ -86,7 +86,7 @@ export default function Layout({bar, tab, children}: {
8686
8787 return < ContextStoreProvider
8888 services = { [ user , organization , member , namespace , runtime , project , role , flow , functions , datatype , flowtype , file ] } >
89- < DLayout layoutGap = { 0 } style = { { zIndex : 0 } } showLayoutSplitter = { false } leftContent = {
89+ < Layout layoutGap = { 0 } style = { { zIndex : 0 } } showLayoutSplitter = { false } leftContent = {
9090 < Flex p = { 0.7 } pt = { 1 } align = { "center" } style = { { flexDirection : "column" , gap : "0.7rem" } } >
9191 < div style = { {
9292 position : "absolute" ,
@@ -114,13 +114,13 @@ export default function Layout({bar, tab, children}: {
114114 { tab }
115115 </ Flex >
116116 } >
117- < DLayout px = { 0.7 } layoutGap = { "0" } topContent = { < > { bar } </ > } >
118- < DLayout >
117+ < Layout px = { 0.7 } layoutGap = { "0" } topContent = { < > { bar } </ > } >
118+ < Layout >
119119 < >
120120 { children }
121121 </ >
122- </ DLayout >
123- </ DLayout >
124- </ DLayout >
122+ </ Layout >
123+ </ Layout >
124+ </ Layout >
125125 </ ContextStoreProvider >
126126}
0 commit comments