convert login.html to #/login modal

This commit is contained in:
Simon Grim 2017-02-02 14:17:10 +05:00
parent 1ae8e6be3e
commit b1646914cb
19 changed files with 748 additions and 836 deletions

View File

@ -1408,8 +1408,7 @@ ol.toptrends-list {
border: solid 1px rgba( 69, 71, 77, .05 );
padding: 10px;
}
.singleBlock h2, .header-bold
{
.singleBlock h2 {
font-weight: bold;
line-height: 40px;
color: rgba( 255, 255, 255, 1 );
@ -1480,76 +1479,6 @@ ol.toptrends-list {
margin-right: 20px;
}
/*************************************
************* LOGIN PAGE *************
**************************************/
.login .header-bold {
display: block;
width: 720px;
margin: 0px auto 12px auto;
}
.login .module {
display: block;
width: 720px;
padding: 32px 40px;
margin: 8px auto;
background: #fff;
}
.login .module p {
margin-bottom: 5px;
}
.login .module input {
padding: 5px 10px;
background: #f3f3f3;
border: solid 1px #dcdcdc;
transition: box-shadow 0.3s, border 0.3s;
font-size: 14px;
}
.login .module input:focus, .login .module select:focus {
background: #fff;
transition: background-color 100ms linear;
border: solid 1px rgba( 227, 79, 66, .5 );
box-shadow: 0 0 10px rgba(0, 0, 0, .3 );
}
.login .module select {
height: 30px;
padding: 3px 30px 3px 10px;
margin: 0;
border: 1px solid #ccc;
font-size: 14px;
}
.login .module span.availability {
margin-left: 10px;
color: #45474d;
}
.with-nickname, .import-secret-key, .create-user {
margin-top: 10px;
}
.login .module:nth-child(2) div ,
.login .module:nth-child(3) div:nth-child(2),
.login .secret-key-import,
.login .username-import {
margin-top: 20px;
margin-bottom: 20px;
margin-left: 16px;
}
.login .create-user,
.login .import-secret-key {
display: block;
margin-left: auto;
margin-right: 16px;
}
/*************************************
************* POPUP MODAL ************
**************************************/
@ -1580,12 +1509,12 @@ ol.toptrends-list {
font-weight: bold;
}
.modal-wrapper .modal-content {
.modal-content {
background: #fff;
overflow-y: auto;
}
.modal-wrapper .modal-blackout {
.modal-blackout {
background: rgba(0,0,0, .6);
z-index: -1;
position: fixed;
@ -1673,6 +1602,60 @@ ol.toptrends-list {
margin-top: 4px;
}
/*************************************
******* LOGIN TO ACCOUNT MODAL *******
**************************************/
.login-modal.modal-wrapper {
height: auto; /*about 580px*/
margin-top: -290px;
}
.login-modal .module {
margin: 4px;
}
.login-modal .module > div {
width: 100%;
margin: 4px 0;
padding: 4px 12px;
}
.login-modal .module > div:last-child {
text-align: right;
margin: 8px 0;
}
.login-modal .module input {
border: solid 1px rgba(0, 0, 0, .3);
border-radius: 3px;
width: 320px;
margin: 12px 16px;
padding: 2px 4px;
}
.login-modal .module select {
border: solid 1px rgba(0, 0, 0, .3);
border-radius: 3px;
width: 310px;
margin: 12px 16px;
padding: 2px 4px;
}
.login-modal .module input:focus, .login-modal .module select:focus {
border: solid 1px rgba(227, 79, 66, .5);
}
.login-modal .module .secret-key {
width: 500px;
}
.login-modal .module .availability {
color: #45474D;
display: inline-block;
margin-left: 16px;
}
/*************************************
******** DIRECT MESSAGES MODAL *******
**************************************/
@ -1867,38 +1850,6 @@ ol.toptrends-list {
margin: 8px 8px 0;
}
/*************************************
*********** NEW USER MODAL ***********
**************************************/
.new-user.modal-wrapper {
width: 720px;
height: 580px;
margin: -290px 0 0 -360px;
}
.new-user .modal-content {
padding: 25px;
}
.new-user .modal-close {
display: none;
}
.new-user .text {
margin: 0 0 15px 0;
}
.new-user .emphasis {
font-size: 18px;
text-align: center;
}
.new-user .secret-key {
color: rgba(.5,0,0, 1.0);
font-weight: bold;
}
/*************************************
************ HASHTAG MODAL ***********
**************************************/
@ -2033,7 +1984,7 @@ ol.toptrends-list {
}
.prompt-wrapper .modal-buttons {
margin: 4px 16px;
padding: 4px 16px 16px;
text-align: right;
}
@ -2053,12 +2004,19 @@ ol.toptrends-list {
.confirm-popup .message {
text-align: center;
margin: 12px;
padding: 12px;
}
.confirm-popup .modal-buttons {
text-align: center;
padding: 4px;
}
/*************************************
********* NEW ACCOUNT POPUP **********
**************************************/
.new-account-briefing.prompt-wrapper {
margin-top: -164px;
}
/*************************************

View File

@ -53,9 +53,9 @@
<a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="#/login">Change user</a>
<a class="dropdown-menu-item updates-check-client">Check for client's updates</a>
<a class="dropdown-menu-item dropdown-menu-following" href="#following">Following users</a>
<a class="dropdown-menu-item" href="login.html">Change user</a>
<a class="dropdown-menu-item promoted-posts-only selectable_theme theme_original theme_calm" href="#">Switch to Promoted posts</a>
<a class="dropdown-menu-item direct-messages selectable_theme theme_original theme_calm" href="#">Direct Messages</a>
<a class="dropdown-menu-item groupmessages selectable_theme theme_original theme_calm" href="#">Group Messages</a>
@ -458,11 +458,12 @@
</div>
<div class="prompt-wrapper">
<div class="modal-header">
<h3></h3>
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
<div class="modal-header">
<h3></h3>
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
<div class="modal-blackout"></div>
</div>
<div id="confirm-popup-template">
@ -473,6 +474,42 @@
</div>
</div>
<div id="template-login-modal">
<div class="module">
<div>
<p class="label">Existing local users</p>
<select class="local-usernames"></select>
</div>
<div>
<button class="login">Login</button>
</div>
</div>
<div class="module create-account">
<div>
<p class="label">Create a new user</p>
<input class="alias" type="textbox" placeholder="Type nickname here"></input>
<div class="availability"></div>
</div>
<div>
<button class="check" disabled="disabled">Check availability</button>
<button class="create" disabled="disabled">Create this nickname</button>
</div>
</div>
<div class="module import-account">
<div>
<p class="label">Import secret key</p>
<input class="secret-key" type="textbox" placeholder="52-characters secret" size="52"></input>
</div>
<div>
<p class="label">With nickname</p>
<input class="alias" type="textbox" placeholder="Type nickname here"></input>
</div>
<div>
<button class="import" disabled="disabled">Import key</button>
</div>
</div>
</div>
<div id="reTwist-modal-template">
<div class="post-area">
<form class="post-area-new open">

View File

@ -18,6 +18,7 @@ var twister = {
},
modal: {},
var: {
localAccounts: [],
updatesCheckClient: {}
}
};
@ -58,6 +59,9 @@ function openModal(modal) {
modal.self = $('#templates ' + modal.classBase).clone(true)
.addClass(modal.classAdd);
if (modal.removeBlackout)
modal.self.find('.modal-blackout').remove();
if (modal.title)
modal.self.find('.modal-header h3').html(modal.title);
if (modal.content)
@ -305,8 +309,9 @@ function confirmPopup(req) {
var modal = openModal({
classBase: '.prompt-wrapper',
classAdd: 'confirm-popup',
classAdd: req.classAdd ? 'confirm-popup ' + req.classAdd : 'confirm-popup',
content: $('#confirm-popup-template').children().clone(true),
removeBlackout: !req.addBlackout,
title: req.txtTitle
});
@ -361,6 +366,8 @@ function confirmPopup(req) {
btn.on('click', {cbFunc: req.cbClose, cbReq: req.cbCloseReq}, closePrompt);
}
}
return modal;
}
function alertPopup(req) {
@ -377,7 +384,7 @@ function alertPopup(req) {
req.removeCancel = true;
}
confirmPopup(req);
return confirmPopup(req);
}
function checkNetworkStatusAndAskRedirect(cbFunc, cbReq) {
@ -419,6 +426,94 @@ function timeSincePost(t) {
return polyglot.t('time_ago', {time: expression});
}
function openModalLogin() {
var modal = openModal({
classAdd: 'login-modal',
content: twister.tmpl.loginMC.clone(true),
title: polyglot.t('twister login')
});
}
function handleClickAccountLoginLogin(event) {
loginToAccount($(event.target).closest('.module').find('select.local-usernames').val());
}
function handleInputAccountCreateSetReq(event) {
var container = $(event.target).closest('.module');
container.find('.availability').text('');
$.MAL.enableButton(container.find('.check'));
$.MAL.disableButton(container.find('.create'));
}
function handleClickAccountCreateCheckReq(event) {
var container = $(event.target).closest('.module');
var peerAliasElem = container.find('.alias');
var peerAlias = peerAliasElem.val().toLowerCase();
var availField = container.find('.availability');
peerAliasElem.val(peerAlias);
$.MAL.disableButton(container.find('.check'));
if (!peerAlias.length)
return;
if (peerAlias.length > 16) {
availField.text(polyglot.t('Must be 16 characters or less.'));
return;
}
// check for non-alphabetic characters and space
if (peerAlias.search(/[^a-z0-9_]/) !== -1) {
availField.text(polyglot.t('Only alphanumeric and underscore allowed.'));
return;
}
availField.text(polyglot.t('Checking...'));
dumpPubkey(peerAlias,
function(req, ret) {
if (ret) {
req.container.find('.availability').text(polyglot.t('Not available'));
} else {
req.container.find('.availability').text(polyglot.t('Available'));
$.MAL.enableButton(req.container.find('.create'));
}
}, {container: container}
);
}
function handleClickAccountCreateCreate(event) {
var container = $(event.target).closest('.module');
var peerAlias = container.find('.alias').val().toLowerCase();
if (twister.var.localAccounts.indexOf(peerAlias) < 0) {
createAccount(peerAlias);
} else {
// user exists in wallet but transaction not sent
dumpPrivkey(peerAlias,
function (req, ret) {
$.MAL.processCreateAccount(req.peerAlias, ret);
}, {peerAlias: peerAlias}
);
}
}
function handleInputAccountImportSetReq(event) {
var container = $(event.target).closest('.module');
if (container.find('.secret-key').val().length === 52
&& container.find('.alias').val().toLowerCase().length)
$.MAL.enableButton(container.find('.import'));
else
$.MAL.disableButton(container.find('.import'));
}
function handleClickAccountImportImport(event) {
var container = $(event.target).closest('.module');
importAccount(container.find('.alias').val().toLowerCase(), container.find('.secret-key').val())
}
function openGroupProfileModalWithNameHandler(groupAlias) {
var modal = openModal({
classAdd: 'profile-modal',
@ -1260,6 +1355,8 @@ function loadModalFromHash() {
openGroupMessagesNewGroupModal();
else if (hashstring === '#groupmessages+joingroup')
openGroupMessagesJoinGroupModal();
else if (hashstring === '#/login')
openModalLogin();
else if (hashstring === '#whotofollow')
openWhoToFollowModal();
else if (hashstring === '#/uri-shortener')
@ -2593,7 +2690,7 @@ function initInterfaceCommon() {
})
;
$('.modal-close, .modal-blackout').not('.prompt-close').on('click', closeModal);
getElem('.modal-wrapper .modal-close, .modal-wrapper .modal-blackout').on('click', closeModal);
$('.minimize-modal').on('click', function (event) {
minimizeModal($(event.target).closest('.modal-wrapper'));
@ -2765,18 +2862,6 @@ function inputEnterActivator(event) {
.attr('disabled', elemEvent.val().trim() === '');
}
function importSecretKeypress(event) { // FIXME rename
var elemModule = $(event.target).closest('.module');
var elemEnter = elemModule.find('.import-secret-key');
var secretKey = elemModule.find('.secret-key-import').val();
var peerAlias = elemModule.find('.username-import').val().toLowerCase();
if (secretKey.length === 52 && peerAlias.length)
$.MAL.enableButton(elemEnter);
else
$.MAL.disableButton(elemEnter);
}
function pasteToTextarea(ta, p) {
if (!ta || typeof ta.val !== 'function') return;
@ -2834,6 +2919,16 @@ $(document).ready(function () {
if ($.localStorage.isSet('twistaURIs'))
twister.URIs = $.localStorage.get('twistaURIs');
twister.html.blanka.appendTo('body').hide();
twister.tmpl.loginMC = extractTemplate('#template-login-modal');
twister.tmpl.loginMC.find('.login').on('click', handleClickAccountLoginLogin);
var module = twister.tmpl.loginMC.closest('.create-account');
module.find('.alias').on('input', handleInputAccountCreateSetReq);
module.find('.check').on('click', handleClickAccountCreateCheckReq);
module.find('.create').on('click', handleClickAccountCreateCreate);
module = twister.tmpl.loginMC.closest('.import-account');
module.find('.secret-key').on('input', handleInputAccountImportSetReq);
module.find('.alias').on('input', handleInputAccountImportSetReq);
module.find('.import').on('click', handleClickAccountImportImport);
twister.tmpl.followersList = extractTemplate('#template-followers-list');
twister.tmpl.followersPeer = extractTemplate('#template-followers-peer');
twister.tmpl.followingList = extractTemplate('#template-following-list');
@ -2892,9 +2987,7 @@ $(document).ready(function () {
var path = window.location.pathname;
var page = path.split("/").pop();
if (page.indexOf("login.html") === 0) {
initInterfaceLogin();
} else if (page.indexOf("network.html") === 0) {
if (page.indexOf('network.html') === 0) {
initInterfaceNetwork();
} else if (page.indexOf('options.html') === 0) {
initInterfaceCommon();

View File

@ -49,8 +49,7 @@ var InterfaceFunctions = function() {
//$("span.screen-name").text('@' + user);
var $miniProfile = $(".mini-profile");
if (!defaultScreenName) {
$(".userMenu-profile > a").text(polyglot.t("Login"));
$(".userMenu-profile > a").attr("href","login.html");
$('.userMenu-profile > a').attr('href', '#/login').text(polyglot.t('Login'));
$(".post-area-new > textarea").attr("placeholder",polyglot.t("You have to log in to post messages."));
$(".post-area-new > textarea").attr("disabled","true");
$miniProfile.find(".mini-profile-name").text("guest");

View File

@ -201,6 +201,15 @@ if(preferredLanguage == "en"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Updating status...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Other peers have not yet accepted this new user.\n" +
"Unfortunately it is not possible to save profile\n" +
"or send any posts in this state.\n\n" +
@ -561,6 +570,15 @@ if(preferredLanguage == "es"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Actualización del estado ...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Otros pares no han aceptado este nuevo usuario.\n" +
"Por desgracia, no es posible guardar el perfil\n" +
"o enviar ningún mensaje en este estado.\n\n" +
@ -919,6 +937,15 @@ if(preferredLanguage == "uk"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Оновлення статусу...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Триває підтвердження нового користувача.\n" +
"У цей час не можна редагувати профіль та надсилати повідомлення.\n\n" +
"Будь ласка, зачекайте декілька хвилин.\n" +
@ -1273,6 +1300,15 @@ if(preferredLanguage == "zh-CN"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "状态更新中...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "其他节点还没有接受这个新用户。\n" +
"很抱歉,现在你还不能保存你的个人简介\n" +
"或发送新的推文。\n\n" +
@ -1633,6 +1669,15 @@ if(preferredLanguage == "nl"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Status aan het updaten...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Other peers have not yet accepted this new user.\n" +
"Unfortunately it is not possible to save profile\n" +
"or send any posts in this state.\n\n" +
@ -1990,6 +2035,15 @@ if(preferredLanguage == "it"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Aggiornamento in corso...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Gli altri nodi non hanno ancora accettato il nuovo utente.\n" +
"Al momento non puoi salvare il profilo o spedire messaggi.\n" +
"Attendi qualche minuto prima di continuare.\n\n" +
@ -2345,6 +2399,15 @@ if(preferredLanguage == "fr"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Mise à jour du statut...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Les autres pairs n'ont pas encore accepté ce nouvel utilisateur.\n" +
"Malheureusement, il n'est pas possible d'enregistrer le profil\n" +
"ou envoyer des billets pour le moment.\n\n" +
@ -2703,6 +2766,15 @@ if(preferredLanguage == "ru"){
'updates_checkout_diff_nfmt': 'Смотри сравнение на GitHub, чтобы узнать каковы изменения:\n %{link}',
'updates_upstream_isnt_changed': 'Соответствующая ветка в исходном репозитории выглядит неизменённой.',
"Updating status...": "Обновление информации...", // status of block chain
'new_account_briefing': 'Новая учётная запись создана и сейчас распространяется по сети. '
+ 'Пожалуйста, не закрывай это окно: это может занять несколько минут.\n\n'
+ 'Твой секретный ключ: *%{secretKey}*\n\n'
+ 'Настоятельно рекомендуется провести время ожидания, сохраняя этот ключ. '
+ 'Распечатай его, сделай скриншот, сфотографируй телефоном или перепиши на бумагу.\n\n'
+ 'Секретный ключ будет необходим для использования на разных устройствах. '
+ 'В случае его утери учётная запись окажется недосягаемой навсегда '
+ '(заметь: ~это альфа-версия и возможны сбои, приводящие к утере данных~).\n\n'
+ 'Подожди. Кнопка OK станет доступна быстрее, чем ты произнесёшь ~децентрализация~.',
"user_not_yet_accepted": "Другие участники сети еще не получили информацию о новом пользователе.\n" +
"К сожалению, сейчас вы не можете редактировать ваш профиль\n" +
"или отправлять сообщение.\n\n" +
@ -3065,6 +3137,15 @@ if(preferredLanguage == "de"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Status wird aktualisiert...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Andere Peers haben diesen Benutzter noch nicht akzeptiert.\n" +
"Leider ist es nicht möglich, das Profil zu speichern\n" +
"oder Nachrichten zu senden.\n\n" +
@ -3423,6 +3504,15 @@ if(preferredLanguage == "ja"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "ブロックチェーンを更新中…", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "この新ユーザーが他のピアーにまだ認証されていない。\n" +
"なので、プロファイルの保存やメッセージの投稿は現在不可能です。\n" +
"しばらくしてから続行してください。\n\n" +
@ -3780,6 +3870,15 @@ if(preferredLanguage == "pt-BR"){
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Atualizando estado da Cadeia de Blocos...", // status of block chain
"URI_shortener_caption": "URI Shortener",
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Outros nós ainda não aceitaram este novo usuário.\n" +
"Infelizmente não é possível salvar o perfil\n" +
"ou realizar postagens neste estado.\n\n" +
@ -4137,6 +4236,15 @@ if(preferredLanguage == "tr"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Durum güncelleniyor...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Diğer eşler bu yeni kullanıcıyı henüz kabul etmediler.\n" +
"Malesef profili kaydetmek ya da bu durumda\n" +
"ileti gönedermek mümkün değil.\n\n" +
@ -4494,6 +4602,15 @@ if(preferredLanguage == "cs"){
'updates_checkout_diff_nfmt': 'Checkout the diff on GitHub to learn what is changed:\n %{link}',
'updates_upstream_isnt_changed': 'A corresponding branch of the source repository seems to have not changed.',
"Updating status...": "Aktualizuji stav...", // status of block chain
'new_account_briefing': 'A new account was created and it is being propagated to the network. '
+ 'Please do not close this window, this might take a few minutes.\n\n'
+ 'Your secret key is: *%{secretKey}*\n\n'
+ 'It is highly recommended that you take this time to save your secret key. '
+ 'Print it, do a screenshot, use the camera in your phone or write it down to a piece of paper.\n\n'
+ 'The secret key will be needed to use this account from different computers. '
+ 'If you ever lose your secret key your account will be locked forever '
+ '(note: ~this is alpha software and it may crash, causing loss of data~).\n\n'
+ 'Just wait. The OK button will be shown faster you can say ~decentralization~.',
"user_not_yet_accepted": "Ostatní uzly ještě nepřijaly tohoto nového uživatele.\n" +
"Proto zatím není možné uložit profil nebo vkládat příspěvky.\n" +
"Počkejte prosím pár minut.\n\n" +
@ -4717,12 +4834,7 @@ var fixedLabels = [
".network label",
".network input",
// login page
".login ul li span",
".module span",
".login span",
".login-local-username",
".login input",
// mobile version //

View File

@ -1,37 +0,0 @@
// interface_login.js
// 2013 Miguel Freitas
function processCreateUser(username, secretKey) {
defaultScreenName = username;
if (defaultScreenName)
saveScreenName();
openModal({
classAdd: 'new-user',
content: $('#new-user-modal-template').children().clone(true),
title: polyglot.t('propagating_nickname', {username: username})
})
.content.find('.secret-key').text(secretKey);
sendNewUserTransaction(username, processSendnewusertransaction);
}
function processSendnewusertransaction() {
$( ".login-created-user").show();
}
function loginCreatedUser() {
$.MAL.goProfileEdit();
}
function initInterfaceLogin() {
initUser();
initInterfaceCommon();
checkNetworkStatusAndAskRedirect();
interfaceCommonLoginHandlers();
$( ".create-user").bind( "click", function() { createUserClick( processCreateUser ); } );
$( ".login-created-user").bind( "click", loginCreatedUser );
}

View File

@ -321,12 +321,12 @@ var MAL = function()
}
this.goLogin = function() {
if( $.hasOwnProperty("mobile") ) {
$.mobile.navigate( "#login" );
if ($.hasOwnProperty('mobile')) {
$.mobile.navigate('#login');
} else {
window.location.href = "login.html";
window.location.hash = '#/login';
}
}
};
this.goNetwork = function() {
if( $.hasOwnProperty("mobile") ) {
@ -418,6 +418,38 @@ var MAL = function()
}
}
this.processCreateAccount = function (peerAlias, secretKey) {
defaultScreenName = peerAlias;
if (defaultScreenName) {
saveScreenName();
}
if ($.hasOwnProperty('mobile')) {
$('.secret-key').text(secretKey);
sendNewUserTransaction(peerAlias);
$.mobile.navigate('#new-user-modal');
} else {
var modal = confirmPopup({
classAdd: 'new-account-briefing',
txtTitle: polyglot.t('propagating_nickname', {username: peerAlias}),
txtMessage: polyglot.t('new_account_briefing', {secretKey: secretKey}),
txtConfirm: polyglot.t('Login'),
cbConfirm: $.MAL.goProfileEdit,
addBlackout: true,
removeCancel: true,
removeClose: true
});
modal.content.find('.confirm').attr('disabled', true);
sendNewUserTransaction(peerAlias,
function (accountCreatedModal) {
accountCreatedModal.content.find('.confirm').attr('disabled', false);
}, modal
);
}
};
this.changedUser = function() {
if( $.hasOwnProperty("mobile") ) {
timelineChangedUser();

View File

@ -8,7 +8,6 @@ var handlersInstalled = false;
function initializeTwister( redirectNetwork, redirectLogin, cbFunc, cbArg ) {
if( !handlersInstalled ) {
interfaceNetworkHandlers();
interfaceCommonLoginHandlers();
installUserSearchHandler();
installProfileEditHandlers();
// install scrollbottom handler to load more posts as needed
@ -253,11 +252,12 @@ var router=new $.mobile.Router(
});
},
login: function(type,match,ui) {
if (!$('#login .content').children().length)
$('#login .content').append(twister.tmpl.loginMC.clone(true)).trigger('create');
$.mobile.showPageLoadingMsg();
initializeTwister( true, false, function() {
$.mobile.hidePageLoadingMsg();
$("select.local-usernames.login-user").selectmenu("refresh", true);
installCreateUserClick();
$("select.local-usernames").selectmenu("refresh", true);
});
},
network: function(type,match,ui) {
@ -421,19 +421,6 @@ function installRetransmitConfirmClick() {
});
}
function installCreateUserClick() {
$( ".create-user").unbind('click').click( function(e) {
createUserClick( function(username, secretKey) {
defaultScreenName = username;
if(defaultScreenName) {
saveScreenName();
}
$(".secret-key").text(secretKey);
sendNewUserTransaction( username, function() {} );
$.mobile.navigate( "#new-user-modal" ); } );
});
}
function installUserSearchHandler() {
$('.userMenu-search-field')
.off('click input')
@ -600,4 +587,3 @@ $(document).bind('mobileinit', function () {
$.mobile.defaultDialogTransition = 'none';
$.mobile.defaultPageTransition = 'none';
});

View File

@ -328,12 +328,9 @@ function initInterfaceNetwork() {
initMentionsCount();
initDMsCount();
});
} else {
$('.userMenu-profile > a').attr('href', '#/login').text(polyglot.t('Login'));
}
else
{
$(".userMenu-profile > a").text(polyglot.t("Login"));
$(".userMenu-profile > a").attr("href","login.html");
}
});
networkUpdate();
setInterval("networkUpdate()", 2000);

View File

@ -6,47 +6,48 @@
// Load/save profile (profile-edit.html)
var defaultScreenName = undefined;
var localUsernames = [];
var lastPostId = undefined;
// basic user functions
// -------------------------------
function initUser(cbFunc, cbArg) {
loadWalletlUsers( function() {
var $localUsersList = $("select.local-usernames");
if( $localUsersList.length ) {
for( var i = 0; i < localUsernames.length; i++ ) {
var $existingOption = $localUsersList.find("option[value='" + localUsernames[i] + "']");
if( !$existingOption.length ) {
var $userOption = $("<option/>");
$userOption.val(localUsernames[i]);
$userOption.text(localUsernames[i]);
$localUsersList.append($userOption);
}
}
}
function initUser(cbFunc, cbReq) {
loadWalletlUsers(
function (req) {
var elemAccountsList = getElem('select.local-usernames', true);
if (elemAccountsList.length) {
for (var i = 0; i < twister.var.localAccounts.length; i++) {
if (!elemAccountsList.find('option[value=\'' + twister.var.localAccounts[i] + '\']').length) {
$('<option/>')
.val(twister.var.localAccounts[i])
.text(twister.var.localAccounts[i])
.appendTo(elemAccountsList)
;
}
}
}
loadScreenName();
if( !defaultScreenName || localUsernames.indexOf(defaultScreenName) < 0 ) {
defaultScreenName = undefined;
} else {
var $localUsersLogin = $("select.local-usernames.login-user");
if( $localUsersLogin.length ) {
$localUsersLogin.val(defaultScreenName);
}
loadScreenName();
if (!defaultScreenName || twister.var.localAccounts.indexOf(defaultScreenName) < 0) {
defaultScreenName = undefined;
} else {
getElem('select.local-usernames', true).val(defaultScreenName);
var $userMenuConfig = $(".userMenu-config");
if( $userMenuConfig.length ) {
$userMenuConfig.find("a.mini-profile-name").attr("href",$.MAL.userUrl(defaultScreenName));
$userMenuConfig.find(".mini-profile-name").text(defaultScreenName);
getFullname( defaultScreenName, $userMenuConfig.find(".mini-profile-name") );
}
}
lastPostId = undefined;
if( cbFunc )
cbFunc(cbArg);
});
var userMenuConfig = $('.userMenu-config');
if (userMenuConfig.length) {
var elem = userMenuConfig.find('.mini-profile-name')
.attr('href', $.MAL.userUrl(defaultScreenName)).text(defaultScreenName);
getFullname(defaultScreenName, elem);
}
}
lastPostId = undefined;
if (typeof req.cbFunc === 'function') {
req.cbFunc(req.cbReq);
}
}, {cbFunc: cbFunc, cbReq: cbReq}
);
}
function incLastPostId( optionalNewValue ) {
@ -60,150 +61,102 @@ function incLastPostId( optionalNewValue ) {
$.MAL.updateMyOwnPostCount(lastPostId+1);
}
function loadWalletlUsers(cbFunc, cbArg) {
twisterRpc("listwalletusers", [],
function(args, ret) {
localUsernames = [];
for( var i = 0; i < ret.length; i++ ) {
// filter out group aliases
if( ret.length && ret[i][0] !== '*' ) {
localUsernames.push(ret[i]);
}
}
args.cbFunc(args.cbArg);
}, {cbFunc:cbFunc, cbArg:cbArg},
function(args, ret) {
alert(polyglot.t("error_connecting_to_daemon"));
}, {});
function loadWalletlUsers(cbFunc, cbReq) {
twisterRpc('listwalletusers', [],
function (req, ret) {
twister.var.localAccounts = [];
for (var i = 0; i < ret.length; i++) {
if (ret.length && ret[i][0] !== '*') { // filter out group aliases (starting with '*')
twister.var.localAccounts.push(ret[i]);
}
}
if (typeof req.cbFunc === 'function') {
req.cbFunc(req.cbReq);
}
}, {cbFunc: cbFunc, cbReq: cbReq},
function (req, ret) {
alert(polyglot.t('error_connecting_to_daemon'));
}
);
}
function loadScreenName() {
if( $.localStorage.isSet("defaultScreenName") ) {
defaultScreenName = $.localStorage.get("defaultScreenName").toString();
if ($.localStorage.isSet('defaultScreenName')) {
defaultScreenName = $.localStorage.get('defaultScreenName').toString();
}
}
function saveScreenName() {
$.localStorage.set("defaultScreenName", defaultScreenName);
$.localStorage.set('defaultScreenName', defaultScreenName);
}
// user-related functions used by login page (desktop/mobile)
// ----------------------------------------------------------
function loginLocalUsername() {
defaultScreenName = $("select.local-usernames.login-user").val();
if(defaultScreenName) {
saveScreenName();
$.MAL.changedUser();
$.MAL.goHome();
}
}
function checkUsernameAvailability() {
var $newUsername = $(".new-username");
var username = $newUsername.val().toLowerCase();
$newUsername.val(username);
var $availField = $(".availability");
if( !username.length )
return;
if( username.length > 16 ) {
$availField.text(polyglot.t("Must be 16 characters or less."));
function loginToAccount(peerAlias) {
if (!peerAlias) {
console.warn('can\'t login to account: empty alias was given');
return;
}
//Check for non-alphabetic characters and space
if(username.search(/[^a-z0-9_]/) != -1) {
$availField.text(polyglot.t("Only alphanumeric and underscore allowed."));
return;
}
$availField.text(polyglot.t("Checking..."));
dumpPubkey(username, function(dummy, pubkey) {
var notAvailable = pubkey.length > 0
var $availField = $(".availability");
if( notAvailable ) {
$availField.text(polyglot.t("Not available"));
} else {
$availField.text(polyglot.t("Available"));
var $createButton = $(".create-user");
$.MAL.enableButton( $createButton );
}
}, null);
}
function newUserNameKeypress() {
var $availField = $(".availability");
$availField.text("");
var $createButton = $(".create-user");
$.MAL.disableButton( $createButton );
}
// create user and call cbFunc(username, privkey)
function createUserClick(cbFunc) {
var $newUsername = $(".new-username");
var username = $newUsername.val().toLowerCase();
if( localUsernames.indexOf(username) < 0 ) {
twisterRpc("createwalletuser", [username],
function(args, ret) {
args.cbFunc(args.username, ret);
}, {username:username, cbFunc:cbFunc},
function(args, ret) {
alert(polyglot.t("Error in 'createwalletuser' RPC."));
}, {cbFunc:cbFunc});
} else {
// user exists in wallet but transaction not sent
dumpPrivkey(username,
function(args, ret) {
args.cbFunc(args.username, ret);
}, {username:username, cbFunc:cbFunc});
}
}
function sendNewUserTransaction(username, cbFunc) {
twisterRpc("sendnewusertransaction", [username],
function(args, ret) {
args.cbFunc();
}, {cbFunc:cbFunc},
function(args, ret) {
alert(polyglot.t("Error in 'sendnewusertransaction' RPC."));
}, {});
}
function importSecretKeyClick() {
var secretKey = $(".secret-key-import").val();
var username = $(".username-import").val().toLowerCase();
twisterRpc("importprivkey", [secretKey,username],
function(args, ret) {
processNewSecretKeyImported(args.username);
}, {username:username},
function(args, ret) {
alert(polyglot.t("Error in 'importprivkey'", {rpc: ret.message }));
}, {});
}
function processNewSecretKeyImported(username) {
defaultScreenName = username;
defaultScreenName = peerAlias;
saveScreenName();
$.MAL.changedUser();
$.MAL.goHome();
}
// handlers common to both desktop and mobile
function interfaceCommonLoginHandlers() {
$( ".login-local-username" ).bind( "click", loginLocalUsername );
$( ".check-availability").bind( "click", checkUsernameAvailability );
/* must specialize: $( ".create-user").bind( "click", function() { createUserClick( processCreateUser ); } ); */
/* must specialize: $( ".login-created-user").bind( "click", loginCreatedUser ); */
$( ".new-username" ).keyup( newUserNameKeypress );
$('.secret-key-import').on('input', importSecretKeypress);
$('.username-import').on('input', importSecretKeypress);
$( ".import-secret-key").bind( "click", importSecretKeyClick );
function createAccount(peerAlias) {
if (!peerAlias) {
console.warn('can\'t create account: empty alias was given');
return;
}
twisterRpc('createwalletuser', [peerAlias],
function(req, ret) {
$.MAL.processCreateAccount(req.peerAlias, ret);
}, {peerAlias: peerAlias},
function(req, ret) {
alert(polyglot.t('Error in \'createwalletuser\' RPC.'));
}
);
}
function importAccount(peerAlias, secretKey) {
if (!peerAlias) {
console.warn('can\'t import account: empty alias was given');
return;
}
if (!secretKey) {
console.warn('can\'t import account: empty secret key was given');
return;
}
twisterRpc('importprivkey', [secretKey, peerAlias],
function (req, ret) {
defaultScreenName = req.peerAlias;
saveScreenName();
$.MAL.changedUser();
$.MAL.goHome();
}, {peerAlias: peerAlias},
function (req, ret) {
alert(polyglot.t('Error in \'importprivkey\'', {rpc: ret.message}));
}
);
}
function sendNewUserTransaction(peerAlias, cbFunc, cbReq) {
twisterRpc('sendnewusertransaction', [peerAlias],
function (req, ret) {
if (typeof req.cbFunc === 'function') {
req.cbFunc(req.cbReq);
}
}, {cbFunc: cbFunc, cbReq: cbReq},
function (req, ret) {
alert(polyglot.t('Error in \'sendnewusertransaction\' RPC.'));
}
);
}
// profile-related functions used by profile-edit

View File

@ -1,150 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>twister login</title>
<link id="stylecss" rel="stylesheet" href="css/style.css" type="text/css"/>
<script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script>
<script src="js/jquery.jsonrpcclient.js"></script>
<script src="js/jquery.storageapi.js"></script>
<script src="js/options.js"></script>
<script src="js/franc.js"></script>
<script src="js/notify.js"></script>
<script src="js/mobile_abstract.js"></script>
<script src="js/twister_io.js"></script>
<script src="js/twister_formatpost.js"></script>
<script src="js/twister_network.js"></script>
<script src="js/twister_user.js"></script>
<script src="js/interface_common.js"></script>
<script src="js/interface_login.js"></script>
<script src="js/polyglot.min.js"></script>
<script src="js/interface_localization.js"></script>
<link rel="shortcut icon" type="image/png" href="img/twister_mini.png" />
</head>
<body>
<!-- MENU SUPERIOR INIT -->
<nav class="userMenu">
<ul>
<li class="userMenu-home"><a href="home.html"><span class="selectable_theme theme_original label">Home</span></a></li>
<li class="userMenu-network selectable_theme theme_original"><a class="label" href="network.html">Network</a></li>
<li class="userMenu-profile current"><a class="label" href="login.html">Login</a></li>
<li class="userMenu-config">
</li>
</ul>
</nav>
<!-- MENU SUPERIOR END -->
<div class="wrapper">
<!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="login">
<h2 class="header-bold"> twister login </h2>
<div class="module">
<p> <span>Existing local users</span> </p>
<div>
<select class="local-usernames login-user">
</select>
<button class="login-local-username">Login</button>
</div>
</div>
<!-- <span> Or... </span> -->
<div class="module">
<p> <span>Create a new user</span> </p>
<div>
<input class="new-username" type="textbox" placeholder="Type nickname here" cols="16" rows="1"></input>
<button class="check-availability">Check availability</button>
<span class="availability"></span>
</div>
<div>
<button class="create-user disabled" disable="true">Create this nickname</button>
</div>
</div>
<!-- <span> Or... </span> -->
<div class="module">
<div>
<p> <span>Import secret key</span> </p>
<input class="secret-key-import" type="textbox" placeholder="52-characters secret" size="52" rows="1"></input>
</div>
<div>
<p class="with-nickname"> <span>With nickname</span> </p>
<input class="username-import" type="textbox" placeholder="Type nickname here" size="16" rows="1"></input>
</div>
<div>
<button class="import-secret-key disabled" disable="true">Import key</button>
</div>
</div>
</div>
<!-- LADO ESQUERDO DE MÓDULOS END -->
</div>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
</div>
<div class="modal-content"></div>
<div class="modal-blackout"></div>
</div>
<!-- TEMPLATE DO MODAL GENÉRICO END -->
<div class="prompt-wrapper">
<div class="modal-header">
<h3></h3>
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
</div>
<div id="confirm-popup-template">
<div class="message"></div>
<div class="modal-buttons">
<button class="confirm"></button>
<button class="cancel"></button>
</div>
</div>
<a id="msg-user-link-template" class="open-profile-modal"></a>
<a id="external-page-link-template" rel="nofollow noreferrer" target="_blank"></a>
<a id="hashtag-link-template" class="open-hashtag-modal"></a>
<div id="template-link-shortened">
<a class="link-shortened" rel="nofollow noreferrer" target="_blank"></a>
</div>
<!-- MODAL DE NEW USER INIT -->
<div id="new-user-modal-template">
<div class="warning">
<div class="text">
A new user was created and it is being propagated to the network.
Please do not close this window, this might take a few minutes.
</div>
<div class="text emphasis">
Your secret key is: <span class="secret-key"></span>
</div>
<div class="text">
It is highly recommended that you take this time to save your secret key.
Print it, do a screenshot, use the camera in your phone or write it down
to a piece of paper.
</div>
<div class="text">
The secret key will be needed to use this account from different computers.
If you ever lose your secret key (remember: this is alpha software and it may
crash, causing loss of data) your nickname will be locked forever.
There is no way to recover a lost key for twister accounts.
</div>
<div class="text"></div>
<div class="text">
Please wait. The 'OK' button will be shown when process completes.
</div>
<div class="text">
<button class="login-created-user" style="display:none;">OK</button>
</div>
</div>
</div>
</div>
<!-- TEMPLATES END -->
</body>
</html>

View File

@ -46,7 +46,6 @@
<a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item updates-check-client">Check for client's updates</a>
<a class="dropdown-menu-item" href="login.html">Change user</a>
</div>
</a>
</li>
@ -275,6 +274,7 @@
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
<div class="modal-blackout"></div>
</div>
<div id="confirm-popup-template">

View File

@ -38,7 +38,6 @@
<a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="login.html">Change user</a>
</div>
</a>
</li>

View File

@ -50,7 +50,6 @@
<a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="login.html">Change user</a>
</div>
</a>
</li>
@ -95,6 +94,7 @@
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
<div class="modal-blackout"></div>
</div>
<div id="confirm-popup-template">

View File

@ -1784,8 +1784,7 @@ textarea.splited-post {
padding: 10px;
border-radius: 6px;
}
.singleBlock h2, .header-bold
{
.singleBlock h2 {
font-weight: bold;
line-height: 40px;
color: rgba( 255, 255, 255, 1 );
@ -1856,83 +1855,6 @@ textarea.splited-post {
margin-right: 20px;
}
/*************************************
************* LOGIN PAGE *************
**************************************/
.login .header-bold {
display: block;
width: 500px;
margin: 0px auto 12px auto;
}
.login .module {
padding: 20px;
width: 500px;
margin: 10px auto;
border: 3px solid #c7cdda;
border-radius: 6px;
}
.login .module p {
font: 14px "Open Sans", sans-serif;
margin-bottom: 5px;
}
.login .module input {
padding: 5px 10px;
font: 13px/24px "Open sans";
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background: #f3f3f3;
}
.login .module input:focus {
background: #fff;
transition: background-color 100ms linear;
}
.login .module select {
height: 30px;
font: 13px/24px "Open sans";
text-align: center;
padding: 3px 30px 3px 10px;
margin: 0;
background: #fff url(../img/form-arrow-down-black.png) no-repeat right center;
border: 1px solid #ccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
/* hide default apperance select element and arrow in firefox */
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
text-indent: 0.01px;
text-overflow: '';
/* end */
}
.login .module span.availability {
margin-left: 10px;
font: italic 16px "Open sans";
color: #45474d;
}
.with-nickname, .import-secret-key, .create-user {
margin-top: 10px;
}
.login .module input:focus::-webkit-input-placeholder {
color: #fff;
}
.login .module input:focus:-moz-placeholder {
color: #fff;
}
.login .module input:focus::-moz-placeholder {
color: #fff;
}
.login .module input::-ms-input-placeholder {
color: #fff;
}
/*************************************
************* POPUP MODAL ************
**************************************/
@ -1963,12 +1885,12 @@ textarea.splited-post {
font-weight: bold;
}
.modal-wrapper .modal-content {
.modal-content {
background: #fff;
overflow-y: auto;
}
.modal-wrapper .modal-blackout {
.modal-blackout {
background: rgba(0,0,0, .6);
z-index: -1;
position: fixed;
@ -2056,6 +1978,62 @@ textarea.splited-post {
margin-top: 4px;
}
/*************************************
******* LOGIN TO ACCOUNT MODAL *******
**************************************/
.login-modal.modal-wrapper {
height: auto; /*about 580px*/
margin-top: -290px;
}
.login-modal .module {
margin: 4px;
}
.login-modal .module > div {
width: 100%;
margin: 4px 0;
padding: 4px 12px;
}
.login-modal .module > div:last-child {
text-align: right;
margin: 8px 0;
}
.login-modal .module input {
border: solid 1px rgba(0, 0, 0, .3);
border-radius: 4px;
width: 320px;
margin: 12px 16px;
padding: 2px 4px;
}
.login-modal .module select {
border: solid 1px rgba(0, 0, 0, .3);
border-radius: 4px;
width: 310px;
margin: 12px 16px;
padding: 2px 4px;
}
.login-modal .module input:focus, .login-modal .module select:focus {
border: solid 1px rgba(118, 145, 206, .8);
box-shadow: 0 0 10px rgba(0, 0, 0, .3);
}
.login-modal .module .secret-key {
width: 500px;
}
.login-modal .module .availability {
font: italic 13px "Open sans";
color: #45474D;
display: inline-block;
margin-left: 16px;
}
/*************************************
******** DIRECT MESSAGES MODAL *******
**************************************/
@ -2260,38 +2238,6 @@ textarea.splited-post {
margin: 8px 8px 0;
}
/*************************************
*********** NEW USER MODAL ***********
**************************************/
.new-user.modal-wrapper {
width: 720px;
height: 580px;
margin: -290px 0 0 -360px;
}
.new-user .modal-content {
padding: 25px;
}
.new-user .modal-close {
display: none;
}
.new-user .text {
margin: 0 0 15px 0;
}
.new-user .emphasis {
font-size: 18px;
text-align: center;
}
.new-user .secret-key {
color: rgba(.5,0,0, 1.0);
font-weight: bold;
}
/*************************************
************ HASHTAG MODAL ***********
**************************************/
@ -2439,7 +2385,7 @@ textarea.splited-post {
}
.prompt-wrapper .modal-buttons {
margin: 4px 16px;
margin: 4px 16px 16px;
text-align: right;
}
@ -2459,12 +2405,19 @@ textarea.splited-post {
.confirm-popup .message {
text-align: center;
margin: 12px;
padding: 12px;
}
.confirm-popup .modal-buttons {
text-align: center;
padding: 4px;
}
/*************************************
********* NEW ACCOUNT POPUP **********
**************************************/
.new-account-briefing.prompt-wrapper {
margin-top: -164px;
}
/*************************************

View File

@ -1312,75 +1312,6 @@ h3 .isFollowing:after {
display: none;
}
/*************************************
************* LOGIN PAGE *************
**************************************/
.login .header-bold {
display: block;
width: 720px;
margin: 0px auto 12px auto;
}
.login .module {
display: block;
width: 720px;
padding: 32px 40px;
margin: 8px auto;
background: #fff;
}
.login .module p {
margin-bottom: 5px;
}
.login .module input {
padding: 5px 10px;
background: #f3f3f3;
border: solid 1px #dcdcdc;
transition: box-shadow 0.3s, border 0.3s;
font-size: 14px;
}
.login .module input:focus, .login .module select:focus {
background: #fff;
transition: background-color 100ms linear;
border-bottom: solid 2px #B4C669;
}
.login .module select {
height: 30px;
padding: 3px 30px 3px 10px;
margin: 0;
border: 1px solid #ccc;
font-size: 14px;
}
.login .module span.availability {
margin-left: 10px;
color: #45474d;
}
.with-nickname, .import-secret-key, .create-user {
margin-top: 10px;
}
.login .module:nth-child(2) div ,
.login .module:nth-child(3) div:nth-child(2),
.login .secret-key-import,
.login .username-import {
margin-top: 20px;
margin-bottom: 20px;
margin-left: 16px;
}
.login .create-user,
.login .import-secret-key {
display: block;
margin-left: auto;
margin-right: 16px;
}
/************** BUTTONS *********** */
/* line 65, ../sass/_commons.sass */
button, .mini-profile-actions span, a.button {
@ -2638,6 +2569,15 @@ ol.toptrends-list a:hover {
margin: 8px 12px 20px;
}
/*************************************
********* NEW ACCOUNT POPUP **********
**************************************/
.new-account-briefing.prompt-wrapper {
top: 50%;
margin-top: -164px;
}
/****** FOLLOWING-CONFIG PROMPT ******/
.following-config-modal.prompt-wrapper {
@ -2697,6 +2637,62 @@ ol.toptrends-list a:hover {
padding-bottom: 6px;
}
/*************************************
******* LOGIN TO ACCOUNT MODAL *******
**************************************/
.login-modal.modal-wrapper {
width: 580px;
height: auto; /*about 532px*/
margin: -270px 0 0 -290px;
}
.login-modal .modal-content {
padding: 0;
}
.login-modal .module {
margin: 4px;
}
.login-modal .module > div {
margin: 4px 0;
padding: 4px 12px;
}
.login-modal .module > div:last-child {
text-align: right;
margin: 8px 0;
}
.login-modal .module input {
border: 1px solid rgba(0, 0, 0, .1);
width: 320px;
margin: 12px 16px;
padding: 2px 4px;
}
.login-modal .module select {
border: 1px solid rgba(0, 0, 0, .1);
width: 310px;
margin: 12px 16px;
padding: 2px 4px;
}
.login-modal .module input:focus, .login-modal .module select:focus {
border-bottom: solid 1px #B4C669;
}
.login-modal .module .secret-key {
width: 500px;
}
.login-modal .module .availability {
color: #45474D;
display: inline-block;
margin-left: 16px;
}
/****** DIRECT MESSAGES MODAL********* */
/* line 736, ../sass/style.sass */
.modal-wrapper.directMessages {
@ -3032,39 +3028,6 @@ ol.toptrends-list a:hover {
margin: 8px 8px 0;
}
/********* NEW USER MODAL************* */
.new-user.modal-wrapper {
width: 720px;
height: 580px;
margin: -290px 0 0 -360px;
}
.new-user .modal-content {
padding: 25px;
}
/* line 870, ../sass/style.sass */
.new-user .modal-close {
display: none;
}
/* line 872, ../sass/style.sass */
.new-user .text {
margin: 0 0 15px 0;
}
/* line 874, ../sass/style.sass */
.new-user .emphasis {
text-align: center;
}
/* line 877, ../sass/style.sass */
.new-user .secret-key {
display: block;
margin-top: 8px;
color: black;
font-weight: bold;
font-size: 110%;
}
/******** HASHTAG MODAL********** */
/* line 884, ../sass/style.sass */
.modal-wrapper.hashtag-modal {

View File

@ -1,55 +0,0 @@
.login .header-bold
display: block
width: 720px
margin: 0px auto 12px auto
.login .module
display: block
width: 720px
padding: 32px 40px
margin: 8px auto
background: white
.login .module p
margin-bottom: 5px
.login .module input
padding: 5px 10px
background: #f3f3f3
border: solid 1px #dcdcdc
transition: box-shadow 0.3s, border 0.3s
font-size: 14px
.login .module input:focus,
.login .module select:focus
background: white
transition: background-color 100ms linear
border-bottom: solid 2px $color-green
.login .module select
height: 30px
padding: 3px 30px 3px 10px
margin: 0
border: 1px solid #ccc
font-size: 14px
.login .module span.availability
margin-left: 10px
color: #45474d
.with-nickname, .import-secret-key, .create-user
margin-top: 10px
.login .module:nth-child(2) div,
.login .module:nth-child(3) div:nth-child(2),
.login .secret-key-import,
.login .username-import
margin-top: 20px
margin-bottom: 20px
margin-left: 16px
.login .create-user,
.login .import-secret-key
display: block
margin-left: auto
margin-right: 16px

View File

@ -8,7 +8,6 @@
@import _profile
@import _postboard
@import _following
@import _login
@import _network
@import _commons
@import _tabs
@ -784,6 +783,43 @@ ol.toptrends-list
float: left
margin: 4px
.inline-warn
background-color: #FEFEDF
padding: 10px
.close
float: right
font-size: 1.2em
color: #E34F42
cursor: pointer
margin: -8px 2px 8px 8px
.text
font-size: 0.8em
text-align: center
.options
font-size: 0.8em
text-align: right
margin-top: 4px
/*************************************
*********** CONFIRM POPUP ************
**************************************/
.confirm-popup
&.prompt-wrapper
top: 30%
.message
margin: 8px 12px 20px
/*************************************
********* NEW ACCOUNT POPUP **********
**************************************/
.new-account-briefing
&.prompt-wrapper
top: 50%
margin-top: -164px
/************ FOLLOWING-CONFIG MODAL **********/
.prompt-wrapper.following-config-modal
@ -822,6 +858,44 @@ ol.toptrends-list
.post-area
padding-bottom: 6px
/*************************************
******* LOGIN TO ACCOUNT MODAL *******
**************************************/
.login-modal
&.modal-wrapper
width: 580px
height: auto /*about 532px*/
margin: -270px 0 0 -290px
.modal-content
padding: 0
.module
margin: 4px
> div
margin: 4px 0
padding: 4px 12px
> div:last-child
text-align: right
margin: 8px 0
input
border: 1px solid rgba(0, 0, 0, .1)
width: 320px
margin: 12px 16px
padding: 2px 4px
select
border: 1px solid rgba(0, 0, 0, .1)
width: 310px
margin: 12px 16px
padding: 2px 4px
input:focus, select:focus
border-bottom: solid 1px #B4C669
.secret-key
width: 500px
.availability
color: #45474D
display: inline-block
margin-left: 16px
/****** DIRECT MESSAGES MODAL**********/
.modal-wrapper.directMessages

View File

@ -171,55 +171,7 @@
<h1 class="rtitle">twister login</h1>
</div>
<div class="content" data-role="content" style="">
<div class="login">
<div class="module">
<span> Existing local users </span>
<div class="ui-grid-a">
<div class="ui-block-a">
<select class="local-usernames login-user"></select>
</div>
<div class="ui-block-b">
<button class="login-local-username">Login</button>
</div>
</div>
</div>
<hr/>
<span> Or... </span>
<div class="module">
<span> Create a new user </span>
<div>
<input class="new-username" type="textbox" placeholder="Type nickname here" cols="16" rows="1"></input>
<button class="check-availability">Check availability</button>
<span class="availability"></span>
</div>
<div>
<button class="create-user disabled" disabled="disabled">Create this nickname</button>
</div>
</div>
<hr/>
<span> Or... </span>
<div class="module">
<div>
<span> Import secret key </span>
<input class="secret-key-import" type="textbox" placeholder="52-characters secret" size="52" rows="1"></input>
</div>
<div>
<span> With nickname </span>
<input class="username-import" type="textbox" placeholder="Type nickname here" size="16" rows="1"></input>
</div>
<div>
<button class="import-secret-key disabled" disabled="disabled">Import key</button>
</div>
</div>
</div>
</div>
<div class="content" data-role="content" style=""></div>
<div class="footer" data-role="footer" data-position="fixed" data-tap-toggle="false">
<a href="#home" data-role="button">Home</a>
@ -891,6 +843,52 @@
</div>
</li>
</div>
<div id="template-login-modal">
<div class="module">
<span>Existing local users</span>
<div class="ui-grid-a">
<div class="ui-block-a">
<select class="local-usernames"></select>
</div>
<div class="ui-block-b">
<button class="login">Login</button>
</div>
</div>
</div>
<hr/>
<span> Or... </span>
<div class="module create-account">
<span>Create a new user</span>
<div>
<input class="alias" type="textbox" placeholder="Type nickname here" cols="16" rows="1"></input>
<span class="availability"></span>
</div>
<div>
<button class="check" disabled="disabled">Check availability</button>
<button class="create" disabled="disabled">Create this nickname</button>
</div>
</div>
<hr/>
<span> Or... </span>
<div class="module import-account">
<div>
<span>Import secret key</span>
<input class="secret-key" type="textbox" placeholder="52-characters secret" size="52" rows="1"></input>
</div>
<div>
<span>With nickname</span>
<input class="alias" type="textbox" placeholder="Type nickname here" size="16" rows="1"></input>
</div>
<div>
<button class="import" disabled="disabled">Import key</button>
</div>
</div>
</div>
</div> <!-- templates -->