-
+
@@ -76,14 +83,20 @@
:key="index"
class="flex ml-8 border-l border-brdColor"
>
-
@@ -121,13 +134,18 @@ export default {
collectionIndex: Number,
folderPath: String,
doc: Boolean,
+ saveRequest: Boolean,
isFiltered: Boolean,
+ collectionsType: Object,
+ picked: Object,
},
data() {
return {
showChildren: false,
dragging: false,
confirmRemove: false,
+ prevCursor: "",
+ cursor: "",
}
},
subscriptions() {
@@ -135,6 +153,15 @@ export default {
SYNC_COLLECTIONS: getSettingSubject("syncCollections"),
}
},
+ computed: {
+ isSelected() {
+ return (
+ this.picked &&
+ this.picked.pickedType === "my-folder" &&
+ this.picked.folderPath === this.folderPath
+ )
+ },
+ },
methods: {
syncCollections() {
if (fb.currentUser !== null && this.SYNC_COLLECTIONS) {
@@ -145,6 +172,16 @@ export default {
}
},
toggleShowChildren() {
+ if (this.$props.saveRequest)
+ this.$emit("select", {
+ picked: {
+ pickedType: "my-folder",
+
+ collectionIndex: this.collectionIndex,
+ folderName: this.folder.name,
+ folderPath: this.folderPath,
+ },
+ })
this.showChildren = !this.showChildren
},
removeFolder() {
@@ -179,6 +216,13 @@ export default {
})
this.syncCollections()
},
+ removeRequest({ collectionIndex, folderName, requestIndex }) {
+ this.$emit("remove-request", {
+ collectionIndex,
+ folderName,
+ requestIndex,
+ })
+ },
},
}
diff --git a/components/collections/Request.vue b/components/collections/my/Request.vue
similarity index 73%
rename from components/collections/Request.vue
rename to components/collections/my/Request.vue
index 5d5b96dd2..c29de89d0 100644
--- a/components/collections/Request.vue
+++ b/components/collections/my/Request.vue
@@ -14,11 +14,13 @@
@click="!doc ? selectRequest() : {}"
v-tooltip="!doc ? $t('use_request') : ''"
>
-
{{ request.method }}
+
check_circle
+
+
{{ request.method }}
{{ request.name }}
-