diff --git a/packages/host/app/components/operator-mode/code-submode.gts b/packages/host/app/components/operator-mode/code-submode.gts index 9fab1ba144..67769c20e9 100644 --- a/packages/host/app/components/operator-mode/code-submode.gts +++ b/packages/host/app/components/operator-mode/code-submode.gts @@ -951,6 +951,7 @@ export default class CodeSubmode extends Component { Promise; + isCreateModalShown: boolean; }; Blocks: { default: [ @@ -55,6 +57,7 @@ interface Signature { | 'selectedInstance' | 'createBoxelSpec' | 'selectBoxelSpec' + | 'isCreateModalShown' >, ]; }; @@ -94,6 +97,7 @@ interface ContentSignature { Element: HTMLDivElement; Args: { showCreateBoxelSpecIntent: boolean; + isCreateModalShown: boolean; boxelSpecInstances: CatalogEntry[]; selectedInstance: CatalogEntry | null; createBoxelSpec: () => void; @@ -108,7 +112,11 @@ const BoxelSpecPreviewContent: TemplateOnlyComponent =
Create a Boxel Specification to be able to create new instances
- + Create Boxel Spec {{else}} @@ -157,17 +165,11 @@ const BoxelSpecPreviewContent: TemplateOnlyComponent = export default class BoxelSpecPreview extends GlimmerComponent { @service private declare operatorModeStateService: OperatorModeStateService; @service private declare realm: RealmService; + @service private declare realmServer: RealmServerService; @tracked selectedInstance: CatalogEntry | null = this.boxelSpecInstances[0]; - get realmURL() { - return this.realm.realmOfURL(this.operatorModeStateService.state.codePath!); - } - get realms() { - if (!this.realmURL) { - return []; - } - return [this.realmURL.href]; + return this.realmServer.availableRealmURLs; } private get getSelectedDeclarationAsCodeRef(): ResolvedCodeRef { @@ -256,6 +258,7 @@ export default class BoxelSpecPreview extends GlimmerComponent { selectedInstance=this.selectedInstance createBoxelSpec=this.createBoxelSpec selectBoxelSpec=this.selectBoxelSpec + isCreateModalShown=@isCreateModalShown ) }} {{/if}}