mirror of https://github.com/keeweb/keeweb.git
Remove cloud drives from cordova
This commit is contained in:
parent
0e2b1386ec
commit
c799574aee
|
@ -1,9 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const Alerts = require('../comp/alerts');
|
||||
|
||||
const Launcher = {
|
||||
name: 'android',
|
||||
name: 'cordova',
|
||||
version: '6.0.0',
|
||||
autoTypeSupported: false,
|
||||
ready: function(callback) {
|
||||
|
@ -16,17 +14,7 @@ const Launcher = {
|
|||
window.open(href, '_system');
|
||||
},
|
||||
getSaveFileName: function(defaultPath, callback) {
|
||||
if (defaultPath) {
|
||||
defaultPath = [this.externalRoot, defaultPath].join('/');
|
||||
|
||||
Alerts.yesno({
|
||||
header: 'Save file',
|
||||
body: defaultPath,
|
||||
success: () => {
|
||||
callback(defaultPath);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Not in cordova
|
||||
},
|
||||
getDir: function() {
|
||||
const storagePath = window.cordova.file.externalDataDirectory;
|
||||
|
|
|
@ -12,4 +12,11 @@ const ThirdPartyStorage = {
|
|||
onedrive: require('./storage-onedrive')
|
||||
};
|
||||
|
||||
module.exports = _.extend({}, BuiltInStorage, ThirdPartyStorage);
|
||||
let storages;
|
||||
if (Launcher.name === 'cordova') {
|
||||
storages = BuiltInStorage;
|
||||
} else {
|
||||
storages = _.extend(BuiltInStorage, ThirdPartyStorage);
|
||||
}
|
||||
|
||||
module.exports = storages;
|
||||
|
|
Loading…
Reference in New Issue