mirror of
https://github.com/nasa/openmct.git
synced 2025-06-02 07:30:49 +00:00
conditionally enable notebook button in preview (#2373)
This commit is contained in:
parent
3219a64d09
commit
9c9006d415
@ -33,7 +33,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="l-browse-bar__end">
|
<div class="l-browse-bar__end">
|
||||||
<div class="l-browse-bar__actions">
|
<div class="l-browse-bar__actions">
|
||||||
<button class="l-browse-bar__actions__edit c-button icon-notebook"
|
<button v-if="notebookEnabled"
|
||||||
|
class="l-browse-bar__actions__edit c-button icon-notebook"
|
||||||
title="New Notebook entry"
|
title="New Notebook entry"
|
||||||
@click="snapshot">
|
@click="snapshot">
|
||||||
</button>
|
</button>
|
||||||
@ -101,14 +102,19 @@
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
domainObject: domainObject,
|
domainObject: domainObject,
|
||||||
type: type
|
type: type,
|
||||||
|
notebookEnabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let viewProvider = this.openmct.objectViews.get(this.domainObject)[0];
|
let viewProvider = this.openmct.objectViews.get(this.domainObject)[0];
|
||||||
this.view = viewProvider.view(this.domainObject);
|
this.view = viewProvider.view(this.domainObject);
|
||||||
this.view.show(this.$refs.objectView, false);
|
this.view.show(this.$refs.objectView, false);
|
||||||
this.notebookSnapshot = new NotebookSnapshot(this.openmct);
|
|
||||||
|
if (this.openmct.types.get('notebook')) {
|
||||||
|
this.notebookSnapshot = new NotebookSnapshot(this.openmct);
|
||||||
|
this.notebookEnabled = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
this.view.destroy();
|
this.view.destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user