Skip to content

Commit

Permalink
Merge branch 'master' into todmy/flag-proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
samuveth authored Sep 26, 2023
2 parents 71a504f + f56979e commit f8e0c63
Show file tree
Hide file tree
Showing 20 changed files with 127 additions and 197 deletions.
6 changes: 1 addition & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
- package-ecosystem: 'gitsubmodule'
directory: '/'
schedule:
interval: 'daily'
interval: 'monthly'
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
"@ethersproject/strings": "^5.7.0",
"@ethersproject/units": "^5.7.0",
"@ethersproject/wallet": "^5.7.0",
"@headlessui-float/vue": "^0.11.2",
"@headlessui-float/vue": "^0.11.3",
"@headlessui/vue": "^1.7.13",
"@pusher/push-notifications-web": "^1.1.0",
"@sentry/vite-plugin": "^2.5.0",
"@sentry/vue": "^7.55.2",
"@shutter-network/shutter-crypto": "0.1.0-beta.3",
"@snapshot-labs/lock": "^0.2.0",
"@snapshot-labs/pineapple": "^0.2.0",
"@snapshot-labs/pineapple": "^1.1.0",
"@snapshot-labs/snapshot.js": "^0.6.2",
"@snapshot-labs/tune": "^0.1.33",
"@vue/apollo-composable": "4.0.0-beta.4",
Expand All @@ -67,21 +67,21 @@
"vue": "^3.3.4",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6",
"vue-tippy": "^6.2.0",
"vue-tippy": "^6.3.1",
"vuedraggable": "^4.0.2"
},
"devDependencies": {
"@iconify-json/heroicons-outline": "^1.1.7",
"@rushstack/eslint-patch": "^1.3.3",
"@synthetixio/synpress": "^3.5.1",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/forms": "^0.5.6",
"@types/bluebird": "^3.5.38",
"@types/lodash": "^4.14.198",
"@types/node": "^20.5.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-vue": "^2.3.4",
"@vitest/coverage-v8": "^0.33.0",
"@vitest/coverage-v8": "^0.34.5",
"@vitest/ui": "^0.33.0",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^9.0.0",
Expand All @@ -90,7 +90,7 @@
"cypress": "^12.11.0",
"env-cmd": "^10.1.0",
"eslint": "^8.46.0",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^7.15.1",
"happy-dom": "^10.11.0",
Expand All @@ -108,7 +108,7 @@
"tailwindcss": "^3.3.3",
"unplugin-auto-import": "^0.16.1",
"unplugin-icons": "^0.16.5",
"unplugin-vue-components": "^0.24.1",
"unplugin-vue-components": "^0.25.2",
"vite": "^2.9.14",
"vitest": "^0.33.0"
},
Expand Down
33 changes: 3 additions & 30 deletions src/components/MessageWarningValidation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ const tPath = computed(() => {
</BaseLink>
</template>

<template
v-else-if="
validationName === 'passport-gated' ||
validationName === 'passport-weighted'
"
>
<template v-else-if="validationName === 'passport-gated'">
<template v-if="validationName === 'passport-gated'">
{{
$t(`${tPath}.passport-gated.invalidMessage`, {
operator: validationParams?.operator === 'AND' ? 'all' : 'one',
stamps: validationParams?.stamps.join(', ')
stamps: validationParams?.stamps.join(', '),
scoreThreshold: validationParams?.scoreThreshold || 0
})
}}
</template>
Expand All @@ -60,27 +56,4 @@ const tPath = computed(() => {
</BaseLink>
</template>
</BaseMessageBlock>

<!-- <template v-if="validationName === 'passport-weighted' && proposal?.validation.params?.stamps.some(p => p.weight > 1)">
<table class="mt-3 w-full">
<caption>
A list of stamps that can be used to increase your weight:
</caption>
<thead>
<tr>
<th class="w-2/3 py-1 text-left text-skin-link">Stamp</th>
<th class="w-1/3 py-1 text-left text-skin-link">Weight</th>
</tr>
</thead>
<tbody>
<tr
v-for="stamp in proposal.validation.params.stamps"
:key="stamp.name"
>
<td class="py-1">{{ stamp.id }}</td>
<td class="py-1">{{ stamp.weight }}</td>
</tr>
</tbody>
</table>
</template> -->
</template>
10 changes: 2 additions & 8 deletions src/composables/useImageUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,12 @@ export function useImageUpload() {
try {
const receipt = await pin(formData, import.meta.env.VITE_PINEAPPLE_URL);

if (receipt.error) {
imageUploadError.value = receipt.error.message;
isUploadingImage.value = false;
return;
}

imageUrl.value = `ipfs://${receipt.cid}`;
imageName.value = file.name;
onSuccess({ name: file.name, url: imageUrl.value });
} catch (err) {
} catch (err: any) {
notify(['red', t('notify.somethingWentWrong')]);
imageUploadError.value = (err as Error).message;
imageUploadError.value = err.error?.message || err;
} finally {
isUploadingImage.value = false;
}
Expand Down
5 changes: 1 addition & 4 deletions src/locales/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
10 changes: 2 additions & 8 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your space from spam by requiring users to have a Gitcoin Passport to create a proposal.",
"invalidMessage": "You need a Gitcoin Passport with {operator} of the following stamps to create a proposal: {stamps}"
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
},
"arbitrum": {
"label": "Arbitrum DAO votable supply",
Expand Down Expand Up @@ -772,10 +769,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {operator} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/fil-PH.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,7 @@
"passport-gated": {
"label": "Accès réservé au Gitcoin Passport",
"description": "Protégez vos propositions contre le spam et la manipulation des votes en exigeant que les utilisateurs aient un Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Pondéré par Gitcoin Passport"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/id-ID.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
3 changes: 0 additions & 3 deletions src/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,6 @@
"label": "Gitcoin Passport ゲート付き",
"description": "Gitcoin Passportを必要とすることで、スパムや投票操作からあなたの提案を保護します。",
"invalidMessage": "この提案に投票するためには、{amount} 以下の切手を持つGitcoin Passportが必要です:{stamps}。"
},
"passport-weighted": {
"label": "Gitcoin Passport 重み付き"
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/ro-RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
5 changes: 1 addition & 4 deletions src/locales/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,7 @@
"passport-gated": {
"label": "Gitcoin Passport gated",
"description": "Protect your proposals from spam and vote manipulation by requiring users to have a Gitcoin Passport.",
"invalidMessage": "You need a Gitcoin Passport with {amount} of the following stamps to vote on this proposal: {stamps}. "
},
"passport-weighted": {
"label": "Gitcoin Passport weighted"
"invalidMessage": "You need a Gitcoin Passport with score above {scoreThreshold} and {operator} of the following stamps to vote on this proposal: {stamps}. "
}
},
"safeSnap": {
Expand Down
3 changes: 0 additions & 3 deletions src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,6 @@
"label": "Gitcoin Passport门槛",
"description": "通过要求用户拥有 Gitcoin Passport 来保护您的提案免受垃圾邮件和投票操纵。",
"invalidMessage": "你需要一本带有 amount个如下邮票的Gitcoin Passport才能对这个提案投票: stamps "
},
"passport-weighted": {
"label": "Gitcoin Passport加权"
}
},
"safeSnap": {
Expand Down
Loading

0 comments on commit f8e0c63

Please sign in to comment.