Skip to content

Commit

Permalink
Merge pull request #2585 from Giveth/release-2.15.1
Browse files Browse the repository at this point in the history
Release 2.15.1
  • Loading branch information
alireza-sharifpour authored Apr 30, 2023
2 parents c5f7917 + 640b3b4 commit 3784211
Show file tree
Hide file tree
Showing 23 changed files with 344 additions and 68 deletions.
1 change: 0 additions & 1 deletion lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,6 @@
"food": "Menjar",
"grassroots": "Comunitari",
"label.cant_donate": "No podeu fer una donació? Compartiu aquesta pàgina en lloc.",
"label.check_out_on": "Consulteu a",
"label.sign_out": "Sortir",
"label.team": "Equip",
"label.our_mission": "La nostra missió",
Expand Down
1 change: 0 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
"label.copy_link": "Copy Link",
"label.dismiss": "Dismiss",
"label.copied": "Copied!",
"label.check_out_on": "Check out on",
"label.sign_out": "Sign out",
"label.building_the_future_of_giving": "Building the Future of Giving",
"label.join_desc_one": "Giveth is first and foremost a community of givers and changemakers. We are passionate people working together to build a crypto-economic system that can reward giving to good causes. Our project is open-source, decentralized, altruistic, and community-led.",
Expand Down
1 change: 0 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
"label.copy_link": "Copiar Link",
"label.dismiss": "Ignorar",
"label.copied": "Copiado!",
"label.check_out_on": "Echa un vistazo en",
"label.sign_out": "Salir",
"label.building_the_future_of_giving": "Construyendo el Futuro de las Donaciones",
"label.join_desc_one": "Giveth es, ante todo, una comunidad de donantes y agentes de cambio. Somos personas apasionadas que trabajan juntas para construir un sistema cripto-económico que pueda recompensar las donaciones a buenas causas. Nuestro proyecto es de código abierto, descentralizado, altruista y dirigido por la comunidad.",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "givethdapp",
"version": "2.15.0",
"version": "2.15.1",
"private": true,
"scripts": {
"build": "next build",
Expand Down Expand Up @@ -60,7 +60,7 @@
"react-quill": "^2.0.0",
"react-redux": "^8.0.1",
"react-select": "^5.2.1",
"react-share": "^4.4.0",
"react-share": "^4.4.1",
"sharp": "^0.30.5",
"siwe": "^1.1.6",
"styled-components": "^5.3.6",
Expand Down
16 changes: 16 additions & 0 deletions pages/landings/web3-crypto-donation-platform.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { FC } from 'react';
import Head from 'next/head';
import Web3CryptoDonation from '@/components/views/landings/web3CryptoDonation';

const Web3CryptoDonationRoute: FC = () => {
return (
<>
<Head>
<title>Giveth - Web3 Crypto Donation Platform</title>
</Head>
<Web3CryptoDonation />
</>
);
};

export default Web3CryptoDonationRoute;
5 changes: 3 additions & 2 deletions src/components/PFP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@ interface IStyledImageProps {

const StyledImage = styled(Image)<IStyledImageProps>`
transition: box-shadow 0.2s ease, transform 0.2s ease;
border: 0.2754px solid ${brandColors.mustard[500]};
box-shadow: 0px 0.76px 4.6px 1.14px rgba(225, 69, 141, 0.3);
border: 0.18 solid ${brandColors.mustard[500]};
border-radius: 4px;
box-shadow: 0px 0.76px 4.6px 1.14px rgba(225, 69, 141, 0.3);
&:hover {
transform: scale(1.2); // Adjust the scale value as desired
}
${props =>
props.PFPsize === EPFPSize.LARGE &&
css`
border: 0.2754px solid ${brandColors.mustard[500]};
box-shadow: 0px 1.15778px 6.9467px 1.73668px #e1458d;
border-radius: 16px;
`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,43 @@ import styled from 'styled-components';
import { fullPath } from '@/lib/helpers';
import { IProject } from '@/apollo/types/types';
import { slugToProjectView } from '@/lib/routeCreators';
import {
EContentType,
ESocialType,
shareContentCreator,
} from '@/lib/constants/shareContent';

interface ISocialBox {
project: IProject;
isSuccess?: boolean;
contentType: EContentType;
isDonateFooter?: boolean;
}

const SocialBox: FC<ISocialBox> = ({ project, isSuccess }) => {
const SocialBox: FC<ISocialBox> = props => {
const { project, contentType, isDonateFooter } = props;
const { description, slug } = project;
const { formatMessage } = useIntl();
const shareTitleTwitter = `${
isSuccess ? 'This' : 'Our'
} project is raising funds in crypto on @giveth! 🙌
Donate directly on Ethereum Mainnet or @gnosischain w/ no fees or intermediaries.👇`;

const shareTitleFacebookAndLinkedin = `${
isSuccess ? 'This' : 'Our'
} project is raising funds in crypto on @givethio!
Donate directly on Ethereum Mainnet or Gnosis Chain with no fees or intermediaries.
Here's the link to ${isSuccess ? 'this' : 'our'} project:
`;
const shareTitleTwitter = shareContentCreator(
contentType,
ESocialType.twitter,
);
const shareTitleFacebookAndLinkedin = shareContentCreator(
contentType,
ESocialType.facebook,
);

const projectUrl = fullPath(slugToProjectView(slug));

return (
<Social isSuccess={isSuccess}>
<Social isDonateFooter={isDonateFooter}>
<BLead>
{isSuccess
? formatMessage({ id: 'label.share_this' })
: formatMessage({ id: 'label.cant_donate' })}
{isDonateFooter
? formatMessage({ id: 'label.cant_donate' })
: formatMessage({ id: 'label.share_this' })}
</BLead>
<SocialItems>
<SocialItem isSuccess={isSuccess}>
<SocialItem isDonateFooter={isDonateFooter}>
<TwitterShareButton
title={shareTitleTwitter}
url={projectUrl || ''}
Expand All @@ -57,7 +61,7 @@ Donate directly on Ethereum Mainnet or @gnosischain w/ no fees or intermediaries
/>
</TwitterShareButton>
</SocialItem>
<SocialItem isSuccess={isSuccess}>
<SocialItem isDonateFooter={isDonateFooter}>
<LinkedinShareButton
title={shareTitleFacebookAndLinkedin}
summary={description}
Expand All @@ -71,7 +75,7 @@ Donate directly on Ethereum Mainnet or @gnosischain w/ no fees or intermediaries
/>
</LinkedinShareButton>
</SocialItem>
<SocialItem isSuccess={isSuccess}>
<SocialItem isDonateFooter={isDonateFooter}>
<FacebookShareButton
quote={shareTitleFacebookAndLinkedin}
url={projectUrl || ''}
Expand All @@ -97,12 +101,12 @@ const BLead = styled(Lead)`
z-index: 2;
`;

const Social = styled.div<{ isSuccess?: boolean }>`
const Social = styled.div<{ isDonateFooter?: boolean }>`
z-index: 1;
display: flex;
flex-direction: column;
justify-content: center;
margin: ${props => (props.isSuccess ? '50px 0' : '18px 0')};
margin: ${props => (props.isDonateFooter ? '18px 0' : '50px 0')};
color: ${neutralColors.gray[900]};
align-items: center;
`;
Expand All @@ -113,11 +117,11 @@ const SocialItems = styled.div`
justify-content: center;
margin: 8px 0 0 0;
`;
const SocialItem = styled.div<{ isSuccess?: boolean }>`
const SocialItem = styled.div<{ isDonateFooter?: boolean }>`
cursor: pointer;
border-radius: 8px;
padding: ${props => (props.isSuccess ? `0 6px` : '0 12px')};
margin: ${props => (props.isSuccess ? `0 12px` : '0')};
padding: ${props => (props.isDonateFooter ? `0 12px` : '0 6px')};
margin: ${props => (props.isDonateFooter ? '0' : '0 12px')};
`;

export default SocialBox;
7 changes: 4 additions & 3 deletions src/components/UserWithPFPInCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const UserWithPFPInCell: FC<IUserWithPFPInCell> = ({ user }) => {
const name =
user?.name || shortenAddress(user.walletAddress?.toLowerCase());
return pfpToken ? (
<Flex gap='8px'>
<Flex gap='12px' alignItems='center'>
<StyledPFP pfpToken={pfpToken} />
<Bold>{name || '\u200C'}</Bold>
</Flex>
Expand All @@ -24,13 +24,14 @@ export const UserWithPFPInCell: FC<IUserWithPFPInCell> = ({ user }) => {
);
};
const StyledPFP = styled(PFP)`
margin-left: 8px;
margin-top: 5px;
margin-left: 5px;
`;

const Bold = styled.span`
font-weight: 500;
`;

const NoAvatar = styled.span`
padding-left: 40px;
padding-left: 44px;
`;
33 changes: 22 additions & 11 deletions src/components/modals/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import {
neutralColors,
OutlineButton,
} from '@giveth/ui-design-system';

import { useIntl } from 'react-intl';
import { FC } from 'react';

import { Modal } from './Modal';
import FacebookIcon from '../../../public/images/social-fb.svg';
import LinkedinIcon from '../../../public/images/social-linkedin.svg';
Expand All @@ -25,16 +26,32 @@ import { IModal } from '@/types/common';
import CopyLink from '@/components/CopyLink';
import { fullPath } from '@/lib/helpers';
import { useModalAnimation } from '@/hooks/useModalAnimation';
import {
EContentType,
ESocialType,
shareContentCreator,
} from '@/lib/constants/shareContent';

interface IShareModal extends IModal {
projectHref: string;
contentType: EContentType;
}

const ShareModal = ({ projectHref, setShowModal }: IShareModal) => {
const ShareModal: FC<IShareModal> = props => {
const { projectHref, setShowModal, contentType } = props;
const url = fullPath(slugToProjectView(projectHref));
const { isAnimating, closeModal } = useModalAnimation(setShowModal);
const { formatMessage } = useIntl();

const shareTitleTwitter = shareContentCreator(
contentType,
ESocialType.twitter,
);
const shareTitleFacebookAndLinkedin = shareContentCreator(
contentType,
ESocialType.facebook,
);

return (
<Modal
closeModal={closeModal}
Expand All @@ -51,19 +68,15 @@ const ShareModal = ({ projectHref, setShowModal }: IShareModal) => {
<SocialButtonContainer>
<TwitterShareButton
hashtags={['giveth']}
title={`${formatMessage({
id: 'label.check_out_on',
})} @giveth`}
title={shareTitleTwitter}
url={url}
>
<Image src={TwitterIcon} alt='twitter icon' />
</TwitterShareButton>
</SocialButtonContainer>
<SocialButtonContainer>
<LinkedinShareButton
title={`${formatMessage({
id: 'label.check_out_on',
})} @Givethio`}
title={shareTitleFacebookAndLinkedin}
url={url}
>
<Image src={LinkedinIcon} alt='twitter icon' />
Expand All @@ -72,9 +85,7 @@ const ShareModal = ({ projectHref, setShowModal }: IShareModal) => {
<SocialButtonContainer>
<FacebookShareButton
hashtag='#giveth'
quote={`${formatMessage({
id: 'label.check_out_on',
})} @Givethio`}
quote={shareTitleFacebookAndLinkedin}
url={url}
>
<Image src={FacebookIcon} alt='facebook icon' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
} from '@/features/user/user.slice';
import { slugToProjectView } from '@/lib/routeCreators';
import { EModalEvents, useModalCallback } from '@/hooks/useModalCallback';
import { EContentType } from '@/lib/constants/shareContent';

interface IProjectCardLikeAndShareButtons {
project: IProject;
Expand Down Expand Up @@ -123,7 +124,11 @@ const ProjectCardLikeAndShareButtons = (
return (
<>
{showModal && (
<ShareModal setShowModal={setShowModal} projectHref={slug} />
<ShareModal
contentType={EContentType.thisProject}
setShowModal={setShowModal}
projectHref={slug}
/>
)}
<BadgeWrapper>
<Flex gap='6px'>
Expand Down
4 changes: 2 additions & 2 deletions src/components/project-card/ProjectCardUserName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const ProjectCardUserName: FC<IProjectCardUserName> = ({
)}
>
{pfpToken ? (
<Flex gap='8px'>
<Flex gap='8px' alignItems='center'>
<PFP pfpToken={pfpToken} />
<Author bold size='Big'>
{name || '\u200C'}
Expand All @@ -62,7 +62,7 @@ interface IAuthor {

const Author = styled(GLink)<IAuthor>`
color: ${neutralColors.gray[700]};
margin-bottom: 16px;
margin-bottom: 9px;
display: block;
font-weight: ${props => (props.bold ? 500 : 400)};
`;
21 changes: 16 additions & 5 deletions src/components/views/create/SuccessfulCreation.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
import React, { Dispatch, SetStateAction, useEffect } from 'react';
import { brandColors, Button, H2, Lead, P } from '@giveth/ui-design-system';
import {
brandColors,
Button,
Col,
Container,
H2,
Lead,
P,
Row,
} from '@giveth/ui-design-system';
import Link from 'next/link';
import styled from 'styled-components';
import { useIntl } from 'react-intl';

import { Col, Row, Container } from '@giveth/ui-design-system';
import ProjectCard from '@/components/project-card/ProjectCardAlt';
import { IProject } from '@/apollo/types/types';
import { slugToProjectView } from '@/lib/routeCreators';
import SocialBox from '@/components/views/donate/SocialBox';
import SocialBox from '@/components/SocialBox';
import CopyLink from '@/components/CopyLink';
import { mediaQueries } from '@/lib/constants/constants';
import { fullPath } from '@/lib/helpers';
import { setShowFooter } from '@/features/general/general.slice';
import { useAppDispatch } from '@/features/hooks';
import CongratsAnimation from '@/animations/congrats.json';
import LottieControl from '@/components/LottieControl';
import { EContentType } from '@/lib/constants/shareContent';

const SuccessfulCreation = (props: {
project: IProject;
Expand Down Expand Up @@ -63,7 +71,10 @@ const SuccessfulCreation = (props: {
<br />
<br />
<br />
<SocialBox project={project} isSuccess />
<SocialBox
project={project}
contentType={EContentType.ourProject}
/>
<br />
<P>
{formatMessage({
Expand Down
Loading

1 comment on commit 3784211

@vercel
Copy link

@vercel vercel bot commented on 3784211 Apr 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

giveth-dapps-v2 – ./

giveth-dapps-v2-git-main-givethio.vercel.app
giveth.io
giveth-dapps-v2-givethio.vercel.app
www.giveth.io

Please sign in to comment.