diff --git a/css/profile.css b/css/profile.css
index 873968a..763f8d9 100644
--- a/css/profile.css
+++ b/css/profile.css
@@ -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
{
diff --git a/home.html b/home.html
index b805c63..edfe9c2 100644
--- a/home.html
+++ b/home.html
@@ -448,6 +448,8 @@ $(".userMenu-dhtindicator").hide();
+
+
- Posts
diff --git a/js/twister_actions.js b/js/twister_actions.js
index ef74c7b..8aa6ac5 100644
--- a/js/twister_actions.js
+++ b/js/twister_actions.js
@@ -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") );
diff --git a/js/twister_io.js b/js/twister_io.js
index dfccaa6..440d715 100644
--- a/js/twister_io.js
+++ b/js/twister_io.js
@@ -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($('').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($('').attr('href', 'bitmsg:'+text).text(text));
+ }
+ }, item);
+}
+
// get location and store it in item.text
function getLocation( username, item ){
getProfileResource( username, "location", item);
diff --git a/js/twister_user.js b/js/twister_user.js
index 6755a80..cfee418 100644
--- a/js/twister_user.js
+++ b/js/twister_user.js
@@ -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");
diff --git a/profile-edit.html b/profile-edit.html
index 648cc84..6174e38 100644
--- a/profile-edit.html
+++ b/profile-edit.html
@@ -77,6 +77,8 @@ if (theme=='calm') {
+
+