mirror of https://github.com/xwiki-labs/cryptpad
Display an alert in the drive when the limit is reached
This commit is contained in:
parent
40b99e7bbf
commit
d55b7e411c
|
@ -73,8 +73,10 @@ define(function () {
|
|||
out.redLight = "Vous êtes déconnectés de la session";
|
||||
|
||||
out.pinLimitReached = "Vous avez atteint votre limite de stockage";
|
||||
out.pinLimitReachedAlert = "Vous avez atteint votre limite de stockage. Les nouveaux pads ne seront pas enregistrés dans votre CrypDrive.<br>" +
|
||||
"Pour résoudre ce problème, vous pouvez soit supprimer des pads de votre CryptDrive (y compris la corbeille), soit vous abonner à une offre premium pour augmenter la limite maximale.";
|
||||
out.updated_0_pinLimitReachedAlert = "Vous avez atteint votre limite de stockage. Les nouveaux pads ne seront pas enregistrés dans votre CryptDrive.<br>" +
|
||||
'Vous pouvez soit supprimer des pads de votre CryptDrive, soit vous <a href="https://accounts.cryptpad.fr/#!on={0}" target="_blank">abonner à une offre premium</a> pour augmenter la limite maximale.';
|
||||
out.pinLimitReachedAlert = out.updated_0_pinLimitReachedAlert;
|
||||
out.pinAboveLimitAlert = 'Depuis la dernière version, nous imposons désormais une limite de 50 Mo de stockage gratuit et vous utilisez actuellement {0}. You devriez soit supprimer certains pads ou soit vous abonner sur <a href="https://accounts.cryptpad.fr/#!on={1}" target="_blank">accounts.cryptpad.fr</a>. Votre contribution nous aidera à améliorer CryptPad et à répandre le Zero Knowledge. Vous pouvez contacter le <a href="https://accounts.cryptpad.fr/#/support" target="_blank">support</a> pour tout problème ou question concernant ces changements.';
|
||||
out.pinLimitNotPinned = "Vous avez atteint votre limite de stockage.<br>"+
|
||||
"Ce pad n'est pas enregistré dans votre CryptDrive.";
|
||||
out.pinLimitDrive = out.pinLimitReached+ ".<br>" +
|
||||
|
@ -238,7 +240,8 @@ define(function () {
|
|||
out.fm_info_root = "Créez ici autant de dossiers que vous le souhaitez pour trier vos fichiers.";
|
||||
out.fm_info_unsorted = 'Contient tous les pads que vous avez ouvert et qui ne sont pas triés dans "Documents" ou déplacés vers la "Corbeille".'; // "My Documents" should match with the "out.fm_rootName" key, and "Trash" with "out.fm_trashName"
|
||||
out.fm_info_template = "Contient tous les fichiers que vous avez sauvés en tant que modèle afin de les réutiliser lors de la création d'un nouveau pad.";
|
||||
out.fm_info_trash = 'Les fichiers supprimés dans la corbeille sont également enlevés de "Tous les fichiers" et il est impossible de les récupérer depuis l\'explorateur de fichiers.'; // Same here for "All files" and "out.fm_filesDataName"
|
||||
out.updated_0_fm_info_trash = "Vider la corbeille permet de libérer de l'espace dans votre CryptDrive";
|
||||
out.fm_info_trash = out.updated_0_fm_info_trash;
|
||||
out.fm_info_allFiles = 'Contient tous les fichiers de "Documents", "Fichiers non triés" et "Corbeille". Vous ne pouvez pas supprimer ou déplacer des fichiers depuis cet endroit.'; // Same here
|
||||
out.fm_info_anonymous = 'Vous n\'êtes pas connectés, ces pads risquent donc d\'être supprimés (<a href="https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/" target="_blank">découvrez pourquoi</a>). ' +
|
||||
'<a href="/register/">Inscrivez-vous</a> ou <a href="/login/">connectez-vous</a> pour les maintenir en vie.';
|
||||
|
|
|
@ -75,8 +75,10 @@ define(function () {
|
|||
out.redLight = "You are disconnected from the session";
|
||||
|
||||
out.pinLimitReached = "You've reached your storage limit";
|
||||
out.pinLimitReachedAlert = "You've reached your storage limit. New pads won't be stored in your CryptDrive.<br>" +
|
||||
"To fix this problem, you can either remove pads from your CryptDrive (including the trash) or subscribe to a premium offer to increase your limit.";
|
||||
out.updated_0_pinLimitReachedAlert = "You've reached your storage limit. New pads won't be stored in your CryptDrive.<br>" +
|
||||
'You can either remove pads from your CryptDrive or <a href="https://accounts.cryptpad.fr/#!on={0}" target="_blank">subscribe to a premium offer</a> to increase your limit.';
|
||||
out.pinLimitReachedAlert = out.updated_0_pinLimitReachedAlert;
|
||||
out.pinAboveLimitAlert = 'As of this release, we are imposing a 50MB limit on free data storage and you are currently using {0}. You will need to either delete some pads or subscribe on <a href="https://accounts.cryptpad.fr/#!on={1}" target="_blank">accounts.cryptpad.fr</a>. Your contribution will help us improve CryptPad and spread Zero Knowledge. Please contact <a href="https://accounts.cryptpad.fr/#/support" target="_blank">support</a> if you have any other questions.';
|
||||
out.pinLimitNotPinned = "You've reached your storage limit.<br>"+
|
||||
"This pad is not stored in your CryptDrive.";
|
||||
out.pinLimitDrive = "You've reached your storage limit.<br>" +
|
||||
|
@ -240,7 +242,8 @@ define(function () {
|
|||
out.fm_info_root = "Create as many nested folders here as you want to sort your files.";
|
||||
out.fm_info_unsorted = 'Contains all the files you\'ve visited that are not yet sorted in "Documents" or moved to the "Trash".'; // "My Documents" should match with the "out.fm_rootName" key, and "Trash" with "out.fm_trashName"
|
||||
out.fm_info_template = 'Contains all the pads stored as templates and that you can re-use when you create a new pad.';
|
||||
out.fm_info_trash = 'Files deleted from the trash are also removed from "All files" and it is impossible to recover them from the file manager.'; // Same here for "All files" and "out.fm_filesDataName"
|
||||
out.updated_0_fm_info_trash = 'Empty your trash to free space in your CryptDrive.';
|
||||
out.fm_info_trash = out.updated_0_fm_info_trash;
|
||||
out.fm_info_allFiles = 'Contains all the files from "Documents", "Unsorted" and "Trash". You can\'t move or remove files from here.'; // Same here
|
||||
out.fm_info_anonymous = 'You are not logged in so these pads may be deleted (<a href="https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/" target="_blank">find out why</a>). ' +
|
||||
'<a href="/register/">Sign up</a> or <a href="/login/">Log in</a> to keep them alive.';
|
||||
|
|
|
@ -792,6 +792,7 @@ define([
|
|||
};
|
||||
|
||||
var LIMIT_REFRESH_RATE = 30000; // milliseconds
|
||||
var limitReachedDisplayed = false;
|
||||
common.createUsageBar = function (cb, alwaysDisplayUpgrade) {
|
||||
var todo = function (err, state, data) {
|
||||
var $container = $('<span>', {'class':'limit-container'});
|
||||
|
@ -830,18 +831,24 @@ define([
|
|||
var prettyLimit;
|
||||
|
||||
if (unit === 'GB') {
|
||||
prettyUsage = usage; //Messages._getKey('formattedGB', [usage]);
|
||||
prettyUsage = Messages._getKey('formattedGB', [usage]);
|
||||
prettyLimit = Messages._getKey('formattedGB', [limit]);
|
||||
} else {
|
||||
prettyUsage = usage; //Messages._getKey('formattedMB', [usage]);
|
||||
prettyUsage = Messages._getKey('formattedMB', [usage]);
|
||||
prettyLimit = Messages._getKey('formattedMB', [limit]);
|
||||
}
|
||||
|
||||
if (quota < 0.8) { $usage.addClass('normal'); }
|
||||
else if (quota < 1) { $usage.addClass('warning'); }
|
||||
else { $usage.addClass('above'); }
|
||||
else {
|
||||
$usage.addClass('above');
|
||||
if (!limitReachedDisplayed) {
|
||||
limitReachedDisplayed = true;
|
||||
common.alert(Messages._getKey('pinAboveLimitAlert', [prettyUsage, encodeURIComponent(window.location.hostname)]), null, true);
|
||||
}
|
||||
}
|
||||
var $text = $('<span>', {'class': 'usageText'});
|
||||
$text.text(prettyUsage + ' / ' + prettyLimit);
|
||||
$text.text(usage + ' / ' + prettyLimit);
|
||||
$limit.append($usage).append($text);
|
||||
window.setTimeout(function () {
|
||||
common.isOverPinLimit(todo);
|
||||
|
|
|
@ -617,7 +617,7 @@ define([
|
|||
if (e) { return void console.error("Unable to get the pinned usage"); }
|
||||
if (overLimit) {
|
||||
$limit.show().click(function () {
|
||||
Cryptpad.alert(Messages.pinLimitReachedAlert, null, true);
|
||||
Cryptpad.alert(Messages._getKey('pinLimitReachedAlert', [encodeURIComponent(window.location.hostname)]), null, true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue