Display a message about pads deleted from the server

pull/1/head
yflory 7 years ago
parent 7f21b8a566
commit 86144eda22

@ -415,6 +415,7 @@ define(function () {
"Cette action supprimera votre CryptDrive et son historique de votre navigateur, mais les pads existeront toujours (de manière chiffrée) sur notre serveur."; "Cette action supprimera votre CryptDrive et son historique de votre navigateur, mais les pads existeront toujours (de manière chiffrée) sur notre serveur.";
out.fm_padIsOwned = "Vous êtes le propriétaire de ce pad"; out.fm_padIsOwned = "Vous êtes le propriétaire de ce pad";
out.fm_padIsOwnedOther = "Ce pad est la propriété d'un autre utilisateur"; out.fm_padIsOwnedOther = "Ce pad est la propriété d'un autre utilisateur";
out.fm_deletedPads = "Ces pads n'existent plus sur le serveur, ils ont été supprimés de votre CryptDrive: {0}";
// File - Context menu // File - Context menu
out.fc_newfolder = "Nouveau dossier"; out.fc_newfolder = "Nouveau dossier";
out.fc_rename = "Renommer"; out.fc_rename = "Renommer";

@ -417,6 +417,7 @@ define(function () {
"This will remove your CryptDrive and its history from your browser, but your pads will still exist (encrypted) on our server."; "This will remove your CryptDrive and its history from your browser, but your pads will still exist (encrypted) on our server.";
out.fm_padIsOwned = "You are the owner of this pad"; out.fm_padIsOwned = "You are the owner of this pad";
out.fm_padIsOwnedOther = "This pad is owned by another user"; out.fm_padIsOwnedOther = "This pad is owned by another user";
out.fm_deletedPads = "These pads no longer exist on the server, they've been removed from your CryptDrive: {0}";
// File - Context menu // File - Context menu
out.fc_newfolder = "New folder"; out.fc_newfolder = "New folder";
out.fc_rename = "Rename"; out.fc_rename = "Rename";

@ -102,8 +102,8 @@ define([
// Push channels owned by someone else or channel that should have expired // Push channels owned by someone else or channel that should have expired
// because of the expiration time // because of the expiration time
if ((data.owners && data.owners.indexOf(edPublic) === -1) || if ((data.owners && data.owners.length && data.owners.indexOf(edPublic) === -1) ||
data.expire < (+new Date())) { (data.expire && data.expire < (+new Date()))) {
list.push(Hash.hrefToHexChannelId(data.href)); list.push(Hash.hrefToHexChannelId(data.href));
} }
}); });

@ -1435,6 +1435,7 @@ define([
case FILES_DATA: pName = FILES_DATA_NAME; break; case FILES_DATA: pName = FILES_DATA_NAME; break;
case SEARCH: pName = SEARCH_NAME; break; case SEARCH: pName = SEARCH_NAME; break;
case RECENT: pName = RECENT_NAME; break; case RECENT: pName = RECENT_NAME; break;
case OWNED: pName = OWNED_NAME; break;
default: pName = name; default: pName = name;
} }
return pName; return pName;
@ -2978,10 +2979,15 @@ define([
sframeChan.query('Q_DRIVE_GETDELETED', null, function (err, data) { sframeChan.query('Q_DRIVE_GETDELETED', null, function (err, data) {
var ids = filesOp.findChannels(data); var ids = filesOp.findChannels(data);
var titles = [];
ids.forEach(function (id) { ids.forEach(function (id) {
var title = filesOp.getTitle(id);
titles.push(title);
var paths = filesOp.findFile(id); var paths = filesOp.findFile(id);
filesOp.delete(paths, refresh); filesOp.delete(paths, refresh);
}); });
if (!titles.length) { return; }
UI.log(Messages._getKey('fm_deletedPads', [titles.join(', ')]));
}); });
}; };

Loading…
Cancel
Save