style fixes

pull/1/head
ansuz 7 years ago
parent 09c0a473e2
commit f90742603e

@ -65,6 +65,11 @@
padding: 5px; padding: 5px;
margin: 10px; margin: 10px;
cursor: pointer; cursor: pointer;
.right-col {
margin-left: 5px;
display: flex;
flex-flow: column;
}
&:hover { &:hover {
background-color: rgba(0,0,0,0.3); background-color: rgba(0,0,0,0.3);
} }
@ -74,9 +79,9 @@
} }
} }
#friendList .friend, #messaging .avatar { #friendList .friend, #messaging .cp-avatar {
.avatar_main(30px); .avatar_main(30px);
&.avatar { &.cp-avatar {
display: flex; display: flex;
} }
cursor: pointer; cursor: pointer;
@ -173,7 +178,7 @@
.remove-history { .remove-history {
.hover; .hover;
} }
.avatar { .cp-avatar {
margin: 10px; margin: 10px;
} }
.more-history { .more-history {

@ -81,10 +81,11 @@ define([
metadataMgr: common.getMetadataMgr(), metadataMgr: common.getMetadataMgr(),
}; };
APP.toolbar = Toolbar.create(configTb); APP.toolbar = Toolbar.create(configTb);
APP.toolbar.$rightside.hide();
var messenger = Messenger.create(sFrameChan); var messenger = Messenger.create(sFrameChan);
UI.create(messenger, $(friendList), $(messaging)); UI.create(messenger, $(friendList), $(messaging), common);
Cryptpad.removeLoadingScreen(); Cryptpad.removeLoadingScreen();

@ -35,7 +35,7 @@ define([
}; };
}; };
UI.create = function (messenger, $userlist, $messages) { UI.create = function (messenger, $userlist, $messages, common) {
var state = window.state = { var state = window.state = {
active: '', active: '',
}; };
@ -168,7 +168,7 @@ define([
}); });
}); });
var avatar = h('div.avatar'); var avatar = h('div.cp-avatar');
var header = h('div.header', [ var header = h('div.header', [
avatar, avatar,
moreHistory, moreHistory,
@ -190,11 +190,11 @@ define([
if (data.avatar && avatars[data.avatar]) { if (data.avatar && avatars[data.avatar]) {
$avatar.append(avatars[data.avatar]).append(rightCol); $avatar.append(avatars[data.avatar]).append(rightCol);
} else { } else {
Cryptpad.displayAvatar($avatar, data.avatar, data.displayName, function ($img) { common.displayAvatar($avatar, data.avatar, data.displayName, function ($img) {
if (data.avatar && $img) { if (data.avatar && $img) {
avatars[data.avatar] = $img[0].outerHTML; avatars[data.avatar] = $img[0].outerHTML;
} }
$avatar.append(rightCol); $(rightCol).insertAfter($avatar);
}); });
} }
@ -325,7 +325,7 @@ define([
markup.friend = function (data) { markup.friend = function (data) {
var curvePublic = data.curvePublic; var curvePublic = data.curvePublic;
var friend = h('div.friend.avatar', { var friend = h('div.friend.cp-avatar', {
'data-key': curvePublic, 'data-key': curvePublic,
}); });
@ -365,7 +365,7 @@ define([
$friend.append(avatars[data.avatar]); $friend.append(avatars[data.avatar]);
$friend.append(rightCol); $friend.append(rightCol);
} else { } else {
Cryptpad.displayAvatar($friend, data.avatar, data.displayName, function ($img) { common.displayAvatar($friend, data.avatar, data.displayName, function ($img) {
if (data.avatar && $img) { if (data.avatar && $img) {
avatars[data.avatar] = $img[0].outerHTML; avatars[data.avatar] = $img[0].outerHTML;
} }

Loading…
Cancel
Save