mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-14 22:01:23 +00:00
@@ -21,7 +21,7 @@ exports.synchronous = true;
|
||||
exports.startup = function() {
|
||||
$tw.rootWidget.addEventListener("tm-set-password",function(event) {
|
||||
$tw.passwordPrompt.createPrompt({
|
||||
serviceName: "Set a new password for this TiddlyWiki",
|
||||
serviceName: $tw.language.getString("Encryption/PromptSetPassword"),
|
||||
noUserName: true,
|
||||
submitText: "Set password",
|
||||
canCancel: true,
|
||||
@@ -35,6 +35,11 @@ exports.startup = function() {
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tm-clear-password",function(event) {
|
||||
if($tw.browser) {
|
||||
if(!confirm($tw.language.getString("Encryption/ConfirmClearPassword"))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
$tw.crypto.setPassword(null);
|
||||
});
|
||||
// Ensure that $:/isEncrypted is maintained properly
|
||||
|
||||
Reference in New Issue
Block a user