Skip to content

Commit 0acb1bf

Browse files
committed
storing example flows in indexeddb and making them accessible via url
1 parent 38b6423 commit 0acb1bf

File tree

9 files changed

+3655
-105
lines changed

9 files changed

+3655
-105
lines changed

apps/vps-web/src/app/pages/example.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export function examplePage() {
2222
getCurrentFlow: () => {
2323
return flowData as Flow<NodeInfo>;
2424
},
25+
doesFlowExist: async (_flowId: string) => {
26+
return Promise.resolve(true);
27+
},
2528
};
2629
appElement.classList.add('hidden');
2730
pageElement.classList.remove('hidden');

libs/app-canvas/src/app/component-interface/app-nav-component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export interface AppNavComponentsProps<
3636
nestedLevel?: number,
3737
getNodeTaskFactory?: (name: string) => any,
3838
compositions?: Record<string, Composition<T>>,
39-
flowEngine?: TFlowEngine
39+
flowEngine?: TFlowEngine,
40+
flowId?: string
4041
) => void;
4142
showPopup: (node: IRectNodeComponent<NodeInfo>) => void;
4243
executeCommand: (
@@ -72,7 +73,8 @@ export interface GenericAppNavComponentsProps<
7273
nestedLevel?: number,
7374
getNodeTaskFactory?: (name: string) => any,
7475
compositions?: Record<string, Composition<T>>,
75-
flowEngine?: TFlowEngine
76+
flowEngine?: TFlowEngine,
77+
flowId?: string
7678
) => void;
7779
executeCommand: (
7880
commandName: string,

libs/app-canvas/src/app/components/gl-navbar-components.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ export class GLNavbarComponent extends Component<
446446
undefined,
447447
0,
448448
getGLNodeTaskFactory,
449-
data.compositions
449+
data.compositions,
450+
undefined,
451+
example.replace('.json', '')
450452
);
451453
canvasApp.centerCamera();
452454
this.props.initializeNodes();

libs/app-canvas/src/app/components/navbar-components.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,9 @@ export class NavbarComponent extends Component<
777777
undefined,
778778
0,
779779
getNodeTaskFactory,
780-
data.compositions
780+
data.compositions,
781+
undefined,
782+
example.replace('.json', '')
781783
);
782784
canvasApp.centerCamera();
783785
this.props.initializeNodes();

0 commit comments

Comments
 (0)