Skip to content

Commit

Permalink
Merge pull request #235 from edenia/dev
Browse files Browse the repository at this point in the history
Production Release
  • Loading branch information
xavier506 authored Dec 22, 2022
2 parents d0214a2 + 8ff4df9 commit 63160c4
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ NEXT_PUBLIC_UAL_API_PROTOCOL=https
NEXT_PUBLIC_UAL_API_HOST=jungle4.api.eosnation.io
NEXT_PUBLIC_UAL_API_PORT=443
NEXT_PUBLIC_UAL_CHAIN_ID=73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d
NEXT_PUBLIC_EDEN_MEMBER_URL=https://eden.edenia.cloud/members/
NEXT_PUBLIC_EDEN_BLOCK_EXPLORER_URL=https://bloks.io
NEXT_PUBLIC_EDEN_API_HOST=https://eden-api.edenia.cloud/v1/graphql

# Backend
EOSRATE_GET_STATS_URL=http://localhost:8080/api/rest/get-rates-stats
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/images/preview-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/preview-image.png
Binary file not shown.
8 changes: 5 additions & 3 deletions public/locales/cn/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@
"homeMetaTitle": "主页",
"noEdenMember": "您必须是 Eden 会员才能登录",
"voteBPs": "投票给 BP",
"viewDeck": "下载介绍PDF",
"whitepaper": "白皮书",
"title": {
"first": "做出明智选择",
"second": "选择 Eden 智能代理"
"first": "选择透明性",
"second": "选择Eden智能代理"
},
"signInLabel": "给节点打分",
"description": "Eden Smart Proxy是一个 EOS BP 投票代理,通过利用 Eden 的分形民主式治理,最大限度地提高了 EOS 持有者的发言权。只有公布了自己身份的 Eden 成员才有资格对投票给 BP 的代理人有发言权"
"description": "Eden Smart Proxy 是一个 EOS BP 投票代理,旨在最大化个人 EOS 持有者的声音,利用同行审查的责任,奖励白名单 BP,并为所有代币质押者提供低风险的 APR"
},
"footer": {
"communityOwnedPublic": "由以下人员开发的社区拥有的公共物品",
Expand Down
6 changes: 4 additions & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@
"homeMetaTitle": "Home",
"noEdenMember": "You must be an Eden member to be able to sign in.",
"voteBPs": "Vote for BPs",
"viewDeck": "View the Deck",
"whitepaper": "Whitepaper",
"title": {
"first": "Choose Wisely",
"first": "Delegate for Accountability",
"second": "Choose Eden Smart Proxy"
},
"signInLabel": "Sign in and rank BPs",
"description": "Eden Smart Proxy is a EOS BP voting proxy that maximizes voice of individual EOS holders by leveraging peer-vetted accountability of Eden members."
"description": "ESPx aims to maximize the voice of individual EOS holders, leverage peer-vetted accountability, reward whitelisted BPs, and provide low-risk APR for all token stakers."
},
"footer": {
"communityOwnedPublic": "A Community Owned Public Good Developed by",
Expand Down
6 changes: 4 additions & 2 deletions public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@
"homeMetaTitle": "Inicio",
"noEdenMember": "Debe ser miembro de Eden para registrarse",
"voteBPs": "Vota por BPs",
"viewDeck": "Ver el Deck",
"whitepaper": "Documento técnico",
"title": {
"first": "Elige sabiamente",
"first": "Delegue para la rendición de cuentas",
"second": "Elija Eden Smart Proxy"
},
"signInLabel": "Inicie sesión y vote",
"description": "EdenBPsProxy es un proxy de votación de EOS BP que maximiza la voz de los titulares individuales de EOS al aprovechar su voz con el proceso de democracia fractal de Eden. Solo los miembros de Edens que revelaron su identidad serán elegibles para opinar sobre el proxy que votos BPs."
"description": "El Eden Smart Proxy es un EOS BP Voting Proxy que tiene como objetivo maximizar la voz de los titulares individuales de EOS, aprovechar la responsabilidad examinada por pares, recompensar a los BP incluidos en la lista blanca y proporcionar APR de bajo riesgo para todos los tokens."
},
"footer": {
"communityOwnedPublic": "Un bien publico comunitario desarrollado por",
Expand Down
7 changes: 5 additions & 2 deletions public/locales/ko/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,16 @@
"home": {
"homeMetaTitle": "메인",
"noEdenMember": "에덴 회원만 로그인 가능합니다.",
"voteBPs": "投票给 BP",
"viewDeck": "소개 PDF",
"whitepaper": "라이트페이퍼 보기",
"title": {
"first": "스마트하게 선택하세요.",
"first": "책임성에 스테이킹 하세요",
"second": "에덴 스마트 프록시를 선택하세요."
},
"buttonLabel": "투표 위임",
"signInLabel": "로그인하여 BP 투표",
"description": "에덴 스마트 프록시는 에덴의 상호간 신원인증 및 프랙탈 민주주의 프로세스를 통해 EOS BP 거버넌스의 신뢰성을 높이는 프록시입니다. 신원이 공개된 에덴 선거 참여자만이 BP 투표에 발언권을 가집니다."
"description": "Eden 스마트 프록시는 개별 EOS 보유자의 목소리를 극대화하고, 동료 검증된 책임을 활용하고, 화이트리스트에 있는 BP에게 보상하고, 모든 토큰 스테이커에게 저위험 APR을 제공하는 것을 목표로 하는 EOS BP 투표 프록시입니다."
},
"footer": {
"communityOwnedPublic": "에 의해 개발된 커뮤니티 소유의 공공재",
Expand Down
34 changes: 34 additions & 0 deletions src/components/Home/Body/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import clsx from 'clsx'

import { BaseSnackbar, DelegateButton } from 'components'
import { useSharedState } from 'context/state.context'
import { homePageConstants } from 'config/constants'
import AuthButton from '../../AuthUAL'

import useStyles from './styles'
Expand Down Expand Up @@ -38,6 +39,27 @@ const Body: React.FC = () => {
[message]
)

const getDeck = () => {
return homePageConstants.decks[router.locale || 'en']
}

const getAnnouncing = () => {
return homePageConstants.announcing[router.locale || 'en']
}

const downloadFile = async (getPDF: any, fileName?: string) => {
const href = getPDF
const aComponent = document.createElement('a')
aComponent.setAttribute(
'download',
fileName ? fileName : href.split('/')[2]
)
aComponent.href = href
aComponent.setAttribute('target', '_blank')
aComponent.click()
URL.revokeObjectURL(href)
}

useEffect(() => {
if (!state?.validUser) return

Expand Down Expand Up @@ -68,6 +90,18 @@ const Body: React.FC = () => {
<div
className={clsx(classes.buttonContainer, classes.spaceTopComponents)}
>
<Button
onClick={() => downloadFile(getDeck(), 'Eden Smart-Proxy Deck.pdf')}
label={t('home.viewDeck')}
variant='secondary'
/>
<Button
onClick={() => downloadFile(getAnnouncing())}
label={t('home.whitepaper')}
variant='secondary'
/>
</div>
<div className={clsx(classes.buttonContainer)}>
{!state?.ual?.activeUser?.accountName || !state?.validUser ? (
<AuthButton
setMessage={setMessage}
Expand Down
18 changes: 17 additions & 1 deletion src/components/Voters/Body/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ImgLoading from '../../ImageLoad'
import { GET_MEMBERS_DATA } from '../../../gql/voters.gql'
import { BodyVoters, IMembersData } from '../../../@types/member'
import { genesisEdenUtil } from 'utils'
import telegramLogo from '/public/icons/telegram-grey-icon.png'

import useStyles from './styles'

Expand Down Expand Up @@ -100,7 +101,22 @@ const Body: React.FC<BodyVoters> = ({ searchValue = '' }) => {
}
avatarIcon={delegate?.rank?.badge}
headItem={<Image src={delegate.voteState?.img} />}
/*add variable*/
selectableItems={
<div className={classes.selectableItemsBox}>
<Image src={telegramLogo} height={14} width={14} />
<a
className={classes.aStyle}
href={`https://www.t.me/${delegate?.profile?.social?.telegram?.replace(
'@',
''
)}`}
rel='noreferrer'
target='_blank'
>
{delegate?.profile?.social?.telegram?.replace('@', '')}
</a>
</div>
}
profileLink={`${process.env.NEXT_PUBLIC_EDEN_MEMBER_URL}${delegate?.account}`}
targetProfile='_blank'
positionText={`${delegate?.rank?.label} - ${t(
Expand Down
8 changes: 8 additions & 0 deletions src/components/Voters/Body/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ const Styles = makeStyles(theme => ({
},
itemActionStyle: {
width: '110px'
},
selectableItemsBox: { display: 'flex', alignItems: 'center' },
aStyle: {
fontSize: 14,
color: 'rgba(0, 0, 0, 0.6)',
fontWeight: 300,
textDecoration: 'none',
paddingLeft: theme.spacing(1)
}
}))

Expand Down
6 changes: 6 additions & 0 deletions src/config/constants/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ const footerItems = [
ref: 'https://github.com/edenia/Eden',
target: '_blank',
text: 'EdenOS Github Repo'
},
{
underline: 'none',
ref: 'https://medium.com/@EdenSmartProxy/espx-a-win-win-for-eos-331a76de3b72',
target: '_blank',
text: 'Blog'
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions src/config/constants/homePage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const decks = {
ko: 'docs/decks/Eden Smart-Proxy Korean Deck.pdf',
en: 'docs/decks/Eden Smart-Proxy English Deck.pdf',
es: 'docs/decks/Eden Smart-Proxy English Deck.pdf',
cn: 'docs/decks/Eden Smart-Proxy Chinese Deck.pdf'
}

const announcing = {
ko: 'docs/announcing/에덴 스마트 프록시 라이트페이퍼(초벌번역).pdf',
en: 'docs/announcing/Announcing Eden Smart Proxy.pdf',
es: 'docs/announcing/Anuncio Eden Smart Proxy.pdf',
cn: 'docs/announcing/宣布 Eden 智能代理.pdf'
}

export default { decks, announcing }
1 change: 1 addition & 0 deletions src/config/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as footer } from './footer'
export { default as bpsInfo } from './bpjson'
export { default as homePageConstants } from './homePage'
export { default as socialMediaInfo } from './socialMediaLink'
5 changes: 3 additions & 2 deletions src/config/seo/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DefaultSeoProps } from 'next-seo'
const title = 'Eden Smart Proxy'
const description = 'Eden Smart Proxy.'
const description =
'The Eden Smart Proxy is an EOS BP Voting Proxy that aims to maximize the voice of individual EOS holders, leverage peer-vetted accountability, reward whitelisted BPs, and provide low-risk APR for all token stakers.'
const url = 'https://proxy.eden.eoscommunity.org'

const SEO: DefaultSeoProps = {
Expand All @@ -17,7 +18,7 @@ const SEO: DefaultSeoProps = {
site_name: 'Eden Smart Proxy',
images: [
{
url: `${url}/images/preview-image.png`,
url: `${url}/images/preview-image.jpg`,
alt: title
}
]
Expand Down

0 comments on commit 63160c4

Please sign in to comment.