1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-21 07:06:39 +02:00

fix #155: show dropbox chooser only if it's working

This commit is contained in:
Antelle 2016-03-13 16:41:55 +03:00
parent 5185434b97
commit b6c09dc0c0
3 changed files with 6 additions and 1 deletions

View File

@ -293,6 +293,10 @@ var DropboxLink = {
this._callAndHandleError('remove', [fileName], complete);
},
canChooseFile: function() {
return !Launcher;
},
chooseFile: function(callback) {
new DropboxChooser(callback).choose();
}

View File

@ -67,6 +67,7 @@ var OpenView = Backbone.View.extend({
}
this.renderTemplate({
lastOpenFiles: this.getLastOpenFiles(),
canOpenKeyFromDropbox: DropboxLink.canChooseFile(),
demoOpened: this.model.settings.get('demoOpened')
});
this.inputEl = this.$el.find('.open__pass-input');

View File

@ -62,7 +62,7 @@
<div class="open__settings-key-file hide">
<i class="fa fa-key open__settings-key-file-icon">
</i><span class="open__settings-key-file-name">{{res 'openKeyFile'}}</span>
<span class="open__settings-key-file-dropbox"> {{res 'openKeyFileDropbox'}}</span>
{{#if canOpenKeyFromDropbox}}<span class="open__settings-key-file-dropbox"> {{res 'openKeyFileDropbox'}}</span>{{/if}}
</div>
</div>
<div class="open__last">