diff --git a/app/imports/client/ui/components/TreeDetailLayout.vue b/app/imports/client/ui/components/TreeDetailLayout.vue index 2077e6a5..4537df4c 100644 --- a/app/imports/client/ui/components/TreeDetailLayout.vue +++ b/app/imports/client/ui/components/TreeDetailLayout.vue @@ -3,6 +3,19 @@ class="layout" style="height: 100%;" > +
+ +
+
mdi-content-duplicate + + + + Create Reference + + + + mdi-link-plus + + +
+ + + + + + + + + + + + + + + @@ -62,6 +73,7 @@ export default { }, props: { selection: Boolean, + singleSelect: Boolean, disabled: Boolean, librariesSelected: { type: Array, @@ -87,7 +99,7 @@ export default { libraryCollections(){ const userId = Meteor.userId(); if (!userId) return; - const subCollections = Meteor.user().subscribedLibraryCollections || []; + const subCollections = Meteor.user()?.subscribedLibraryCollections || []; return LibraryCollections.find({ $or: [ { owner: userId }, diff --git a/app/imports/client/ui/library/LibraryListTile.vue b/app/imports/client/ui/library/LibraryListTile.vue index 06ce9087..10216f0c 100644 --- a/app/imports/client/ui/library/LibraryListTile.vue +++ b/app/imports/client/ui/library/LibraryListTile.vue @@ -5,10 +5,11 @@ @@ -206,6 +207,26 @@ export default { } }); }, + makeReference() { + insertNode.call({ + libraryNode: { + type: 'reference', + ref: { + collection: 'libraryNodes', + id: this.model._id, + }, + order: (this.model.order || 0) + 0.5, + }, + parentRef: this.model.parent, + }, (error, docId) => { + if (error) console.error(error); + if (this.embedded){ + this.$emit('duplicated', docId); + } else { + this.$store.dispatch('popDialogStack'); + } + }); + }, selectSubProperty(_id) { if (this.embedded) { this.$emit('select-sub-property', _id); diff --git a/app/imports/client/ui/library/LibrarySecondTree.vue b/app/imports/client/ui/library/LibrarySecondTree.vue new file mode 100644 index 00000000..2233bc97 --- /dev/null +++ b/app/imports/client/ui/library/LibrarySecondTree.vue @@ -0,0 +1,125 @@ + + + + +