Skip to content

Commit

Permalink
chore: rename MyWorkspace to TeamWorkspace
Browse files Browse the repository at this point in the history
  • Loading branch information
amk-dev authored and AndrewBastin committed May 9, 2024
1 parent 42417b0 commit 7f64a74
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ import { teamCollectionsExporter } from "~/helpers/import-export/export/teamColl
import { GistSource } from "~/helpers/import-export/import/import-sources/GistSource"
import { ImporterOrExporter } from "~/components/importExport/types"
import { MyWorkspace } from "~/services/workspace.service"
import { TeamWorkspace } from "~/services/workspace.service"
const t = useI18n()
const toast = useToast()
type CollectionType =
| {
type: "team-collections"
selectedTeam: MyWorkspace
selectedTeam: TeamWorkspace
}
| { type: "my-collections" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import {
import { platform } from "~/platform"
import { GQLTabService } from "~/services/tab/graphql"
import { RESTTabService } from "~/services/tab/rest"
import { MyWorkspace } from "~/services/workspace.service"
import { TeamWorkspace } from "~/services/workspace.service"
const t = useI18n()
const toast = useToast()
Expand All @@ -96,7 +96,7 @@ const GQLTabs = useService(GQLTabService)
type CollectionType =
| {
type: "team-collections"
selectedTeam: MyWorkspace
selectedTeam: TeamWorkspace
}
| { type: "my-collections"; selectedTeam: undefined }
Expand Down Expand Up @@ -190,7 +190,7 @@ watch(
}
)
const updateTeam = (newTeam: MyWorkspace) => {
const updateTeam = (newTeam: TeamWorkspace) => {
collectionsType.value.selectedTeam = newTeam
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ import * as O from "fp-ts/Option"
import { Picked } from "~/helpers/types/HoppPicked.js"
import { RESTTabService } from "~/services/tab/rest"
import { useService } from "dioc/vue"
import { MyWorkspace } from "~/services/workspace.service"
import { TeamWorkspace } from "~/services/workspace.service"
const t = useI18n()
const colorMode = useColorMode()
Expand All @@ -408,7 +408,7 @@ const tabs = useService(RESTTabService)
type CollectionType =
| {
type: "team-collections"
selectedTeam: MyWorkspace
selectedTeam: TeamWorkspace
}
| { type: "my-collections"; selectedTeam: undefined }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ import {
} from "~/helpers/collection/collection"
import { currentReorderingStatus$ } from "~/newstore/reordering"
import { defineActionHandler, invokeAction } from "~/helpers/actions"
import { MyWorkspace, WorkspaceService } from "~/services/workspace.service"
import { TeamWorkspace, WorkspaceService } from "~/services/workspace.service"
import { useService } from "dioc/vue"
import { RESTTabService } from "~/services/tab/rest"
import { HoppInheritedProperty } from "~/helpers/types/HoppInheritedProperties"
Expand Down Expand Up @@ -273,14 +273,14 @@ const props = defineProps({
const emit = defineEmits<{
(event: "select", payload: Picked | null): void
(event: "update-team", team: MyWorkspace): void
(event: "update-team", team: TeamWorkspace): void
(event: "update-collection-type", type: CollectionType["type"]): void
}>()
type CollectionType =
| {
type: "team-collections"
selectedTeam: MyWorkspace
selectedTeam: TeamWorkspace
}
| { type: "my-collections"; selectedTeam: undefined }
Expand Down Expand Up @@ -461,7 +461,7 @@ const expandTeamCollection = (collectionID: string) => {
teamCollectionAdapter.expandCollection(collectionID)
}
const updateSelectedTeam = (team: MyWorkspace) => {
const updateSelectedTeam = (team: TeamWorkspace) => {
if (team) {
collectionsType.value.type = "team-collections"
teamCollectionAdapter.changeTeamID(team.teamID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import {
} from "~/newstore/environments"
import { useLocalState } from "~/newstore/localstate"
import { platform } from "~/platform"
import { MyWorkspace, WorkspaceService } from "~/services/workspace.service"
import { TeamWorkspace, WorkspaceService } from "~/services/workspace.service"
const t = useI18n()
const toast = useToast()
Expand All @@ -77,7 +77,7 @@ type EnvironmentType = "my-environments" | "team-environments"
type EnvironmentsChooseType = {
type: EnvironmentType
selectedTeam: MyWorkspace | undefined
selectedTeam: TeamWorkspace | undefined
}
const environmentType = ref<EnvironmentsChooseType>({
Expand Down Expand Up @@ -117,7 +117,7 @@ const switchToMyEnvironments = () => {
adapter.changeTeamID(undefined)
}
const updateSelectedTeam = (newSelectedTeam: MyWorkspace | undefined) => {
const updateSelectedTeam = (newSelectedTeam: TeamWorkspace | undefined) => {
if (newSelectedTeam) {
adapter.changeTeamID(newSelectedTeam.teamID)
environmentType.value.selectedTeam = newSelectedTeam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ import IconPlus from "~icons/lucide/plus"
import IconHelpCircle from "~icons/lucide/help-circle"
import IconImport from "~icons/lucide/folder-down"
import { defineActionHandler } from "~/helpers/actions"
import { MyWorkspace } from "~/services/workspace.service"
import { TeamWorkspace } from "~/services/workspace.service"
const t = useI18n()
const colorMode = useColorMode()
const props = defineProps<{
team: MyWorkspace | undefined
team: TeamWorkspace | undefined
teamEnvironments: TeamEnvironment[]
adapterError: GQLError<string> | null
loading: boolean
Expand Down
4 changes: 2 additions & 2 deletions packages/hoppscotch-common/src/services/workspace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ export type PersonalWorkspace = {
type: "personal"
}

export type MyWorkspace = {
export type TeamWorkspace = {
type: "team"
teamID: string
teamName: string
role: TeamMemberRole | null | undefined
}

export type Workspace = PersonalWorkspace | MyWorkspace
export type Workspace = PersonalWorkspace | TeamWorkspace

export type WorkspaceServiceEvent = {
type: "managed-team-list-adapter-polled"
Expand Down

0 comments on commit 7f64a74

Please sign in to comment.