Skip to content

Commit

Permalink
⛓️ Gatway to Apps name change (Joystream#3887)
Browse files Browse the repository at this point in the history
Required changes
  • Loading branch information
WRadoslaw authored Nov 29, 2022
1 parent 5deab64 commit 46eb6c5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
28 changes: 14 additions & 14 deletions packages/ui/src/accounts/components/AccountLocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ import styled from 'styled-components'
import { BalanceLock, LockType } from '@/accounts/types'
import { QuestionIcon } from '@/common/components/icons'
import {
DistributionWorkerIcon,
InvitationIcon,
MarketingWorkerIcon,
HRWorkerIcon,
LockIcon,
VoteIcon,
StorageWorkerIcon,
ProposalIcon,
CouncilCandidateIcon,
ForumWorkerIcon,
BoundStakingIcon,
BountiesIcon,
ValidationIcon,
BuilderWorkerIcon,
ContentDirectoryWorkerIcon,
BoundStakingIcon,
CouncilCandidateIcon,
CouncilorIcon,
BuilderWorkerIcon,
DistributionWorkerIcon,
ForumWorkerIcon,
GatewayWorkerIcon,
HRWorkerIcon,
InvitationIcon,
LockIcon,
MarketingWorkerIcon,
MembershipWorkerIcon,
ProposalIcon,
StorageWorkerIcon,
ValidationIcon,
VoteIcon,
} from '@/common/components/icons/locks'
import { VestingLockIcon } from '@/common/components/icons/locks/VestingLockIcon'
import { ColumnGapBlock } from '@/common/components/page/PageContent'
Expand All @@ -42,7 +42,7 @@ const locksMap: Record<LockType, ReactElement> = {
Invitation: <InvitationIcon />,
'Bound Staking Account': <BoundStakingIcon />,
Bounties: <BountiesIcon />,
'Gateway Worker': <GatewayWorkerIcon />,
'Apps Worker': <GatewayWorkerIcon />,
'Builders Worker': <BuilderWorkerIcon />,
'HR Worker': <HRWorkerIcon />,
'Marketing Worker': <MarketingWorkerIcon />,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/accounts/model/lockTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const lockTypes: { [key: string]: LockType } = {
['invitemb']: 'Invitation',
['boundsta']: 'Bound Staking Account',
['bounty ']: 'Bounties',
['wg-gatew']: 'Gateway Worker',
['wg-gatew']: 'Apps Worker',
['wg-opera']: 'Builders Worker',
['wg-operb']: 'HR Worker',
['wg-operg']: 'Marketing Worker',
Expand All @@ -37,7 +37,7 @@ const RIVALROUS: LockType[] = [
'Forum Worker',
'Membership Worker',
'Bounties',
'Gateway Worker',
'Apps Worker',
'Builders Worker',
'HR Worker',
'Marketing Worker',
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/accounts/types/balances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const WorkerLocks = [
'Content Directory Worker',
'Forum Worker',
'Membership Worker',
'Gateway Worker',
'Apps Worker',
'Builders Worker',
'HR Worker',
'Marketing Worker',
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/src/memberships/components/MemberRoles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
TooltipText,
} from '@/common/components/Tooltip'
import { Colors, Fonts } from '@/common/constants'
import { nameMapping } from '@/common/helpers'
import { memberRoleAbbreviation, memberRoleTitle } from '@/memberships/helpers'
import { groupNameToURLParam } from '@/working-groups/model/workingGroupName'

Expand Down Expand Up @@ -131,7 +132,7 @@ export const MemberRolePopupContent = ({ roles }: MemberRolePopupContentProps) =
</PopupRoleItem>
))}
<PopupGroupLink to={groupAddress} target="_blank">
{roles[0].groupName} Group
{nameMapping(roles[0].groupName)} Group
<LinkSymbol />
</PopupGroupLink>
</>
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/memberships/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { capitalizeFirstLetter } from '@/common/helpers'
import { capitalizeFirstLetter, nameMapping } from '@/common/helpers'

import { MemberRole } from './types'

Expand All @@ -7,7 +7,7 @@ export function memberRoleAbbreviation(role: MemberRole) {
return 'M'
}

return `${role.groupName.charAt(0).toUpperCase()}${role.isLead ? 'L' : 'W'}`
return `${nameMapping(role.groupName).charAt(0).toUpperCase()}${role.isLead ? 'L' : 'W'}`
}

export function memberRoleTitle(role: MemberRole) {
Expand All @@ -16,7 +16,7 @@ export function memberRoleTitle(role: MemberRole) {
}

const position = role.isLead ? 'Lead' : 'Worker'
const group = capitalizeFirstLetter(role.groupName)
const group = capitalizeFirstLetter(nameMapping(role.groupName))

return `${group} ${position}`
}
2 changes: 1 addition & 1 deletion packages/ui/src/working-groups/types/locks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const GROUP_TO_LOCK_ID: Record<GroupIdName, LockType> = {
contentWorkingGroup: 'Content Directory Worker',
membershipWorkingGroup: 'Membership Worker',
storageWorkingGroup: 'Storage Worker',
gatewayWorkingGroup: 'Gateway Worker',
gatewayWorkingGroup: 'Apps Worker',
distributionWorkingGroup: 'Distribution Worker',
operationsWorkingGroupGamma: 'Builders Worker',
operationsWorkingGroupBeta: 'HR Worker',
Expand Down

0 comments on commit 46eb6c5

Please sign in to comment.