When trying to reset the drive, tell the user if the input text is invalid

This commit is contained in:
yflory
2017-03-02 17:01:27 +01:00
parent 9a7c2dd5e2
commit 2b6e44189d
3 changed files with 6 additions and 1 deletions

View File

@@ -165,7 +165,10 @@ define([
$button.click(function () {
Cryptpad.prompt(Messages.settings_resetPrompt, "", function (val) {
if (val !== "I love CryptPad") { return; }
if (val !== "I love CryptPad") {
Cryptpad.alert(Messages.settings_resetError);
return;
}
obj.proxy.drive = Cryptpad.getStore().getEmptyObject();
Cryptpad.alert(Messages.settings_resetDone);
});