Skip to content

Commit

Permalink
Use inlined bblock.annotatedSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jan 2, 2024
1 parent f968ad2 commit 00cce8f
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions src/components/BuildingBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,20 @@
<div class="d-flex flex-column align-stretch pa-5">
<div class="code-viewer-wrapper">
<code-viewer
v-if="jsonSchema.contents"
:language="jsonSchema.lang"
:code="jsonSchema.contents"
v-if="bblock.annotatedSchema"
language="yaml"
:code="bblock.annotatedSchema"
></code-viewer>
</div>
<div v-if="jsonSchema.contents" class="json-schema-actions text-right mt-1">
<div v-if="bblock.annotatedSchema" class="json-schema-actions text-right mt-1">
<v-btn
prepend-icon="mdi-clipboard"
@click="copyToClipboard(jsonSchema.contents)"
@click="copyToClipboard(bblock.annotatedSchema)"
color="primary"
>
Copy to clipboard
</v-btn>
</div>
<v-progress-circular v-if="jsonSchema.loading" size="64"></v-progress-circular>
</div>

</v-window-item>
Expand Down Expand Up @@ -320,11 +319,6 @@ export default {
tab: 'about',
languageTab: null,
languageTabs: [],
jsonSchema: {
loading: true,
contents: null,
lang: 'yaml',
},
ldContext: {
loading: true,
contents: null,
Expand Down Expand Up @@ -465,13 +459,6 @@ export default {
}
}
this.jsonSchema.loading = true;
bblockService.fetchSchema(data)
.then(({lang, contents}) => {
this.jsonSchema.lang = lang;
this.jsonSchema.contents = contents;
})
.finally(() => this.jsonSchema.loading = false);
this.ldContext.loading = true;
bblockService.fetchLdContext(data)
.then(ldContext => this.ldContext.contents = ldContext)
Expand Down

0 comments on commit 00cce8f

Please sign in to comment.