aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/static
diff options
context:
space:
mode:
authorGravatar Killy2017-10-26 22:43:30 +0300
committerGravatar Killy2017-10-26 22:43:30 +0300
commit58fb6ee38de4b00a66319ce3b6a1d8ef4c7dbdcf (patch)
treede2ae8b9b034f4770a6724bab0e9dcddc9a9b100 /juick-www/src/main/static
parentb7545f62d85f0f9826486e6435d3b49fd7784456 (diff)
www: evilIcons cleanup, fb login i18n
Diffstat (limited to 'juick-www/src/main/static')
-rw-r--r--juick-www/src/main/static/scripts.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index 0660a34c..160d7fe4 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -46,8 +46,9 @@ function autosize(el) {
el.attachEvent('onkeyup', () => resize(el));
}
}
-function svgIconHtml(name) {
- return `<div class="icon icon--ei-${name} icon--s "><svg class="icon__cnt"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ei-${name}-icon"></use></svg></div>`;
+
+function evilIcon(name) {
+ return `<div class="icon icon--${name}"><svg class="icon__cnt"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#${name}-icon"></use></svg></div>`;
}
/* eslint-disable only-ascii/only-ascii */
@@ -72,6 +73,7 @@ const translations = {
'loginDialog.registeredAlready': 'Registered already?',
'loginDialog.username': 'Username',
'loginDialog.password': 'Password',
+ 'loginDialog.facebook': 'Login with Facebook',
'loginDialog.vk': 'Login with VK',
'error.error': 'Error'
},
@@ -95,6 +97,7 @@ const translations = {
'loginDialog.registeredAlready': 'Уже зарегистрированы?',
'loginDialog.username': 'Имя пользователя',
'loginDialog.password': 'Пароль',
+ 'loginDialog.facebook': 'Войти через Facebook',
'loginDialog.vk': 'Войти через ВКонтакте',
'error.error': 'Ошибка'
}
@@ -435,9 +438,9 @@ function showMessageLinksDialog(mid, rid) {
${i18n('shareDialog.messageNumber')}: <div onclick="this.selectText()" class="dialogl">${mlink}</div>
${i18n('shareDialog.share')}:
<ul>
- <li><a href="https://www.facebook.com/sharer/sharer.php?u=${hlinkenc}" onclick="return openSocialWindow(this)">${svgIconHtml('sc-facebook')}</a></li>
- <li><a href="https://twitter.com/intent/tweet?url=${hlinkenc}" onclick="return openSocialWindow(this)">${svgIconHtml('sc-twitter')}</a></li>
- <li><a href="https://vk.com/share.php?url=${hlinkenc}" onclick="return openSocialWindow(this)">${svgIconHtml('sc-vk')}</a></li>
+ <li><a href="https://www.facebook.com/sharer/sharer.php?u=${hlinkenc}" onclick="return openSocialWindow(this)">${evilIcon('ei-sc-facebook')}</a></li>
+ <li><a href="https://twitter.com/intent/tweet?url=${hlinkenc}" onclick="return openSocialWindow(this)">${evilIcon('ei-sc-twitter')}</a></li>
+ <li><a href="https://vk.com/share.php?url=${hlinkenc}" onclick="return openSocialWindow(this)">${evilIcon('ei-sc-vk')}</a></li>
</ul>
</div>`;
@@ -525,8 +528,8 @@ function openDialogLogin() {
let html = `
<div class="dialoglogin">
<p>${i18n('loginDialog.pleaseIntroduceYourself')}:</p>
- <a href="/_fblogin" id="signfb">${svgIconHtml('sc-facebook')}Login with Facebook</a>
- <a href="/_vklogin" id="signvk">${svgIconHtml('sc-vk')}${i18n('loginDialog.vk')}</a>
+ <a href="/_fblogin" id="signfb">${evilIcon('ei-sc-facebook')}${i18n('loginDialog.facebook')}</a>
+ <a href="/_vklogin" id="signvk">${evilIcon('ei-sc-vk')}${i18n('loginDialog.vk')}</a>
<p>${i18n('loginDialog.registeredAlready')}</p>
<form action="/login" method="POST">
<input class="signinput" type="text" name="username" placeholder="${i18n('loginDialog.username')}"/><br/>