Fix UI issues with the new share modal and notifications

pull/1/head
yflory 6 years ago
parent a43fc5efef
commit b0ef3d6021

@ -10,7 +10,7 @@
display: flex;
flex-flow: column;
.cp-notification {
height: @notif-height;
min-height: @notif-height;
display: flex;
.cp-notification-content {
flex: 1;

@ -4,6 +4,7 @@
@import (reference) './avatar.less';
@import (reference) './checkmark.less';
@import (reference) './password-input.less';
@import (reference) "./tools.less";
.share_main () {
.alertify_main();
.checkmark_main(20px);
@ -41,6 +42,7 @@
display: flex;
input {
flex: 1;
min-width: 0;
margin-bottom: 0 !important;
&::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: @colortheme_alertify-primary-text;
@ -60,6 +62,7 @@
margin-bottom: 6px;
cursor: default;
transition: order 0.5s, background-color 0.5s;
.tools_unselectable();
&.cp-selected {
background-color: @colortheme_alertify-primary;

@ -343,6 +343,7 @@ define([
'data-curve': data.curvePublic,
'data-name': data.displayName,
'data-order': i,
title: data.displayName,
style: 'order:'+i+';'
},[
avatar,
@ -392,17 +393,6 @@ define([
};
$(inputFilter).on('keydown keyup change', redraw);
$(buttonSelect).click(function () {
$div.find('.cp-share-friend:not(.cp-selected):visible').addClass('cp-selected');
});
$(buttonDeselect).click(function () {
$div.find('.cp-share-friend.cp-selected').removeClass('cp-selected').each(function (i, el) {
var order = $(el).attr('data-order');
if (!order) { return; }
$(el).attr('style', 'order:'+order);
});
redraw();
});
// Replace "copy link" by "share with friends" if at least one friedn is selected
// Also create the "share with friends" button if it doesn't exist
@ -459,6 +449,19 @@ define([
}
};
$(buttonSelect).click(function () {
$div.find('.cp-share-friend:not(.cp-fake-friend):not(.cp-selected):visible').addClass('cp-selected');
refreshButtons();
});
$(buttonDeselect).click(function () {
$div.find('.cp-share-friend.cp-selected').removeClass('cp-selected').each(function (i, el) {
var order = $(el).attr('data-order');
if (!order) { return; }
$(el).attr('style', 'order:'+order);
});
redraw();
refreshButtons();
});
common.getAttribute(['general', 'share-friends'], function (err, val) {
order = val || [];

Loading…
Cancel
Save