Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
wejendorp committed Sep 14, 2023
1 parent e679b74 commit cca2fd5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
23 changes: 19 additions & 4 deletions src/renderer/components/creators/AssetCreator.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Path from 'path';
import React, { useEffect, useState } from 'react';
import { SchemaKind } from '@kapeta/ui-web-types';
import { FileInfo, SchemaKind } from '@kapeta/ui-web-types';
import { AssetStore } from '@kapeta/ui-web-context';
import { FormButtons, FormContainer, showToasty, ToastType } from '@kapeta/ui-web-components';
import { AssetInfo, fromAsset, PlannerSidebar } from '@kapeta/ui-web-plan-editor';
Expand All @@ -25,12 +25,27 @@ interface Props {
onAssetCreateStart?: (data: SchemaKind) => void;
onAssetCreateEnd?: (errorMessage?: string) => void;
onDone?: (asset?: AssetInfo<SchemaKind>) => void;
// skipFiles: string[]; // A collection of files to prevent importing as they are already loaded
/**
* Unused
* @deprecated
*/
// eslint-disable-next-line react/no-unused-prop-types
skipFiles: string[]; // A collection of files to prevent importing as they are already loaded
title: string;
// fileName: string;
/**
* Unused
* @deprecated
*/
// eslint-disable-next-line react/no-unused-prop-types
fileName: string;
createNewKind: () => SchemaKind;
formRenderer: React.ComponentType<CreatingFormProps>;
// fileSelectableHandler: (file: FileInfo) => boolean;
/**
* Unused
* @deprecated
*/
// eslint-disable-next-line react/no-unused-prop-types
fileSelectableHandler: (file: FileInfo) => boolean;
onAssetAdded?: (asset: AssetInfo<SchemaKind>) => void;
state: AssetCreatorState;
onCancel?: () => void;
Expand Down
3 changes: 0 additions & 3 deletions src/renderer/modals/processing/processing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ function render(state: State) {
<CssBaseline />
<ThemeProvider theme={kapetaLight}>
<ProcessingContent
onLinkOpen={async (url) => {
window.open(url);
}}
title={state.title ?? null}
text={state.text ?? null}
linkText={state.linkText ?? null}
Expand Down
5 changes: 2 additions & 3 deletions src/renderer/views/PlanView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const PlanView = (props: PlanViewProps) => {
);
}, [instanceInfos, props.systemId]);

const { resourceAssets, blocks, loading, currentlyLoading } = useLoadedPlanContext(planData.data?.content);
const { blocks, loading, currentlyLoading } = useLoadedPlanContext(planData.data?.content);

let loadingText = 'Loading plan...';

Expand All @@ -65,11 +65,10 @@ export const PlanView = (props: PlanViewProps) => {

return (
<SimpleLoader loading={planData.loading || loading} text={loadingText}>
{!planData.loading && !loading && planData.data && resourceAssets && blocks && (
{!planData.loading && !loading && planData.data && blocks && (
<PlanEditor
plan={planData.data.content}
asset={planData.data}
resourceAssets={resourceAssets}
instanceInfos={instanceInfos.value}
instanceStates={instanceStatusMap}
mode={plannerMode}
Expand Down

0 comments on commit cca2fd5

Please sign in to comment.