From 8490d76bc045e7574d787d1d670210bedc3f5355 Mon Sep 17 00:00:00 2001 From: Ewa Kowalska <30404388+ekowalsk@users.noreply.github.com> Date: Tue, 29 Dec 2020 20:14:38 +0100 Subject: [PATCH] Accept and reject curator from bounty list (#4295) * Add Accept Curator functionality to bounty list * Extract Bounties Action Button * Add unassign curator functionality * Change curator reject icon and button labels * Apply review suggestions * Revert "Apply review suggestions" This reverts commit 93d637bb3d4593555ce4cc6d5a0654263eb7b4d2. * Apply review suggestions * Apply requested changes --- .../apps/public/locales/en/app-bounties.json | 4 +- packages/page-bounties/src/Bounty.tsx | 14 +++--- packages/page-bounties/src/BountyActions.tsx | 40 ++++++++++++++++ ...{BountyClaim.tsx => BountyClaimAction.tsx} | 10 ++-- .../src/BountyCuratorProposedActions.tsx | 47 +++++++++++++++++++ 5 files changed, 101 insertions(+), 14 deletions(-) create mode 100644 packages/page-bounties/src/BountyActions.tsx rename packages/page-bounties/src/{BountyClaim.tsx => BountyClaimAction.tsx} (79%) create mode 100644 packages/page-bounties/src/BountyCuratorProposedActions.tsx diff --git a/packages/apps/public/locales/en/app-bounties.json b/packages/apps/public/locales/en/app-bounties.json index d8ab21f000..6327266528 100644 --- a/packages/apps/public/locales/en/app-bounties.json +++ b/packages/apps/public/locales/en/app-bounties.json @@ -1,4 +1,5 @@ { + "Accept": "Accept", "Account does not have enough funds.": "Account does not have enough funds.", "Add Bounty": "Add Bounty", "Allocation value is smaller than the minimum bounty value.": "Allocation value is smaller than the minimum bounty value.", @@ -6,7 +7,7 @@ "Bond is estimated based on bountyDepositBase and dataDepositPerByte constants.": "Bond is estimated based on bountyDepositBase and dataDepositPerByte constants.", "Bounties": "Bounties", "Calculated bond for bounty": "Calculated bond for bounty", - "Claim Bounty": "Claim Bounty", + "Claim": "Claim", "Claimable": "Claimable", "Curators deposit": "Curators deposit", "Curators fee": "Curators fee", @@ -15,6 +16,7 @@ "No open bounties": "No open bounties", "Proposer": "Proposer", "Proposer bond depends on bounty title length.": "Proposer bond depends on bounty title length.", + "Reject": "Reject", "Select the account you wish to propose the bounty from.": "Select the account you wish to propose the bounty from.", "The description of this bounty": "The description of this bounty", "The total payment amount of this bounty, curators fee included.": "The total payment amount of this bounty, curators fee included.", diff --git a/packages/page-bounties/src/Bounty.tsx b/packages/page-bounties/src/Bounty.tsx index 79d11fde43..e56618be75 100644 --- a/packages/page-bounties/src/Bounty.tsx +++ b/packages/page-bounties/src/Bounty.tsx @@ -11,7 +11,7 @@ import { AddressSmall, Icon, LinkExternal } from '@polkadot/react-components'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import BountyClaim from './BountyClaim'; +import { BountyActions } from './BountyActions'; import { getBountyStatus } from './helpers'; import { useTranslation } from './translate'; @@ -58,13 +58,11 @@ function Bounty ({ bestNumber, bounty, className = '', description, index }: Pro