diff --git a/package.json b/package.json index 6c6e60ced9e6..9c4ff850075c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@shutter-network/shutter-crypto": "0.1.0-beta.3", "@snapshot-labs/lock": "^0.2.0", "@snapshot-labs/pineapple": "^1.1.0", - "@snapshot-labs/snapshot.js": "^0.6.4", + "@snapshot-labs/snapshot.js": "^0.7.0", "@snapshot-labs/tune": "^0.1.33", "@vue/apollo-composable": "4.0.0-beta.4", "@vueuse/core": "^10.4.0", diff --git a/snapshot-spaces b/snapshot-spaces index e33ec03bd37b..423c33e8bd2a 160000 --- a/snapshot-spaces +++ b/snapshot-spaces @@ -1 +1 @@ -Subproject commit e33ec03bd37bc4e3184a9c193ff4af51b89ca864 +Subproject commit 423c33e8bd2a3130bec73918e2daf1f3f89ed8d0 diff --git a/src/components/SpaceProposalHeader.vue b/src/components/SpaceProposalHeader.vue index 0df21d259d81..8953f4cced9f 100644 --- a/src/components/SpaceProposalHeader.vue +++ b/src/components/SpaceProposalHeader.vue @@ -23,6 +23,12 @@ const threeDotItems = computed(() => { if (isCreator.value) items.push({ text: t('edit'), action: 'edit' }); items.push({ text: t('duplicate'), action: 'duplicate' }); items.push({ text: t('report'), action: 'report' }); + + if ((props.isAdmin || props.isModerator) && !props.proposal.flagged) { + items.push({ text: t('flag'), action: 'flag' }); + } else { + items.push({ text: t('report'), action: 'report' }); + } if (props.isAdmin || props.isModerator || isCreator.value) items.push({ text: t('delete'), action: 'delete' }); return items; @@ -51,10 +57,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' || e === 'edit') { resetForm(); router.push({ @@ -152,7 +163,9 @@ watch(