Skip to content

Commit

Permalink
Merge branch 'master' into uma-add-safe-transaction-file-import-to-os…
Browse files Browse the repository at this point in the history
…nap-plugin
  • Loading branch information
gsteenkamp89 authored Apr 11, 2024
2 parents 13fc41a + c3fbb06 commit b281f96
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 26 deletions.
9 changes: 5 additions & 4 deletions src/components/ModalVote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { shorten, getChoiceString, explorerUrl } from '@/helpers/utils';
import { getPower, voteValidation } from '@/helpers/snapshot';
import { ExtendedSpace, Proposal } from '@/helpers/interfaces';
import shutterEncryptChoice from '@/helpers/shutter';
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
const { web3Account } = useWeb3();
Expand Down Expand Up @@ -273,8 +274,8 @@ watch(
tag="span"
scope="global"
>
<template #discord>
<BaseLink link="https://discord.snapshot.org">Discord</BaseLink>
<template #help>
<BaseLink :link="SNAPSHOT_HELP_LINK">Help Center</BaseLink>
</template>
</i18n-t>
</BaseMessageBlock>
Expand All @@ -291,8 +292,8 @@ watch(
tag="span"
scope="global"
>
<template #discord>
<BaseLink link="https://discord.snapshot.org">Discord</BaseLink>
<template #help>
<BaseLink :link="SNAPSHOT_HELP_LINK">Help Center</BaseLink>
</template>
</i18n-t>
</BaseMessageBlock>
Expand Down
8 changes: 5 additions & 3 deletions src/components/SetupMessageHelp.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script setup lang="ts"></script>
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
</script>

<template>
<BaseBlock class="mt-4 text-skin-text">
Expand All @@ -13,8 +15,8 @@
documentation</BaseLink
>
</template>
<template #discord>
<BaseLink link="https://discord.snapshot.org/"> Discord</BaseLink>
<template #help>
<BaseLink :link="SNAPSHOT_HELP_LINK">Help Center</BaseLink>
</template>
</i18n-t>
</BaseBlock>
Expand Down
3 changes: 2 additions & 1 deletion src/components/SpaceCreateWarnings.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
import { ExtendedSpace } from '@/helpers/interfaces';
const props = defineProps<{
Expand Down Expand Up @@ -63,7 +64,7 @@ const strategySymbolsString = computed(() => {
is-responsive
>
{{ $t('create.errorGettingSnapshot') }}
<BaseLink link="https://discord.snapshot.org/">
<BaseLink :link="SNAPSHOT_HELP_LINK">
{{ $t('learnMore') }}
</BaseLink>
</BaseMessageBlock>
Expand Down
3 changes: 2 additions & 1 deletion src/components/SpaceProposalResults.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
import {
ExtendedSpace,
Proposal,
Expand Down Expand Up @@ -72,7 +73,7 @@ onMounted(() => {
</BaseMessage>
<BaseLink
v-if="isAdmin"
link="https://discord.snapshot.org/"
:link="SNAPSHOT_HELP_LINK"
class="mt-3 block"
hide-external-icon
>
Expand Down
5 changes: 3 additions & 2 deletions src/components/SpaceProposalVote.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
import { Proposal, Choice } from '@/helpers/interfaces';
import voting from '@snapshot-labs/snapshot.js/src/voting';
Expand Down Expand Up @@ -120,8 +121,8 @@ watch(
class="border px-3 py-[12px] rounded-xl bg-[--border-color-subtle]"
>
Oops, we were unable to validate your vote. Please try voting again or
consider opening a ticket with our support team on
<BaseLink link="https://discord.snapshot.org">Discord</BaseLink>
consider contacting our support team on
<BaseLink :link="SNAPSHOT_HELP_LINK">Help Center</BaseLink>
</BaseMessage>
<div v-else>
<SpaceProposalVoteSingleChoice
Expand Down
5 changes: 3 additions & 2 deletions src/components/SpaceProposalsNotice.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
import { useStorage } from '@vueuse/core';
defineProps<{
Expand Down Expand Up @@ -49,8 +50,8 @@ const createdSpaces = useStorage(
documentation</BaseLink
>
</template>
<template #discord>
<BaseLink link="https://discord.snapshot.org/"> Discord</BaseLink>
<template #help>
<BaseLink :link="SNAPSHOT_HELP_LINK">Help Center</BaseLink>
</template>
</i18n-t>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/TheFooter.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
const yearNow = new Date().getFullYear();
const snapshotTextLinks = [
Expand Down Expand Up @@ -31,7 +33,7 @@ const resourcesTextLinks = [
},
{
text: 'support',
link: 'https://discord.snapshot.org/'
link: SNAPSHOT_HELP_LINK
}
];
</script>
Expand Down
5 changes: 3 additions & 2 deletions src/components/TheModalNotification.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
import defaults from '@/locales/default.json';
const { items } = useModalNotification();
Expand All @@ -20,8 +21,8 @@ const { items } = useModalNotification();
tag="span"
scope="global"
>
<template #discord>
<BaseLink link="https://discord.snapshot.org">Discord</BaseLink>
<template #help>
<BaseLink :link="SNAPSHOT_HELP_LINK">Discord</BaseLink>
</template>
</i18n-t>
</template>
Expand Down
2 changes: 2 additions & 0 deletions src/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ export const CHAIN_CURRENCIES: Record<string, ChainCurrency> = {

export const TWO_WEEKS = 1209600;
export const ONE_DAY = 86400;

export const SNAPSHOT_HELP_LINK = 'https://help.snapshot.org/en';
14 changes: 7 additions & 7 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"ticketWithAnyOrBasicErrorSetup": "Use of the ticket strategy requires setting a voting validation strategy. To continue go one step back and select the \"One person, one vote\" option. {article}",
"missingProposalValidationError": "Proposal validation is required to prevent unauthorized proposals and spam. If you don't want proposal validation you can toggle only the \"Allow only authors to submit a proposal\" option.",
"resultsCalculating": "Final results are being calculated. If you still see this message after a few minutes contact the space admin.",
"votingPowerFailedMessage": "Your voting power could not be calculated. This is often due to a misconfigured strategy or an unresponsive RPC node involved in the strategy. If the problem persists, consider contacting the space admin or our support team on {discord}",
"votingValidationFailedMessage": "We were not able to validate your eligibility to vote. This is often due to a misconfigured vote validation setting or an unresponsive RPC node. If the problem persists, consider contacting the space admin or our support team on {discord}",
"votingPowerFailedMessage": "Your voting power could not be calculated. This is often due to a misconfigured strategy or an unresponsive RPC node involved in the strategy. If the problem persists, consider contacting our support team on {help}",
"votingValidationFailedMessage": "We were not able to validate your eligibility to vote. This is often due to a misconfigured vote validation setting or an unresponsive RPC node. If the problem persists, consider contacting our support team on {help}",
"getHelp": "Get help",
"retry": "Retry",
"currentResults": "Current results",
Expand Down Expand Up @@ -179,7 +179,7 @@
"newSpaceNotice": {
"header": "Your space is live!",
"mainText": "You can change how voting power is calculated via strategies in your {settings}. Changes to your settings will only affect new proposals, existing proposals can not be changed.",
"learnMore": "Learn more in the {documentation} or join Snapshot {discord} for help.",
"learnMore": "Learn more in the {documentation} or contact support on {help}.",
"gotIt": "Got it!"
},
"errors": {
Expand Down Expand Up @@ -352,15 +352,15 @@
"modalNotifications": {
"wrong timestamp": {
"title": "Wrong timestamp",
"message": "The message timestamp is not valid. Please check the clock on your device, make sure it is set to the correct date and time and try again.\n\n If you need further assistance, feel free to reach out to our support team on {discord}."
"message": "The message timestamp is not valid. Please check the clock on your device, make sure it is set to the correct date and time and try again.\n\n If you need further assistance, feel free to reach out to our support team on {help}."
},
"space with ticket requires voting validation": {
"title": "Missing voting validation",
"message": "Your proposal cannot be submitted due to a missing voting validation rule required with the 'ticket' strategy. Please adjust your settings by either using another strategy or adding the required validation.\n\n If further assistance is needed, contact our support team on {discord}."
"message": "Your proposal cannot be submitted due to a missing voting validation rule required with the 'ticket' strategy. Please adjust your settings by either using another strategy or adding the required validation.\n\n If further assistance is needed, contact our support team on {help}."
},
"space missing proposal validation": {
"title": "Missing proposal validation",
"message": "Your proposal cannot be submitted due to a missing proposal validation rule. To prevent unauthorized proposals and spam, add a validation rule in your space settings.\n\n For assistance, reach out to our support team on {discord}."
"message": "Your proposal cannot be submitted due to a missing proposal validation rule. To prevent unauthorized proposals and spam, add a validation rule in your space settings.\n\n For assistance, reach out to our support team on {help}."
}
},
"modalTerms": {
Expand Down Expand Up @@ -554,7 +554,7 @@
"createASpace": "Create a space",
"registerEnsButton": "Register",
"supportedEnsTLDs": "Supported domain endings",
"helpDocsAndDiscordLinks": "Not sure how to setup your space? Learn more in the {docs} or join Snapshot {discord}.",
"helpDocsAndDiscordLinks": "Not sure how to setup your space? Learn more in the {docs} or contact support on {help}.",
"setSpaceController": "Space controller",
"setSpaceControllerExists": "The snapshot text-record for this domain has already been set. Choose edit to change it, otherwise you can skip to the next step.",
"setSpaceControllerInfo": " The space controller is the account that will be able to manage the space settings. Additional space controllers (admins) can be added later.",
Expand Down
6 changes: 3 additions & 3 deletions src/views/SpaceDelegates.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { SNAPSHOT_HELP_LINK } from '@/helpers/constants';
import { ExtendedSpace } from '@/helpers/interfaces';
import { useInfiniteScroll, refDebounced } from '@vueuse/core';
Expand Down Expand Up @@ -210,9 +211,8 @@ onMounted(() => {
</div>
<BaseMessageBlock v-if="hasDelegatesLoadFailed" level="warning-red">
An error occurred while loading delegates. Please try again later. If
the problem persists, consider contacting the space admin or our
support team on
<BaseLink link="https://discord.snapshot.org">Discord</BaseLink>
the problem persists, consider contacting our support team on
<BaseLink :link="SNAPSHOT_HELP_LINK">Help Center</BaseLink>
</BaseMessageBlock>
<template v-else-if="searchInputDebounced">
<div
Expand Down

0 comments on commit b281f96

Please sign in to comment.