Skip to content

Commit

Permalink
Register update, try Telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Oct 9, 2023
1 parent 08db9b8 commit 5d13e1b
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 231 deletions.
8 changes: 6 additions & 2 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"helmet": {
"directives": {
"defaultSrc": "'self'",
"childSrc": "'self' www.google.com",
"scriptSrc": "'self' 'unsafe-inline' 'unsafe-eval' www.google.com www.gstatic.com",
"childSrc": "'self' www.google.com telegram.org *.telegram.org",
"scriptSrc": "'self' 'unsafe-inline' 'unsafe-eval' www.google.com www.gstatic.com telegram.org *.telegram.org",
"styleSrc": "'self' 'unsafe-inline' fonts.googleapis.com",
"imgSrc": "* data:",
"fontSrc": "data: fonts.gstatic.com",
Expand Down Expand Up @@ -69,6 +69,10 @@
"enabled": true,
"key": "9e9787bd59204b95812bc7e438939616",
"secret": "ca10592646784980a11179cc72146344"
},
"telegram": {
"enabled": true,
"bot_token": "6390290192:AAEGipeCa4P0V4HZzoXvITCij8on6OItsGM"
}
},
"default_client": "blogs",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"passport-facebook": "^3.0.0",
"passport-mail": "^1.0.1",
"passport-mailru-email": "^1.1.3",
"passport-telegram-official": "^2.0.1",
"passport-vk": "^1.0.0",
"passport-yandex": "^0.0.5",
"querystring": "^0.2.1",
Expand All @@ -37,6 +38,7 @@
"react-foundation-components": "git+https://github.com/golos-blockchain/react-foundation-components.git#5dbfb800aff45988c57bb7d09c1c235a8b49b418",
"react-google-recaptcha": "^2.1.0",
"react-intl": "^5.25.1",
"react-telegram-login": "^1.1.2",
"secure-random": "^1.1.1",
"simple-jsonrpc-js": "^1.2.0",
"styled-components": "^5.3.3",
Expand Down
10 changes: 5 additions & 5 deletions src/elements/register/VerifyWayTabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class VerifyWayTabs extends React.Component {

const path = this.getPath()

let email = tt('verify_way_tabs_jsx.email')
if (currentWay === 'email') {
email = <span>{email}</span>
let social = tt('verify_way_tabs_jsx.social')
if (currentWay === 'social') {
social = <span>{social}</span>
} else {
email = <Link href={path}>{email}</Link>
social = <Link href={path}>{social}</Link>
}

let invite = tt('verify_way_tabs_jsx.invite_code')
Expand All @@ -43,7 +43,7 @@ class VerifyWayTabs extends React.Component {
}

return <div style={{ marginBottom: '1.0rem' }}>
{email}
{social}
&nbsp;|&nbsp;
{invite}
&nbsp;|&nbsp;
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"enter_invite_code": "Enter invite code",
"enter_invite_code_optional": "You also can use invite code, if you have it:",
"or_use_socsite": "...or use social site",
"or_use_telegram": "...or use your Telegram account",
"invite_secret_cannot_be_empty": "Invite code cannot be empty",
"invite_new_account_will_receive": "Account will have %(amount)s in Golos Power",
"enter_account_name": "Enter your account name",
Expand Down Expand Up @@ -302,7 +303,7 @@
"frozen3": "this form."
},
"verify_way_tabs_jsx": {
"email": "With Gmail",
"social": "Social",
"invite_code": "Invite-code",
"transfer": "Transfer"
},
Expand Down
3 changes: 2 additions & 1 deletion src/locales/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"enter_invite_code": "Введите ваш инвайт-код",
"enter_invite_code_optional": "Вы также можете использовать инвайт-код, если он у вас есть:",
"or_use_socsite": "...или авторизуйтесь через свой аккаунт",
"or_use_telegram": "...или авторизуйтесь через свой аккаунт Telegram",
"invite_secret_cannot_be_empty": "Инвайт-код не может быть пустым",
"invite_new_account_will_receive": "Созданный аккаунт получит %(amount)s в Силу Голоса",
"enter_account_name": "Введите имя пользователя",
Expand Down Expand Up @@ -302,7 +303,7 @@
"frozen3": "этой формой."
},
"verify_way_tabs_jsx": {
"email": "Gmail-почта",
"social": "Соцсети",
"invite_code": "Инвайт-код",
"transfer": "Перевод с биржи"
},
Expand Down
Loading

0 comments on commit 5d13e1b

Please sign in to comment.