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
+
+
+
extraFields = val"
/>
+
+
+
+
+ mdi-dots-vertical
+
+
+
+
+
+
+
+
+
$emit('select-library-collection', libraryCollection._id, val)"
@@ -37,6 +39,7 @@
:model="library"
:to="{ name: 'singleLibrary', params: { id: library._id }}"
:selection="selection"
+ :single-select="singleSelect"
:is-selected="librariesSelected && librariesSelected.includes(library._id)"
:selected-by-collection="librariesSelectedByCollections && librariesSelectedByCollections.includes(library._id)"
:disabled="disabled"
@@ -44,6 +47,14 @@
@select="val => $emit('select-library', library._id, val)"
/>
+
+
+
+
+
@@ -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 @@
change({path: ['color'], value})"
/>
@@ -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 @@
+
+
+
+
+
+ mdi-close
+
+
+
+ {{ library && library.name }}
+
+
+
+
+ mdi-arrow-right-bold
+
+
+
+
+
+ mdi-close
+
+ Select Library
+
+
+
+
+
+ libraryId = id"
+ />
+ $emit('selected', e)"
+ />
+
+
+
+
+
+
+
+