mirror of https://github.com/keeweb/keeweb.git
reset dropbox client on change
This commit is contained in:
parent
cf20379c93
commit
3fa3c17291
|
@ -264,6 +264,10 @@ var DropboxLink = {
|
|||
this._getClient(function(err) { complete(err); }, overrideAppKey);
|
||||
},
|
||||
|
||||
resetClient: function() {
|
||||
this._dropboxClient = null;
|
||||
},
|
||||
|
||||
receive: function() {
|
||||
Dropbox.AuthDriver.Popup.oauthReceiver();
|
||||
},
|
||||
|
|
|
@ -110,6 +110,7 @@ var StorageDropbox = {
|
|||
dropboxAppKey: config.key,
|
||||
dropboxFolder: config.folder
|
||||
});
|
||||
DropboxLink.resetClient();
|
||||
}
|
||||
callback(err);
|
||||
}, config.key);
|
||||
|
@ -129,7 +130,10 @@ var StorageDropbox = {
|
|||
case 'custom':
|
||||
value = '(your app key)';
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
DropboxLink.resetClient();
|
||||
break;
|
||||
case 'key':
|
||||
key = 'dropboxAppKey';
|
||||
|
@ -201,7 +205,8 @@ var StorageDropbox = {
|
|||
rev: f.versionTag
|
||||
};
|
||||
});
|
||||
var dir = dirStat.inAppFolder ? Locale.openAppFolder : UrlUtils.trimStartSlash(dirStat.path);
|
||||
var dir = dirStat.inAppFolder ? Locale.openAppFolder :
|
||||
(UrlUtils.trimStartSlash(dirStat.path) || Locale.openRootFolder);
|
||||
callback(null, fileList, dir);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -120,6 +120,7 @@ var Locale = {
|
|||
openNothingFound: 'Nothing found',
|
||||
openNothingFoundBody: 'No files which could be opened (files are searched inside {} folder).',
|
||||
openAppFolder: 'app',
|
||||
openRootFolder: 'root',
|
||||
openSelectFile: 'Select a file',
|
||||
openSelectFileBody: 'Select a file which you would like to open',
|
||||
openPassFor: 'Password for',
|
||||
|
|
Loading…
Reference in New Issue