diff --git a/css/profile.css b/css/profile.css
index 9559745..e337f4a 100644
--- a/css/profile.css
+++ b/css/profile.css
@@ -11,6 +11,7 @@
.profile-card-main
{
width: 540px;
+ padding: 10px;
text-align: center;
position: relative;
transition: all .2s linear;
@@ -91,6 +92,8 @@
.forEdition .profile-card-photo
{
border: solid 2px #fff;
+ border-radius: 0%;
+ float:none;
position: relative;
cursor: pointer;
transition: all .2s linear;
@@ -145,6 +148,12 @@
{
display: inline-block;
}
+.forEdition .profile-card-main .input-tox,
+.forEdition .profile-card-main .input-bitmessage
+{
+ width: 90%;
+ margin-top: 10px;
+}
.profile-edition-buttons
{
padding: 10px;
@@ -170,11 +179,72 @@
height: 90%;
}
.profile-modal .profile-bio,
-.profile-modal .profile-contact
{
min-height: 27px;
overflow-y: visible;
}
+#msngrswr {
+ display: none;
+ margin-top: 20px;
+ height: 30px;
+}
+#toxbtnwr, #bmbtnwr {
+ float: left;
+ display: none;
+}
+.bitmessage-ctc, .tox-ctc {
+ height: 30px;
+ width: 30px;
+ display: inline-block;
+ margin-right: 5px;
+ border: 1px solid #d6d8dc;
+ background: #e3e5ea url(img/clipboard.png) center no-repeat;
+ opacity: .8;
+ -webkit-border-radius: 0 5px 5px 0;
+ -moz-border-radius: 0 5px 5px 0;
+ border-radius: 0 5px 5px 0;
+ -webkit-transition: all 20ms;
+ -moz-transition: all 20ms;
+ -ms-transition: all 20ms;
+ -o-transition: all 20ms;
+ transition: all 20ms;
+}
+.bitmessage-ctc:hover, .tox-ctc:hover {
+ background-color: #f0f2f8;
+ opacity: 1;
+ cursor: pointer;
+}
+.bitmessage-ctc:active, .tox-ctc:active {
+ background-color: #edfced;
+}
+.profile-modal .profile-tox, .profile-modal .profile-bitmessage {
+ display: inline-block;
+ width: 70px;
+ height: 30px;
+ border: 1px solid #c0c2c6;
+ opacity: .8;
+ -webkit-border-radius: 5px 0 0 5px;
+ -moz-border-radius: 5px 0 0 5px;
+ border-radius: 5px 0 0 5px;
+ -webkit-transition: all 200ms;
+ -moz-transition: all 200ms;
+ -ms-transition: all 200ms;
+ -o-transition: all 200ms;
+ transition: all 200ms;
+}
+.profile-modal .profile-tox:hover, .profile-modal .profile-bitmessage:hover {
+ opacity: 1;
+ background-color: #f0f2f8;
+}
+.profile-modal .profile-tox:active, .profile-modal .profile-bitmessage:active {
+ background-color: #edfced;
+}
+.profile-modal .profile-tox {
+ background: #e3e5ea url(../img/tox.png) center no-repeat;
+}
+.profile-modal .profile-bitmessage {
+ background: #e3e5ea url(../img/bm.png) center no-repeat;
+}
.profile-modal .profile-data
{
display: inline-block;
@@ -241,4 +311,4 @@ h2.profile-screen-name {
.profile-modal .modal-buttons {
display: none;
-}
\ No newline at end of file
+}
diff --git a/home.html b/home.html
index af21dc7..489e5d5 100644
--- a/home.html
+++ b/home.html
@@ -374,11 +374,16 @@
@
-
-
diff --git a/img/bm.png b/img/bm.png
new file mode 100644
index 0000000..0b5afc1
Binary files /dev/null and b/img/bm.png differ
diff --git a/img/tox.png b/img/tox.png
new file mode 100644
index 0000000..69ea4f6
Binary files /dev/null and b/img/tox.png differ
diff --git a/js/twister_actions.js b/js/twister_actions.js
index 168f12e..d6c14c8 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..34e6fee 100644
--- a/js/twister_io.js
+++ b/js/twister_io.js
@@ -219,6 +219,30 @@ 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.attr('href', 'tox:'+text);
+ item.next().attr('data', text);
+ item.parent().show().parent().show();
+ }
+ }, 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.attr('href', 'bitmsg:'+text+'?action=add&label='+username);
+ item.next().attr('data', text);
+ item.parent().show().parent().show();
+ }
+ }, 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..8acd60b 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,12 @@ function saveProfile(e)
profile["bio"] = $(".input-description").val();
profile["location"] = $(".input-city").val();
profile["url"] = $(".input-website").val();
+ var tox = $(".input-tox").val();
+ if( tox.length )
+ profile["tox"] = tox;
+ var bitmessage = $(".input-bitmessage").val();
+ if( bitmessage.length )
+ profile["bitmessage"] = bitmessage;
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 fce8f48..53c3e13 100644
--- a/profile-edit.html
+++ b/profile-edit.html
@@ -88,6 +88,8 @@
+
+