refactor: port collection tree rendered in the save request modal to the new implementation

This commit is contained in:
jamesgeorge007
2024-02-13 20:10:02 +05:30
parent b0c72fd295
commit 68795a5017
6 changed files with 413 additions and 268 deletions

View File

@@ -18,7 +18,10 @@
</div>
<NewCollectionsRest
v-if="platform === 'rest'"
:picked="picked"
:save-request="saveRequest"
:workspace-handle="activeWorkspaceHandle"
@select="(payload) => emit('select', payload)"
/>
</div>
</template>
@@ -27,10 +30,17 @@
import { useService } from "dioc/vue"
import { ref } from "vue"
import { useI18n } from "~/composables/i18n"
import { Picked } from "~/helpers/types/HoppPicked";
import { NewWorkspaceService } from "~/services/new-workspace"
defineProps<{
picked: Picked | null
platform: "rest" | "gql"
saveRequest: boolean
}>()
const emit = defineEmits<{
(event: "select", payload: Picked | null): void
}>()
const t = useI18n()
@@ -40,7 +50,4 @@ const searchText = ref("")
const workspaceService = useService(NewWorkspaceService)
const activeWorkspaceHandle = workspaceService.activeWorkspaceHandle
const showModalAdd = ref(false)
const showModalImportExport = ref(false)
</script>