diff --git a/src/assets/icons/hey.svg b/src/assets/icons/hey.svg new file mode 100644 index 000000000000..72f0ef96a170 --- /dev/null +++ b/src/assets/icons/hey.svg @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/icons/lenster.svg b/src/assets/icons/lenster.svg deleted file mode 100644 index 99875dbde828..000000000000 --- a/src/assets/icons/lenster.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/components/ModalPostVote.vue b/src/components/ModalPostVote.vue index 932fc25f7a0a..ba8635f06388 100644 --- a/src/components/ModalPostVote.vue +++ b/src/components/ModalPostVote.vue @@ -2,7 +2,7 @@ import { getChoiceString } from '@/helpers/utils'; import { ExtendedSpace, Proposal } from '@/helpers/interfaces'; -const { shareVote, shareProposalTwitter, shareProposalLenster } = useSharing(); +const { shareVote, shareProposalTwitter, shareProposalHey } = useSharing(); const { web3Account } = useWeb3(); const { userState } = useEmailSubscription(); @@ -27,7 +27,7 @@ const imgPath = computed(() => { : '/stickers/hooray.png'; }); -function share(shareTo: 'twitter' | 'lenster') { +function share(shareTo: 'twitter' | 'hey') { shareVote(shareTo, { space: props.space, proposal: props.proposal, @@ -78,12 +78,12 @@ function share(shareTo: 'twitter' | 'lenster') { class="flex !h-[42px] w-full items-center justify-center gap-2" @click=" props.waitingForSigners - ? shareProposalLenster(space, proposal) - : share('lenster') + ? shareProposalHey(space, proposal) + : share('hey') " > - - {{ $t('shareOnLenster') }} + + {{ $t('shareOnHey') }}
- + {{ item.text }}
diff --git a/src/composables/useSharing.ts b/src/composables/useSharing.ts index dd929e73bf33..9de53f45e486 100644 --- a/src/composables/useSharing.ts +++ b/src/composables/useSharing.ts @@ -11,9 +11,9 @@ export function useSharing() { extras: { icon: 'twitter' } }, { - text: 'Lenster', - action: 'shareProposalLenster', - extras: { icon: 'lenster' } + text: 'Hey', + action: 'shareProposalHey', + extras: { icon: 'hey' } }, { text: t('copyLink'), @@ -40,12 +40,12 @@ export function useSharing() { } function shareVote( - shareTo: 'twitter' | 'lenster', + shareTo: 'twitter' | 'hey', payload: { space: ExtendedSpace; proposal: Proposal; choices: string } ) { const postText = getSharingText(shareTo, payload); - if (window && shareTo === 'lenster') return shareLenster(postText); + if (window && shareTo === 'hey') return shareHey(postText); if (isSupported.value) return share({ title: '', @@ -55,7 +55,7 @@ export function useSharing() { if (window && shareTo === 'twitter') return shareTwitter(postText); } - function getSharingText(shareTo: 'twitter' | 'lenster', payload): string { + function getSharingText(shareTo: 'twitter' | 'hey', payload): string { const isSingleChoice = payload.proposal.type === 'single-choice' || payload.proposal.type === 'basic'; @@ -69,7 +69,7 @@ export function useSharing() { ? `@${payload.space.twitter}` : payload.space.name; - if (shareTo === 'lenster') + if (shareTo === 'hey') return `${encodeURIComponent(votedText)}%20"${encodeURIComponent( payload.proposal.title )}"%20${encodedProposalUrl( @@ -94,8 +94,8 @@ export function useSharing() { window.open(url, '_blank')?.focus(); } - function shareLenster(text) { - const url = `https://lenster.xyz/?text=${text}`; + function shareHey(text) { + const url = `https://hey.xyz/?text=${text}`; window.open(url, '_blank')?.focus(); } @@ -109,8 +109,8 @@ export function useSharing() { ); } - function shareProposalLenster(space, proposal) { - shareLenster( + function shareProposalHey(space, proposal) { + shareHey( `${encodeURIComponent(proposal.title)}%20${encodedProposalUrl( space.id, proposal @@ -126,7 +126,7 @@ export function useSharing() { return { shareProposalTwitter, - shareProposalLenster, + shareProposalHey, shareToClipboard, proposalUrl, shareProposal, diff --git a/src/locales/default.json b/src/locales/default.json index 24374076b690..e795725c38ba 100644 --- a/src/locales/default.json +++ b/src/locales/default.json @@ -167,7 +167,7 @@ "or": "or", "share": "Share", "shareOnTwitter": "Share on Twitter", - "shareOnLenster": "Share on Lenster", + "shareOnHey": "Share on Hey", "createButton": "Create", "discussion": "Discussion", "changeWallet": "Change wallet",