mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-03-11 21:11:04 +00:00
Merge pull request #24 from dryabov/master
add tox and bitmessage fields to profile
This commit is contained in:
commit
42f79f7d8e
@ -195,6 +195,12 @@
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.forEdition .profile-card-main .input-tox,
|
||||
.forEdition .profile-card-main .input-bitmessage
|
||||
{
|
||||
width: 90%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.profile-edition-buttons
|
||||
{
|
||||
padding: 10px;
|
||||
@ -239,6 +245,18 @@
|
||||
.profile-modal .profile-location {
|
||||
color: #48577d;
|
||||
}
|
||||
.profile-modal .profile-tox:before {
|
||||
content: "Tox: ";
|
||||
}
|
||||
.profile-modal .profile-tox:empty {
|
||||
display: none;
|
||||
}
|
||||
.profile-modal .profile-bitmessage:before {
|
||||
content: "Bitmessage: ";
|
||||
}
|
||||
.profile-modal .profile-bitmessage:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profile-modal .profile-data
|
||||
{
|
||||
|
@ -448,6 +448,8 @@ $(".userMenu-dhtindicator").hide();
|
||||
</div>
|
||||
<div class="profile-bio">
|
||||
</div>
|
||||
<div class="profile-tox"></div>
|
||||
<div class="profile-bitmessage"></div>
|
||||
</div>
|
||||
<ul class="module profile-data">
|
||||
<li><a href="#"><span class="posts-count"> </span><span class="label">Posts</span></a></li>
|
||||
|
@ -170,6 +170,8 @@ function updateProfileData(profileModalContent, username) {
|
||||
getLocation( username, profileModalContent.find(".profile-location") );
|
||||
getWebpage( username, profileModalContent.find(".profile-url") );
|
||||
getBio( username, profileModalContent.find(".profile-bio") );
|
||||
getTox( username, profileModalContent.find(".profile-tox") );
|
||||
getBitmessage( username, profileModalContent.find(".profile-bitmessage") );
|
||||
getAvatar( username, profileModalContent.find(".profile-card-photo") );
|
||||
getPostsCount( username, profileModalContent.find(".posts-count") );
|
||||
getFollowers( username, profileModalContent.find(".followers-count") );
|
||||
|
@ -219,6 +219,26 @@ function getBio( username, item ){
|
||||
getProfileResource( username, "bio", item);
|
||||
}
|
||||
|
||||
// get tox address and store it in item.text
|
||||
function getTox( username, item ){
|
||||
getProfileResource( username, "tox", false, function(item, text){
|
||||
item.empty();
|
||||
if(text) {
|
||||
item.append($('<a></a>').attr('href', 'tox:'+text).text(text));
|
||||
}
|
||||
}, item);
|
||||
}
|
||||
|
||||
// get bitmessage address and store it in item.text
|
||||
function getBitmessage( username, item ){
|
||||
getProfileResource( username, "bitmessage", false, function(item, text){
|
||||
item.empty();
|
||||
if(text) {
|
||||
item.append($('<a></a>').attr('href', 'bitmsg:'+text).text(text));
|
||||
}
|
||||
}, item);
|
||||
}
|
||||
|
||||
// get location and store it in item.text
|
||||
function getLocation( username, item ){
|
||||
getProfileResource( username, "location", item);
|
||||
|
@ -247,6 +247,10 @@ function loadProfileForEdit() {
|
||||
$(".input-city").val(profile.location);
|
||||
if( "url" in profile)
|
||||
$(".input-website").val(profile.url);
|
||||
if( "tox" in profile)
|
||||
$(".input-tox").val(profile.tox);
|
||||
if( "bitmessage" in profile)
|
||||
$(".input-bitmessage").val(profile.bitmessage);
|
||||
}
|
||||
}, {} );
|
||||
}
|
||||
@ -258,6 +262,8 @@ function saveProfile(e)
|
||||
profile["bio"] = $(".input-description").val();
|
||||
profile["location"] = $(".input-city").val();
|
||||
profile["url"] = $(".input-website").val();
|
||||
profile["tox"] = $(".input-tox").val();
|
||||
profile["bitmessage"] = $(".input-bitmessage").val();
|
||||
dhtput( defaultScreenName, "profile", "s",
|
||||
profile, defaultScreenName, ++profileSeqNum );
|
||||
var avatarData = $(".profile-card-photo.forEdition").attr("src");
|
||||
|
@ -77,6 +77,8 @@ if (theme=='calm') {
|
||||
<input type="text" class="input-description" placeholder="Describe yourself"/>
|
||||
<input type="text" class="input-city" placeholder="Location"/>
|
||||
<input type="text" class="input-website" placeholder="website"/>
|
||||
<input type="text" class="input-tox" placeholder="Tox address"/>
|
||||
<input type="text" class="input-bitmessage" placeholder="Bitmessage address"/>
|
||||
</div>
|
||||
<div class="profile-edition-buttons">
|
||||
<button class="toggle-priv-key" style="float: left" href="#">Secret key</button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user