Add passwod prompt to access protected pads

This commit is contained in:
yflory
2018-04-25 19:03:58 +02:00
parent 811463b870
commit 1879c1829c
17 changed files with 281 additions and 69 deletions

View File

@@ -594,7 +594,12 @@ define([
$('.cp-loading-spinner-container').hide();
$('#cp-loading-tip').remove();
if (transparent) { $('#' + LOADING).css('opacity', 0.9); }
$('#' + LOADING).find('p').show().html(error || Messages.error);
var $error = $('#' + LOADING).find('p').show();
if (error instanceof Element) {
$error.html('').append(error);
} else {
$error.html(error || Messages.error);
}
if (exitable) {
$(window).focus();
$(window).keydown(function (e) {
@@ -624,6 +629,7 @@ define([
var type = data.type;
if (!href && !type) { return $icon; }
// Password not needed to get the type
if (!type) { type = Hash.parsePadUrl(href).type; }
$icon = UI.getIcon(type);