From 8185d225ba62f4ae2e42507f2f6e6c4820068c77 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 19 Sep 2023 19:20:43 +0800 Subject: [PATCH 01/29] get file extension and realm info --- .../operator-mode/card-inheritance-panel.gts | 35 ++++++------ .../definition-container/base.gts | 57 +++++++++++-------- packages/host/app/resources/adoption-chain.ts | 18 +++++- packages/host/app/resources/card-type.ts | 47 ++++++++++++++- 4 files changed, 107 insertions(+), 50 deletions(-) diff --git a/packages/host/app/components/operator-mode/card-inheritance-panel.gts b/packages/host/app/components/operator-mode/card-inheritance-panel.gts index ecf5bb416a6..c119ae5e8d0 100644 --- a/packages/host/app/components/operator-mode/card-inheritance-panel.gts +++ b/packages/host/app/components/operator-mode/card-inheritance-panel.gts @@ -11,15 +11,14 @@ import { Ready } from '@cardstack/host/resources/file'; import { tracked } from '@glimmer/tracking'; import moment from 'moment'; import { type AdoptionChainResource } from '@cardstack/host/resources/adoption-chain'; +import type OperatorModeStateService from '@cardstack/host/services/operator-mode-state-service'; import { hash, array } from '@ember/helper'; -import type OperatorModeStateService from '../../services/operator-mode-state-service'; import { action } from '@ember/object'; -interface Args { +interface Signature { Element: HTMLElement; Args: { realmInfo: RealmInfo | null; - realmIconURL: string | null | undefined; readyFile: Ready; cardInstance: CardDef | null; adoptionChain?: AdoptionChainResource; @@ -27,10 +26,14 @@ interface Args { }; } -export default class CardInheritancePanel extends Component { +export default class CardInheritancePanel extends Component { @tracked cardInstance: CardDef | undefined; @service declare operatorModeStateService: OperatorModeStateService; + get adoptionChainTypes() { + return this.args.adoptionChain?.types; + } + @action updateCodePath(url: URL | undefined) { if (url) { @@ -38,10 +41,6 @@ export default class CardInheritancePanel extends Component { } } - get adoptionChainTypes() { - return this.args.adoptionChain?.types; - } -