diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json index 8017fdadfa..6ac98710a4 100644 --- a/packages/hoppscotch-common/locales/en.json +++ b/packages/hoppscotch-common/locales/en.json @@ -281,7 +281,7 @@ "updated": "Environment updated", "value": "Value", "variable": "Variable", - "variables":"Variables", + "variables": "Variables", "variable_list": "Variable List" }, "error": { @@ -961,7 +961,8 @@ "success_invites": "Success invites", "title": "Workspaces", "we_sent_invite_link": "We sent an invite link to all invitees!", - "we_sent_invite_link_description": "Ask all invitees to check their inbox. Click on the link to join the workspace." + "we_sent_invite_link_description": "Ask all invitees to check their inbox. Click on the link to join the workspace.", + "search_title": "Team Requests" }, "team_environment": { "deleted": "Environment Deleted", diff --git a/packages/hoppscotch-common/src/components/app/spotlight/entry/RESTTeamRequestEntry.vue b/packages/hoppscotch-common/src/components/app/spotlight/entry/RESTTeamRequestEntry.vue new file mode 100644 index 0000000000..109367c6df --- /dev/null +++ b/packages/hoppscotch-common/src/components/app/spotlight/entry/RESTTeamRequestEntry.vue @@ -0,0 +1,32 @@ + + + diff --git a/packages/hoppscotch-common/src/components/app/spotlight/index.vue b/packages/hoppscotch-common/src/components/app/spotlight/index.vue index 5081bfad13..7da96ea783 100644 --- a/packages/hoppscotch-common/src/components/app/spotlight/index.vue +++ b/packages/hoppscotch-common/src/components/app/spotlight/index.vue @@ -111,6 +111,7 @@ import { RequestSpotlightSearcherService } from "~/services/spotlight/searchers/ import { ResponseSpotlightSearcherService } from "~/services/spotlight/searchers/response.searcher" import { SettingsSpotlightSearcherService } from "~/services/spotlight/searchers/settings.searcher" import { TabSpotlightSearcherService } from "~/services/spotlight/searchers/tab.searcher" +import { TeamsSpotlightSearcherService } from "~/services/spotlight/searchers/teamRequest.searcher" import { UserSpotlightSearcherService } from "~/services/spotlight/searchers/user.searcher" import { SwitchWorkspaceSpotlightSearcherService, @@ -144,6 +145,7 @@ useService(SwitchEnvSpotlightSearcherService) useService(WorkspaceSpotlightSearcherService) useService(SwitchWorkspaceSpotlightSearcherService) useService(InterceptorSpotlightSearcherService) +useService(TeamsSpotlightSearcherService) platform.spotlight?.additionalSearchers?.forEach((searcher) => useService(searcher) diff --git a/packages/hoppscotch-common/src/components/collections/TeamCollections.vue b/packages/hoppscotch-common/src/components/collections/TeamCollections.vue index fa8f71cb4e..d07fbd9234 100644 --- a/packages/hoppscotch-common/src/components/collections/TeamCollections.vue +++ b/packages/hoppscotch-common/src/components/collections/TeamCollections.vue @@ -9,7 +9,7 @@ " > + + + ({ type: "my-collections", selectedTeam: undefined }), required: true, }, + filterText: { + type: String as PropType, + default: "", + required: true, + }, teamCollectionList: { type: Array as PropType, default: () => [], @@ -436,6 +467,8 @@ const props = defineProps({ }, }) +const isShowingSearchResults = computed(() => props.filterText.length > 0) + const emit = defineEmits<{ ( event: "add-request", @@ -543,6 +576,14 @@ const emit = defineEmits<{ } } ): void + ( + event: "collection-click", + payload: { + // if the collection is open or not in the tree + isOpen: boolean + collectionID: string + } + ): void (event: "select", payload: Picked | null): void (event: "expand-team-collection", payload: string): void (event: "display-modal-add"): void @@ -555,6 +596,18 @@ const getPath = (path: string) => { return pathArray.join("/") } +const handleCollectionClick = (payload: { + collectionID: string + isOpen: boolean +}) => { + const { collectionID, isOpen } = payload + + emit("collection-click", { + collectionID, + isOpen, + }) +} + const teamCollectionsList = toRef(props, "teamCollectionList") const hasNoTeamAccess = computed( diff --git a/packages/hoppscotch-common/src/components/collections/index.vue b/packages/hoppscotch-common/src/components/collections/index.vue index a22f99895b..9a53a69542 100644 --- a/packages/hoppscotch-common/src/components/collections/index.vue +++ b/packages/hoppscotch-common/src/components/collections/index.vue @@ -24,7 +24,6 @@ autocomplete="off" class="flex w-full bg-transparent px-4 py-2 h-8" :placeholder="t('action.search')" - :disabled="collectionsType.type === 'team-collections'" />