From 07315b673e4c3bc8e9d9149b867f8581804f4be0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:15:30 +0000 Subject: [PATCH 1/6] Update Snapshot packages (#4252) Co-authored-by: ChaituVR --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6035cbf8935b..5a585ea766c0 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.2", + "@snapshot-labs/snapshot.js": "^0.6.3", "@snapshot-labs/tune": "^0.1.33", "@vue/apollo-composable": "4.0.0-beta.4", "@vueuse/core": "^10.4.0", diff --git a/yarn.lock b/yarn.lock index 3aa6dba464c0..27e504731bf2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1853,10 +1853,10 @@ dependencies: ofetch "^1.3.3" -"@snapshot-labs/snapshot.js@^0.6.2": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot.js/-/snapshot.js-0.6.2.tgz#0f9ddf591ec50912aeed545c807b5295365d4e2f" - integrity sha512-hQjZ0I9uLu2sUpuR05maYCq9KLi6yNJnCCkjIutDQjFFEzmeMqJ0Lru1tOdcRMsPW3g5ktdo5xi265ESEBDPdA== +"@snapshot-labs/snapshot.js@^0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot.js/-/snapshot.js-0.6.3.tgz#a24cccfaaa0ec39db366518bcc4a8f03f42468db" + integrity sha512-RDbObv32FyG2WYapyXQ7kLU+31Sr1YxszAbgeU2WuIJvYFoIp1qJ6BQRrbQOMKea1c9TTlf7XY50NGZPWXXw7w== dependencies: "@ensdomains/eth-ens-namehash" "^2.0.15" "@ethersproject/abi" "^5.6.4" From 7938ed14ca281592037149b10f537366e4a1a22f Mon Sep 17 00:00:00 2001 From: Dmytro Tolok Date: Thu, 28 Sep 2023 13:37:18 +0200 Subject: [PATCH 2/6] feat(proposal): add ability to flag proposals for admins and moderators (#4220) * feat(proposal): add ability to flag proposals for admins and moderators * fix(flag): change the way how flag action appears in proposal --------- Co-authored-by: Sam <51686767+samuveth@users.noreply.github.com> Co-authored-by: Chaitanya --- src/components/SpaceProposalHeader.vue | 15 ++++++++++++--- src/composables/useClient.ts | 5 +++++ src/locales/default.json | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/SpaceProposalHeader.vue b/src/components/SpaceProposalHeader.vue index 84fd9abd3ba8..a2f26b1de9ec 100644 --- a/src/components/SpaceProposalHeader.vue +++ b/src/components/SpaceProposalHeader.vue @@ -21,8 +21,12 @@ const isCreator = computed(() => props.proposal?.author === web3Account.value); const threeDotItems = computed(() => { const items = [ { 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' }); + } 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 +55,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({ @@ -150,7 +159,7 @@ watch(