mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 00:23:54 +00:00
conditionally enable notebook button in preview (#2373)
This commit is contained in:
parent
3219a64d09
commit
9c9006d415
@ -33,7 +33,8 @@
|
||||
</div>
|
||||
<div class="l-browse-bar__end">
|
||||
<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"
|
||||
@click="snapshot">
|
||||
</button>
|
||||
@ -101,14 +102,19 @@
|
||||
|
||||
return {
|
||||
domainObject: domainObject,
|
||||
type: type
|
||||
type: type,
|
||||
notebookEnabled: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let viewProvider = this.openmct.objectViews.get(this.domainObject)[0];
|
||||
this.view = viewProvider.view(this.domainObject);
|
||||
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() {
|
||||
this.view.destroy();
|
||||
|
Loading…
x
Reference in New Issue
Block a user