Remove cloud drives from cordova

This commit is contained in:
Alex Shpak 2017-02-22 01:35:16 +01:00
parent 0e2b1386ec
commit c799574aee
2 changed files with 10 additions and 15 deletions

View File

@ -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;

View File

@ -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;