diff --git a/packages/hoppscotch-app/components/collections/Edit.vue b/packages/hoppscotch-app/components/collections/Edit.vue index 4fb5c292f..c8632876d 100644 --- a/packages/hoppscotch-app/components/collections/Edit.vue +++ b/packages/hoppscotch-app/components/collections/Edit.vue @@ -38,13 +38,18 @@ import { defineComponent } from "@nuxtjs/composition-api" export default defineComponent({ props: { show: Boolean, - placeholderCollName: { type: String, default: null }, + editingCollectionName: { type: String, default: null }, }, data() { return { name: null, } }, + watch: { + editingCollectionName(val) { + this.name = val + }, + }, methods: { saveCollection() { if (!this.name) { diff --git a/packages/hoppscotch-app/components/collections/EditFolder.vue b/packages/hoppscotch-app/components/collections/EditFolder.vue index 8fdde392d..3da88c0f7 100644 --- a/packages/hoppscotch-app/components/collections/EditFolder.vue +++ b/packages/hoppscotch-app/components/collections/EditFolder.vue @@ -39,12 +39,18 @@ import { defineComponent } from "@nuxtjs/composition-api" export default defineComponent({ props: { show: Boolean, + editingFolderName: { type: String, default: null }, }, data() { return { name: null, } }, + watch: { + editingFolderName(val) { + this.name = val + }, + }, methods: { editFolder() { if (!this.name) { diff --git a/packages/hoppscotch-app/components/collections/EditRequest.vue b/packages/hoppscotch-app/components/collections/EditRequest.vue index 3b0337e18..24785dfd9 100644 --- a/packages/hoppscotch-app/components/collections/EditRequest.vue +++ b/packages/hoppscotch-app/components/collections/EditRequest.vue @@ -35,7 +35,7 @@ import { defineComponent } from "@nuxtjs/composition-api" export default defineComponent({ props: { show: Boolean, - placeholderReqName: { type: String, default: null }, + editingRequestName: { type: String, default: null }, }, data() { return { @@ -44,6 +44,11 @@ export default defineComponent({ }, } }, + watch: { + editingRequestName(val) { + this.requestUpdateData.name = val + }, + }, methods: { saveRequest() { if (!this.requestUpdateData.name) { diff --git a/packages/hoppscotch-app/components/collections/graphql/Edit.vue b/packages/hoppscotch-app/components/collections/graphql/Edit.vue index 62c919b64..4ff9b616b 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Edit.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Edit.vue @@ -45,12 +45,18 @@ export default defineComponent({ show: Boolean, editingCollection: { type: Object, default: () => {} }, editingCollectionIndex: { type: Number, default: null }, + editingCollectionName: { type: String, default: null }, }, data() { return { name: null as string | null, } }, + watch: { + editingCollectionName(val) { + this.name = val + }, + }, methods: { saveCollection() { if (!this.name) { diff --git a/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue b/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue index 68c514074..9ef633f1a 100644 --- a/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue +++ b/packages/hoppscotch-app/components/collections/graphql/EditFolder.vue @@ -45,12 +45,18 @@ export default defineComponent({ show: Boolean, folder: { type: Object, default: () => {} }, folderPath: { type: String, default: null }, + editingFolderName: { type: String, default: null }, }, data() { return { name: "", } }, + watch: { + editingFolderName(val) { + this.name = val + }, + }, methods: { editFolder() { if (!this.name) { diff --git a/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue b/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue index 18eea553f..31d435cda 100644 --- a/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue +++ b/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue @@ -47,6 +47,7 @@ export default defineComponent({ folderPath: { type: String, default: null }, request: { type: Object as PropType, default: () => {} }, requestIndex: { type: Number, default: null }, + editingRequestName: { type: String, default: null }, }, data() { return { @@ -55,6 +56,11 @@ export default defineComponent({ }, } }, + watch: { + editingRequestName(val) { + this.requestUpdateData.name = val + }, + }, methods: { saveRequest() { if (!this.requestUpdateData.name) { diff --git a/packages/hoppscotch-app/components/collections/graphql/index.vue b/packages/hoppscotch-app/components/collections/graphql/index.vue index ad8ecb6d6..97521e74a 100644 --- a/packages/hoppscotch-app/components/collections/graphql/index.vue +++ b/packages/hoppscotch-app/components/collections/graphql/index.vue @@ -96,6 +96,7 @@ :show="showModalEdit" :editing-collection="editingCollection" :editing-collection-index="editingCollectionIndex" + :editing-collection-name="editingCollection ? editingCollection.name : ''" @hide-modal="displayModalEdit(false)" /> @@ -160,12 +163,15 @@ /> diff --git a/packages/hoppscotch-app/pages/profile.vue b/packages/hoppscotch-app/pages/profile.vue index 5e1d873ea..25bc4bbb4 100644 --- a/packages/hoppscotch-app/pages/profile.vue +++ b/packages/hoppscotch-app/pages/profile.vue @@ -186,7 +186,12 @@