diff --git a/package.json b/package.json index 3678186ca4f6..cbd637f788a2 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ }, "dependencies": { "@adraffy/ens-normalize": "^1.9.4", - "@braintree/sanitize-url": "^6.0.4", "@apollo/client": "^3.8.3", + "@braintree/sanitize-url": "^6.0.4", "@ensdomains/eth-ens-namehash": "^2.0.15", "@ethersproject/abi": "^5.7.0", "@ethersproject/address": "^5.7.0", @@ -45,7 +45,7 @@ "@shutter-network/shutter-crypto": "0.1.0-beta.3", "@snapshot-labs/lock": "^0.2.0", "@snapshot-labs/pineapple": "^0.2.0", - "@snapshot-labs/snapshot.js": "^0.5.8", + "@snapshot-labs/snapshot.js": "^0.6.0", "@snapshot-labs/tune": "^0.1.33", "@vue/apollo-composable": "4.0.0-beta.4", "@vueuse/core": "^10.4.0", diff --git a/src/components/SpaceProposalHeader.vue b/src/components/SpaceProposalHeader.vue index 84fd9abd3ba8..2f8001c1de6e 100644 --- a/src/components/SpaceProposalHeader.vue +++ b/src/components/SpaceProposalHeader.vue @@ -23,6 +23,8 @@ const threeDotItems = computed(() => { { text: t('duplicate'), action: 'duplicate' }, { text: t('report'), action: 'report' } ]; + if ((props.isAdmin || props.isModerator) && !props.proposal.flagged) + items.push({ text: t('flag'), action: 'flag' }); if (props.isAdmin || props.isModerator || isCreator.value) items.push({ text: t('delete'), action: 'delete' }); return items; @@ -51,10 +53,15 @@ const { const { resetForm } = useFormSpaceProposal(); -function handleSelect(e) { +async function handleSelect(e) { if (!props.proposal) return; if (e === 'delete') deleteProposal(); if (e === 'report') window.open('https://tally.so/r/mDBEGb', '_blank'); + if (e === 'flag') { + await send(props.space, 'flag-proposal', { + proposal: props.proposal + }); + } if (e === 'duplicate') { resetForm(); router.push({ @@ -151,6 +158,7 @@ watch(