refactor: update team nomenclature (#3880)
Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
parent
e69d5a6253
commit
07e8af7947
5 changed files with 91 additions and 71 deletions
|
|
@ -154,7 +154,7 @@
|
|||
"invalid_name": "Please provide a name for the collection",
|
||||
"invalid_root_move": "Collection already in the root",
|
||||
"moved": "Moved Successfully",
|
||||
"my_collections": "My Collections",
|
||||
"my_collections": "Personal Collections",
|
||||
"name": "My New Collection",
|
||||
"name_length_insufficient": "Collection name should be at least 3 characters long",
|
||||
"new": "New Collection",
|
||||
|
|
@ -166,14 +166,12 @@
|
|||
"save_as": "Save as",
|
||||
"save_to_collection": "Save to Collection",
|
||||
"select": "Select a Collection",
|
||||
"select_location": "Select location",
|
||||
"select_team": "Select a team",
|
||||
"team_collections": "Team Collections"
|
||||
"select_location": "Select location"
|
||||
},
|
||||
"confirm": {
|
||||
"close_unsaved_tab": "Are you sure you want to close this tab?",
|
||||
"close_unsaved_tabs": "Are you sure you want to close all tabs? {count} unsaved tabs will be lost.",
|
||||
"exit_team": "Are you sure you want to leave this team?",
|
||||
"exit_team": "Are you sure you want to leave this workspace?",
|
||||
"logout": "Are you sure you want to logout?",
|
||||
"remove_collection": "Are you sure you want to permanently delete this collection?",
|
||||
"remove_environment": "Are you sure you want to permanently delete this environment?",
|
||||
|
|
@ -181,7 +179,7 @@
|
|||
"remove_history": "Are you sure you want to permanently delete all history?",
|
||||
"remove_request": "Are you sure you want to permanently delete this request?",
|
||||
"remove_shared_request": "Are you sure you want to permanently delete this shared request?",
|
||||
"remove_team": "Are you sure you want to delete this team?",
|
||||
"remove_team": "Are you sure you want to delete this workspace?",
|
||||
"remove_telemetry": "Are you sure you want to opt-out of Telemetry?",
|
||||
"request_change": "Are you sure you want to discard current request, unsaved changes will be lost.",
|
||||
"save_unsaved_tab": "Do you want to save changes made in this tab?",
|
||||
|
|
@ -234,9 +232,9 @@
|
|||
"headers": "This request does not have any headers",
|
||||
"history": "History is empty",
|
||||
"invites": "Invite list is empty",
|
||||
"members": "Team is empty",
|
||||
"members": "Workspace is empty",
|
||||
"parameters": "This request does not have any parameters",
|
||||
"pending_invites": "There are no pending invites for this team",
|
||||
"pending_invites": "There are no pending invites for this workspace",
|
||||
"profile": "Login to view your profile",
|
||||
"protocols": "Protocols are empty",
|
||||
"request_variables": "This request does not have any request variables",
|
||||
|
|
@ -245,8 +243,8 @@
|
|||
"shared_requests": "Shared requests are empty",
|
||||
"shared_requests_logout": "Login to view your shared requests or create a new one",
|
||||
"subscription": "Subscriptions are empty",
|
||||
"team_name": "Team name empty",
|
||||
"teams": "You don't belong to any teams",
|
||||
"team_name": "Workspace name empty",
|
||||
"teams": "You don't belong to any workspaces",
|
||||
"tests": "There are no tests for this request"
|
||||
},
|
||||
"environment": {
|
||||
|
|
@ -263,7 +261,7 @@
|
|||
"import_or_create": "Import or create a environment",
|
||||
"invalid_name": "Please provide a name for the environment",
|
||||
"list": "Environment variables",
|
||||
"my_environments": "My Environments",
|
||||
"my_environments": "Personal Environments",
|
||||
"name": "Name",
|
||||
"nested_overflow": "nested environment variables are limited to 10 levels",
|
||||
"new": "New Environment",
|
||||
|
|
@ -278,7 +276,7 @@
|
|||
"select": "Select environment",
|
||||
"set": "Set environment",
|
||||
"set_as_environment": "Set as environment",
|
||||
"team_environments": "Team Environments",
|
||||
"team_environments": "Workspace Environments",
|
||||
"title": "Environments",
|
||||
"updated": "Environment updated",
|
||||
"value": "Value",
|
||||
|
|
@ -293,8 +291,8 @@
|
|||
"check_how_to_add_origin": "Check how you can add an origin",
|
||||
"curl_invalid_format": "cURL is not formatted properly",
|
||||
"danger_zone": "Danger zone",
|
||||
"delete_account": "Your account is currently an owner in these teams:",
|
||||
"delete_account_description": "You must either remove yourself, transfer ownership, or delete these teams before you can delete your account.",
|
||||
"delete_account": "Your account is currently an owner in these workspaces:",
|
||||
"delete_account_description": "You must either remove yourself, transfer ownership, or delete these workspaces before you can delete your account.",
|
||||
"empty_req_name": "Empty Request Name",
|
||||
"f12_details": "(F12 for details)",
|
||||
"gql_prettify_invalid_query": "Couldn't prettify an invalid query, solve query syntax errors and try again",
|
||||
|
|
@ -396,8 +394,8 @@
|
|||
"from_insomnia_description": "Import from Insomnia collection",
|
||||
"from_json": "Import from Hoppscotch",
|
||||
"from_json_description": "Import from Hoppscotch collection file",
|
||||
"from_my_collections": "Import from My Collections",
|
||||
"from_my_collections_description": "Import from My Collections file",
|
||||
"from_my_collections": "Import from Personal Collections",
|
||||
"from_my_collections_description": "Import from Personal Collections file",
|
||||
"from_openapi": "Import from OpenAPI",
|
||||
"from_openapi_description": "Import from OpenAPI specification file (YML/JSON)",
|
||||
"from_postman": "Import from Postman",
|
||||
|
|
@ -514,7 +512,7 @@
|
|||
"email_verification_mail": "A verification email has been sent to your email address. Please click on the link to verify your email address.",
|
||||
"no_permission": "You do not have permission to perform this action.",
|
||||
"owner": "Owner",
|
||||
"owner_description": "Owners can add, edit, and delete requests, collections and team members.",
|
||||
"owner_description": "Owners can add, edit, and delete requests, collections and workspace members.",
|
||||
"roles": "Roles",
|
||||
"roles_description": "Roles are used to control access to the shared collections.",
|
||||
"updated": "Profile updated",
|
||||
|
|
@ -819,12 +817,12 @@
|
|||
"title": "Tabs"
|
||||
},
|
||||
"workspace": {
|
||||
"delete": "Delete current team",
|
||||
"edit": "Edit current team",
|
||||
"invite": "Invite people to team",
|
||||
"new": "Create new team",
|
||||
"delete": "Delete current workspace",
|
||||
"edit": "Edit current workspace",
|
||||
"invite": "Invite people to workspace",
|
||||
"new": "Create new workspace",
|
||||
"switch_to_personal": "Switch to your personal workspace",
|
||||
"title": "Teams"
|
||||
"title": "Workspaces"
|
||||
}
|
||||
},
|
||||
"sse": {
|
||||
|
|
@ -881,7 +879,6 @@
|
|||
"forum": "Ask questions and get answers",
|
||||
"github": "Follow us on Github",
|
||||
"shortcuts": "Browse app faster",
|
||||
"team": "Get in touch with the team",
|
||||
"title": "Support",
|
||||
"twitter": "Follow us on Twitter"
|
||||
},
|
||||
|
|
@ -912,60 +909,59 @@
|
|||
"websocket": "WebSocket"
|
||||
},
|
||||
"team": {
|
||||
"already_member": "You are already a member of this team. Contact your team owner.",
|
||||
"create_new": "Create new team",
|
||||
"deleted": "Team deleted",
|
||||
"edit": "Edit Team",
|
||||
"already_member": "You are already a member of this workspace. Contact your workspace owner.",
|
||||
"create_new": "Create new workspace",
|
||||
"deleted": "Workspace deleted",
|
||||
"edit": "Edit Workspace",
|
||||
"email": "E-mail",
|
||||
"email_do_not_match": "Email doesn't match with your account details. Contact your team owner.",
|
||||
"exit": "Exit Team",
|
||||
"exit_disabled": "Only owner cannot exit the team",
|
||||
"email_do_not_match": "Email doesn't match with your account details. Contact your workspace owner.",
|
||||
"exit": "Exit Workspace",
|
||||
"exit_disabled": "Only owner cannot exit the workspace",
|
||||
"failed_invites": "Failed invites",
|
||||
"invalid_coll_id": "Invalid collection ID",
|
||||
"invalid_email_format": "Email format is invalid",
|
||||
"invalid_id": "Invalid team ID. Contact your team owner.",
|
||||
"invalid_id": "Invalid workspace ID. Contact your workspace owner.",
|
||||
"invalid_invite_link": "Invalid invite link",
|
||||
"invalid_invite_link_description": "The link you followed is invalid. Contact your team owner.",
|
||||
"invalid_member_permission": "Please provide a valid permission to the team member",
|
||||
"invalid_invite_link_description": "The link you followed is invalid. Contact your workspace owner.",
|
||||
"invalid_member_permission": "Please provide a valid permission to the workspace member",
|
||||
"invite": "Invite",
|
||||
"invite_more": "Invite more",
|
||||
"invite_tooltip": "Invite people to this workspace",
|
||||
"invited_to_team": "{owner} invited you to join {team}",
|
||||
"invited_to_team": "{owner} invited you to join {workspace}",
|
||||
"join": "Invitation accepted",
|
||||
"join_beta": "Join the beta program to access teams.",
|
||||
"join_team": "Join {team}",
|
||||
"joined_team": "You have joined {team}",
|
||||
"joined_team_description": "You are now a member of this team",
|
||||
"left": "You left the team",
|
||||
"join_team": "Join {workspace}",
|
||||
"joined_team": "You have joined {workspace}",
|
||||
"joined_team_description": "You are now a member of this workspace",
|
||||
"left": "You left the workspace",
|
||||
"login_to_continue": "Login to continue",
|
||||
"login_to_continue_description": "You need to be logged in to join a team.",
|
||||
"login_to_continue_description": "You need to be logged in to join a workspace.",
|
||||
"logout_and_try_again": "Logout and sign in with another account",
|
||||
"member_has_invite": "This email ID already has an invite. Contact your team owner.",
|
||||
"member_not_found": "Member not found. Contact your team owner.",
|
||||
"member_has_invite": "This email ID already has an invite. Contact your workspace owner.",
|
||||
"member_not_found": "Member not found. Contact your workspace owner.",
|
||||
"member_removed": "User removed",
|
||||
"member_role_updated": "User roles updated",
|
||||
"members": "Members",
|
||||
"more_members": "+{count} more",
|
||||
"name_length_insufficient": "Team name should be at least 6 characters long",
|
||||
"name_updated": "Team name updated",
|
||||
"new": "New Team",
|
||||
"new_created": "New team created",
|
||||
"new_name": "My New Team",
|
||||
"no_access": "You do not have edit access to this team",
|
||||
"no_invite_found": "Invitation not found. Contact your team owner.",
|
||||
"name_length_insufficient": "Workspace name should be at least 6 characters long",
|
||||
"name_updated": "Workspace name updated",
|
||||
"new": "New Workspace",
|
||||
"new_created": "New workspace created",
|
||||
"new_name": "My New Workspace",
|
||||
"no_access": "You do not have edit access to this workspace",
|
||||
"no_invite_found": "Invitation not found. Contact your workspace owner.",
|
||||
"no_request_found": "Request not found.",
|
||||
"not_found": "Team not found. Contact your team owner.",
|
||||
"not_valid_viewer": "You are not a valid viewer. Contact your team owner.",
|
||||
"not_found": "Workspace not found. Contact your workspace owner.",
|
||||
"not_valid_viewer": "You are not a valid viewer. Contact your workspace owner.",
|
||||
"parent_coll_move": "Cannot move collection to a child collection",
|
||||
"pending_invites": "Pending invites",
|
||||
"permissions": "Permissions",
|
||||
"same_target_destination": "Same target and destination",
|
||||
"saved": "Team saved",
|
||||
"select_a_team": "Select a team",
|
||||
"saved": "Workspace saved",
|
||||
"select_a_team": "Select a workspace",
|
||||
"success_invites": "Success invites",
|
||||
"title": "Teams",
|
||||
"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 team."
|
||||
"we_sent_invite_link_description": "Ask all invitees to check their inbox. Click on the link to join the workspace."
|
||||
},
|
||||
"team_environment": {
|
||||
"deleted": "Environment Deleted",
|
||||
|
|
@ -991,8 +987,10 @@
|
|||
},
|
||||
"workspace": {
|
||||
"change": "Change workspace",
|
||||
"personal": "My Workspace",
|
||||
"team": "Team Workspace",
|
||||
"personal": "Personal Workspace",
|
||||
"personal_workspace": "{name}'s Workspace",
|
||||
"other_workspaces": "My Workspaces",
|
||||
"team": "Workspace",
|
||||
"title": "Workspaces"
|
||||
},
|
||||
"site_protection": {
|
||||
|
|
|
|||
|
|
@ -330,11 +330,16 @@ const myTeams = useReadonlyStream(teamListAdapter.teamList$, null)
|
|||
|
||||
const workspace = workspaceService.currentWorkspace
|
||||
|
||||
const workspaceName = computed(() =>
|
||||
workspace.value.type === "personal"
|
||||
? t("workspace.personal")
|
||||
: workspace.value.teamName
|
||||
)
|
||||
const workspaceName = computed(() => {
|
||||
if (workspace.value.type === "personal") {
|
||||
return currentUser.value?.displayName
|
||||
? t("workspace.personal_workspace", {
|
||||
name: currentUser.value.displayName,
|
||||
})
|
||||
: t("workspace.personal")
|
||||
}
|
||||
return workspace.value.teamName
|
||||
})
|
||||
|
||||
const refetchTeams = () => {
|
||||
teamListAdapter.fetchList()
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import { computed } from "vue"
|
|||
import { useI18n } from "~/composables/i18n"
|
||||
import { useService } from "dioc/vue"
|
||||
import { WorkspaceService } from "~/services/workspace.service"
|
||||
import { useReadonlyStream } from "~/composables/stream"
|
||||
import { platform } from "~/platform"
|
||||
|
||||
const props = defineProps<{
|
||||
section?: string
|
||||
|
|
@ -26,14 +28,23 @@ const t = useI18n()
|
|||
const workspaceService = useService(WorkspaceService)
|
||||
const workspace = workspaceService.currentWorkspace
|
||||
|
||||
const currentUser = useReadonlyStream(
|
||||
platform.auth.getProbableUserStream(),
|
||||
platform.auth.getProbableUser()
|
||||
)
|
||||
|
||||
const currentWorkspace = computed(() => {
|
||||
const personalWorkspaceName = currentUser.value?.displayName
|
||||
? t("workspace.personal_workspace", { name: currentUser.value.displayName })
|
||||
: t("workspace.personal")
|
||||
|
||||
if (props.isOnlyPersonal) {
|
||||
return `${t("workspace.personal")}`
|
||||
return personalWorkspaceName
|
||||
}
|
||||
if (workspace.value.type === "team") {
|
||||
return teamWorkspaceName.value
|
||||
}
|
||||
return `${t("workspace.personal")}`
|
||||
return personalWorkspaceName
|
||||
})
|
||||
|
||||
const teamWorkspaceName = computed(() => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="flex flex-col">
|
||||
<div class="flex flex-col">
|
||||
<HoppSmartItem
|
||||
label="My Workspace"
|
||||
:label="personalWorkspaceName"
|
||||
:icon="IconUser"
|
||||
:info-icon="workspace.type === 'personal' ? IconDone : undefined"
|
||||
:active-info-icon="workspace.type === 'personal'"
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
class="sticky top-0 z-10 mb-2 flex items-center justify-between bg-popover py-2 pl-2"
|
||||
>
|
||||
<div class="flex items-center px-2 font-semibold text-secondaryLight">
|
||||
{{ t("team.title") }}
|
||||
{{ t("workspace.other_workspaces") }}
|
||||
</div>
|
||||
<HoppButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
|
|
@ -96,6 +96,12 @@ const currentUser = useReadonlyStream(
|
|||
platform.auth.getProbableUser()
|
||||
)
|
||||
|
||||
const personalWorkspaceName = computed(() =>
|
||||
currentUser.value?.displayName
|
||||
? t("workspace.personal_workspace", { name: currentUser.value.displayName })
|
||||
: t("workspace.personal")
|
||||
)
|
||||
|
||||
const workspaceService = useService(WorkspaceService)
|
||||
const teamListadapter = workspaceService.acquireTeamListAdapter(null)
|
||||
const myTeams = useReadonlyStream(teamListadapter.teamList$, [])
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
<h1 class="heading">
|
||||
{{
|
||||
t("team.join_team", {
|
||||
team: inviteDetails.data.right.teamInvitation.team.name,
|
||||
workspace: inviteDetails.data.right.teamInvitation.team.name,
|
||||
})
|
||||
}}
|
||||
</h1>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
owner:
|
||||
inviteDetails.data.right.teamInvitation.creator.displayName ??
|
||||
inviteDetails.data.right.teamInvitation.creator.email,
|
||||
team: inviteDetails.data.right.teamInvitation.team.name,
|
||||
workspace: inviteDetails.data.right.teamInvitation.team.name,
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
<HoppButtonPrimary
|
||||
:label="
|
||||
t('team.join_team', {
|
||||
team: inviteDetails.data.right.teamInvitation.team.name,
|
||||
workspace: inviteDetails.data.right.teamInvitation.team.name,
|
||||
})
|
||||
"
|
||||
:loading="loading"
|
||||
|
|
@ -109,14 +109,14 @@
|
|||
<h1 class="heading">
|
||||
{{
|
||||
t("team.joined_team", {
|
||||
team: inviteDetails.data.right.teamInvitation.team.name,
|
||||
workspace: inviteDetails.data.right.teamInvitation.team.name,
|
||||
})
|
||||
}}
|
||||
</h1>
|
||||
<p class="mt-2 text-secondaryLight">
|
||||
{{
|
||||
t("team.joined_team_description", {
|
||||
team: inviteDetails.data.right.teamInvitation.team.name,
|
||||
workspace: inviteDetails.data.right.teamInvitation.team.name,
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue