aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src')
-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/>