Add a way to show the drive tips again
This commit is contained in:
@@ -317,7 +317,9 @@ define(function () {
|
||||
"Êtes-vous sûr de vouloir continuer ?<br>" +
|
||||
"Tapez “<em>I love CryptPad</em>” pour confirmer.";
|
||||
out.settings_resetDone = "Votre drive est désormais vide!";
|
||||
|
||||
out.settings_resetTips = "Astuces et informations dans CryptDrive";
|
||||
out.settings_resetTipsButton = "Réinitialiser les astuces visibles dans CryptDrive";
|
||||
out.settings_resetTipsDone = "Toutes les astuces sont de nouveau visibles.";
|
||||
|
||||
// index.html
|
||||
|
||||
|
||||
@@ -318,6 +318,9 @@ define(function () {
|
||||
"Are you sure you want to continue?<br>" +
|
||||
"Type “<em>I love CryptPad</em>” to confirm.";
|
||||
out.settings_resetDone = "Your drive is now empty!";
|
||||
out.settings_resetTips = "Tips in CryptDrive";
|
||||
out.settings_resetTipsButton = "Reset the available tips in CryptDrive";
|
||||
out.settings_resetTipsDone = "All the tips are now visible again.";
|
||||
|
||||
// index.html
|
||||
|
||||
|
||||
@@ -95,7 +95,24 @@ define([
|
||||
|
||||
return $div;
|
||||
};
|
||||
|
||||
var createResetTips = function () {
|
||||
var $div = $('<div>', {'class': 'resetTips'});
|
||||
var $label = $('<label>', {'for' : 'resetTips'}).text(Messages.settings_resetTips).appendTo($div);
|
||||
$('<br>').appendTo($div);
|
||||
var $button = $('<button>', {'id': 'resetTips', 'class': 'btn btn-primary'})
|
||||
.text(Messages.settings_resetTipsButton).appendTo($div);
|
||||
|
||||
$button.click(function () {
|
||||
Object.keys(localStorage).forEach(function (k) {
|
||||
if(k.slice(0, 9) === "hide-info") {
|
||||
delete localStorage[k];
|
||||
}
|
||||
});
|
||||
Cryptpad.alert(Messages.settings_resetTipsDone);
|
||||
});
|
||||
|
||||
return $div;
|
||||
};
|
||||
|
||||
var createBackupDrive = function (store) {
|
||||
@@ -155,6 +172,7 @@ define([
|
||||
|
||||
var andThen = function (obj) {
|
||||
APP.$container.append(createTitle());
|
||||
APP.$container.append(createInfoBlock(obj));
|
||||
APP.$container.append(createDisplayNameInput(obj));
|
||||
APP.$container.append(createResetTips());
|
||||
APP.$container.append(createBackupDrive(obj));
|
||||
|
||||
Reference in New Issue
Block a user