Fix UI issues

pull/1/head
yflory 5 years ago
parent c64adea8ff
commit e15b57989b

@ -462,6 +462,10 @@
} }
} }
margin-bottom: 15px; margin-bottom: 15px;
&:empty {
margin: 0;
display: none;
}
} }
.cp-share-friend { .cp-share-friend {
width: 70px; width: 70px;
@ -493,6 +497,11 @@
visibility: hidden; visibility: hidden;
} }
} }
.cp-ownership {
& > label {
font-weight: bold;
}
}
} }
} }

@ -103,8 +103,8 @@ define([
var redrawAll = function () {}; var redrawAll = function () {};
var div1 = h('div.cp-share-friends.cp-share-column'); var div1 = h('div.cp-share-friends.cp-share-column.cp-ownership');
var div2 = h('div.cp-share-friends.cp-share-column'); var div2 = h('div.cp-share-friends.cp-share-column.cp-ownership');
var $div1 = $(div1); var $div1 = $(div1);
var $div2 = $(div2); var $div2 = $(div2);
@ -139,7 +139,6 @@ define([
friends: _owners, friends: _owners,
noFilter: true noFilter: true
}, function () { }, function () {
console.log(arguments);
}); });
var $div = $(removeCol.div); var $div = $(removeCol.div);
var others1 = removeCol.others; var others1 = removeCol.others;
@ -162,6 +161,7 @@ define([
// Check selection // Check selection
var $sel = $div.find('.cp-share-friend.cp-selected'); var $sel = $div.find('.cp-share-friend.cp-selected');
var sel = $sel.toArray(); var sel = $sel.toArray();
if (!sel.length) { return; }
var me = false; var me = false;
var toRemove = sel.map(function (el) { var toRemove = sel.map(function (el) {
var ed = $(el).attr('data-ed'); var ed = $(el).attr('data-ed');
@ -256,6 +256,7 @@ define([
$(addButton).click(function () { $(addButton).click(function () {
// Check selection // Check selection
var $sel = $div2.find('.cp-share-friend.cp-selected'); var $sel = $div2.find('.cp-share-friend.cp-selected');
if (!sel.length) { return; }
var sel = $sel.toArray(); var sel = $sel.toArray();
var toAdd = sel.map(function (el) { var toAdd = sel.map(function (el) {
return friends[$(el).attr('data-curve')].edPublic; return friends[$(el).attr('data-curve')].edPublic;

Loading…
Cancel
Save