mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-29 14:47:40 +00:00
Syncer: Allow syncadaptor to customise the login prompt
This commit is contained in:
@@ -400,7 +400,7 @@ Syncer.prototype.handleLoginEvent = function() {
|
||||
var self = this;
|
||||
this.getStatus(function(err,isLoggedIn,username) {
|
||||
if(!err && !isLoggedIn) {
|
||||
$tw.passwordPrompt.createPrompt({
|
||||
var promptInfo = $tw.passwordPrompt.createPrompt({
|
||||
serviceName: $tw.language.getString("LoginToTiddlySpace"),
|
||||
callback: function(data) {
|
||||
self.login(data.username,data.password,function(err,isLoggedIn) {
|
||||
@@ -409,6 +409,10 @@ Syncer.prototype.handleLoginEvent = function() {
|
||||
return true; // Get rid of the password prompt
|
||||
}
|
||||
});
|
||||
// Let the sync adaptor adjust the prompt
|
||||
if(self.syncadaptor && self.syncadaptor.customiseLoginPrompt) {
|
||||
self.syncadaptor.customiseLoginPrompt(promptInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user