diff --git a/packages/core/src/renderer/components/cluster-settings/cluster-settings-component-injection-token.ts b/packages/core/src/renderer/components/cluster-settings/cluster-settings-component-injection-token.ts new file mode 100644 index 0000000000..91be769620 --- /dev/null +++ b/packages/core/src/renderer/components/cluster-settings/cluster-settings-component-injection-token.ts @@ -0,0 +1,15 @@ +import { getInjectionToken } from "@ogre-tools/injectable"; +import type { ClusterPreferences } from "../../../common/cluster-types"; + +export interface ClusterIconSettingComponentProps { + preferences: ClusterPreferences; +} + +export interface ClusterIconSettingsComponent { + id: string; + Component: React.ComponentType; +} + +export const clusterIconSettingsComponentInjectionToken = getInjectionToken({ + id: "cluster-icon-settings-component-injection-token", +}); \ No newline at end of file diff --git a/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx b/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx index 94706f17a5..cf69081b55 100644 --- a/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx +++ b/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx @@ -15,6 +15,7 @@ import { FilePicker, OverSizeLimitStyle } from "../file-picker"; import { MenuActions, MenuItem } from "../menu"; import type { ShowNotification } from "../notifications"; import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable"; +import { ClusterIconSettingsComponent, clusterIconSettingsComponentInjectionToken } from "./cluster-settings-component-injection-token"; import type { ClusterIconMenuItem } from "./cluster-settings-menu-injection-token"; import { clusterIconSettingsMenuInjectionToken } from "./cluster-settings-menu-injection-token"; @@ -25,6 +26,7 @@ export interface ClusterIconSettingProps { interface Dependencies { menuItems: IComputedValue; + settingComponents: IComputedValue; showErrorNotification: ShowNotification; } @@ -95,6 +97,14 @@ const NonInjectedClusterIconSetting = observer((props: ClusterIconSettingProps & )} + {props.settingComponents.get().map(item => { + return ( + + ); + })} ); }); @@ -106,6 +116,7 @@ export const ClusterIconSetting = withInjectables