mirror of https://github.com/keeweb/keeweb.git
desktop Dropbox
This commit is contained in:
parent
04f3eed580
commit
b5aebd7917
2
TODO.md
2
TODO.md
|
@ -2,6 +2,7 @@
|
|||
|
||||
## v0.4
|
||||
Nov
|
||||
- [x] desktop dropbox
|
||||
- [ ] lock flow, auto-lock
|
||||
- [ ] minimize to tray
|
||||
- [ ] trim history by rules
|
||||
|
@ -35,7 +36,6 @@ Feb
|
|||
- [ ] QA
|
||||
|
||||
## Future
|
||||
- [ ] desktop dropbox
|
||||
- [ ] auto-type for desktop
|
||||
- [ ] file type associations
|
||||
- [ ] one-time passwords
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
var Dropbox = require('dropbox'),
|
||||
Alerts = require('./alerts');
|
||||
Alerts = require('./alerts'),
|
||||
Launcher = require('./launcher');
|
||||
|
||||
var DropboxKeys = {
|
||||
AppFolder: 'qp7ctun6qt5n9d6'
|
||||
|
@ -113,8 +114,12 @@ var DropboxLink = {
|
|||
complete(null, this._dropboxClient);
|
||||
return;
|
||||
}
|
||||
var client = new Dropbox.Client({ key: DropboxKeys.AppFolder });
|
||||
client.authDriver(new Dropbox.AuthDriver.Popup({ receiverUrl: location.href }));
|
||||
var client = new Dropbox.Client({key: DropboxKeys.AppFolder});
|
||||
if (Launcher) {
|
||||
client.authDriver(new Dropbox.AuthDriver.Electron({ receiverUrl: location.href }));
|
||||
} else {
|
||||
client.authDriver(new Dropbox.AuthDriver.Popup({ receiverUrl: location.href }));
|
||||
}
|
||||
client.authenticate((function(error, client) {
|
||||
if (!error) {
|
||||
this._dropboxClient = client;
|
||||
|
|
|
@ -50,7 +50,7 @@ var OpenView = Backbone.View.extend({
|
|||
if (this.dragTimeout) {
|
||||
clearTimeout(this.dragTimeout);
|
||||
}
|
||||
this.renderTemplate({ supportsDropbox: !Launcher, lastOpenFiles: this.getLastOpenFiles() });
|
||||
this.renderTemplate({ lastOpenFiles: this.getLastOpenFiles() });
|
||||
this.inputEl = this.$el.find('.open__pass-input');
|
||||
this.passwordInput.setElement(this.inputEl);
|
||||
return this;
|
||||
|
|
|
@ -38,7 +38,6 @@ var SettingsAboutView = Backbone.View.extend({
|
|||
this.renderTemplate({
|
||||
cmd: FeatureDetector.actionShortcutSymbol(true),
|
||||
supportFiles: !!Launcher,
|
||||
supportsDropbox: !Launcher,
|
||||
desktopLink: Links.Desktop,
|
||||
|
||||
name: this.model.get('name'),
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
<i class="fa fa-plus open__icon-i"></i>
|
||||
<div class="open__icon-text">New</div>
|
||||
</div>
|
||||
<% if (supportsDropbox) { %>
|
||||
<div class="open__icon open__icon-dropbox">
|
||||
<i class="fa fa-dropbox open__icon-i"></i>
|
||||
<div class="open__icon-text">Dropbox</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="open__icon open__icon-demo">
|
||||
<i class="fa fa-magic open__icon-i"></i>
|
||||
<div class="open__icon-text">Demo</div>
|
||||
|
@ -34,9 +32,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">key file</span>
|
||||
<% if (supportsDropbox) { %>
|
||||
<span class="open__settings-key-file-dropbox"> (from dropbox)</span>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="open__settings-offline hide">
|
||||
<input type="checkbox" id="open__settings-check-offline" class="open__settings-check-offline" checked disabled />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<% } %>
|
||||
<% } else { %>
|
||||
<p>This database is loaded in memory. To enable auto-save and saving with shortcut <%= cmd %>S,
|
||||
please, save it to <%= supportFiles ? 'file' : 'Dropbox' %>.</p>
|
||||
please, save it to <%= supportFiles ? 'file or ' : '' %>Dropbox.</p>
|
||||
<% if (!supportFiles) { %>
|
||||
<p>Want to work seamlessly with local files? <a href="<%= desktopLink %>" target="_blank">Download a desktop app</a></p>
|
||||
<% } %>
|
||||
|
@ -17,10 +17,8 @@
|
|||
<div class="settings__file-buttons">
|
||||
<button class="settings__file-button-save-file btn-silent">Save to file</button>
|
||||
<button class="settings__file-button-export-xml btn-silent">Export to XML</button>
|
||||
<% if (supportsDropbox) { %>
|
||||
<button class="settings__file-button-save-dropbox btn-silent" <%= syncing ? 'disabled' : '' %>>
|
||||
Sync with Dropbox <%= syncing ? '(working...)' : '' %></button>
|
||||
<% } %>
|
||||
<button class="settings__file-button-close btn-silent">Close</button>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"backbone": "~1.2.3",
|
||||
"baron": "~0.7.11",
|
||||
"bourbon": "~4.2.5",
|
||||
"dropbox": "antelle/dropbox-js#0.10.4",
|
||||
"dropbox": "antelle/dropbox-js#0.10.5",
|
||||
"font-awesome": "~4.4.0",
|
||||
"install": "~1.0.4",
|
||||
"kdbxweb": "~0.2.5",
|
||||
|
|
|
@ -57,6 +57,9 @@ app.quitAndRestart = function() {
|
|||
app.quit();
|
||||
setTimeout(function() { restartPending = false; }, 1000);
|
||||
};
|
||||
app.openWindow = function(opts) {
|
||||
return new BrowserWindow(opts);
|
||||
};
|
||||
|
||||
function setMenu() {
|
||||
if (process.platform === 'darwin') {
|
||||
|
|
|
@ -3,6 +3,7 @@ Release notes
|
|||
##### vNext
|
||||
Bugfixes
|
||||
`-` fixed tag list scrolling
|
||||
`+` desktop Dropbox
|
||||
|
||||
##### v0.3.0 (2015-11-14)
|
||||
Auto-update
|
||||
|
|
Loading…
Reference in New Issue