From 9fb68c731c9243a921c640025744cfdee4a6a1fd Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 17 Oct 2023 10:00:04 +0700 Subject: [PATCH 1/3] fix: Replace lenster with hey --- src/assets/icons/hey.svg | 14 ++++++++++++++ src/assets/icons/lenster.svg | 9 --------- src/components/ModalPostVote.vue | 12 ++++++------ src/components/SpaceProposalHeader.vue | 11 ++++------- src/composables/useSharing.ts | 24 ++++++++++++------------ src/locales/default.json | 2 +- 6 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 src/assets/icons/hey.svg delete mode 100644 src/assets/icons/lenster.svg 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", From 6baf09029fe3ae4497418be6bb6196c5f2d11e5e Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 17 Oct 2023 10:38:49 +0700 Subject: [PATCH 2/3] Fix hey svg eyes --- src/assets/icons/hey.svg | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/assets/icons/hey.svg b/src/assets/icons/hey.svg index 72f0ef96a170..501deea5c4a5 100644 --- a/src/assets/icons/hey.svg +++ b/src/assets/icons/hey.svg @@ -1,14 +1,24 @@ - + + + + + + + + + + + + - - - + \ No newline at end of file From 0d52fd82703fdf73647101c2575861fc5e0c1145 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 17 Oct 2023 10:44:07 +0700 Subject: [PATCH 3/3] Fix color --- src/components/ModalPostVote.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ModalPostVote.vue b/src/components/ModalPostVote.vue index ba8635f06388..cb328ecf006f 100644 --- a/src/components/ModalPostVote.vue +++ b/src/components/ModalPostVote.vue @@ -82,7 +82,7 @@ function share(shareTo: 'twitter' | 'hey') { : share('hey') " > - + {{ $t('shareOnHey') }}