mirror of https://github.com/keeweb/keeweb.git
Update cordova launcher, remove unnecessary code
This commit is contained in:
parent
bc1d6ce5d8
commit
a80061d97f
|
@ -3,7 +3,7 @@ let Launcher;
|
|||
if (window.process && window.process.versions && window.process.versions.electron) {
|
||||
Launcher = require('./launcher-electron').Launcher;
|
||||
} else if (window.cordova) {
|
||||
// Launcher = require('./launcher-cordova').Launcher; // commented out, while we don't support cordova
|
||||
Launcher = require('./launcher-cordova').Launcher;
|
||||
}
|
||||
|
||||
export { Launcher };
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Events } from 'framework/events';
|
|||
|
||||
const Launcher = {
|
||||
name: 'cordova',
|
||||
version: '6.0.0',
|
||||
version: window.cordova.platformVersion,
|
||||
autoTypeSupported: false,
|
||||
thirdPartyStoragesSupported: false,
|
||||
clipboardSupported: false,
|
||||
|
@ -25,7 +25,7 @@ const Launcher = {
|
|||
window.open(href, '_system');
|
||||
},
|
||||
devTools: false,
|
||||
// openDevTools: function() { },
|
||||
openDevTools() {},
|
||||
getSaveFileName(defaultPath, callback) {
|
||||
/* skip in cordova */
|
||||
},
|
||||
|
@ -181,8 +181,7 @@ const Launcher = {
|
|||
createFsWatcher(path) {
|
||||
return null; // not in android with content provider
|
||||
},
|
||||
// ensureRunnable: function(path) { },
|
||||
|
||||
ensureRunnable(path) {},
|
||||
preventExit(e) {
|
||||
e.returnValue = false;
|
||||
return false;
|
||||
|
@ -190,7 +189,6 @@ const Launcher = {
|
|||
exit() {
|
||||
this.hideApp();
|
||||
},
|
||||
|
||||
requestExit() {
|
||||
/* skip in cordova */
|
||||
},
|
||||
|
@ -200,11 +198,9 @@ const Launcher = {
|
|||
cancelRestart() {
|
||||
/* skip in cordova */
|
||||
},
|
||||
|
||||
setClipboardText(text) {},
|
||||
getClipboardText() {},
|
||||
clearClipboardText() {},
|
||||
|
||||
minimizeApp() {
|
||||
this.hideApp();
|
||||
},
|
||||
|
@ -217,8 +213,7 @@ const Launcher = {
|
|||
updaterEnabled() {
|
||||
return false;
|
||||
},
|
||||
|
||||
// getMainWindow: function() { },
|
||||
// getMainWindow() {},
|
||||
resolveProxy(url, callback) {
|
||||
/* skip in cordova */
|
||||
},
|
||||
|
@ -234,7 +229,7 @@ const Launcher = {
|
|||
showMainWindow() {
|
||||
/* skip in cordova */
|
||||
},
|
||||
// spawn: function(config) { },
|
||||
// spawn(config) {},
|
||||
openFileChooser(callback) {
|
||||
const onFileSelected = function(selected) {
|
||||
window.resolveLocalFileSystemURL(selected.uri, fileEntry => {
|
||||
|
@ -248,7 +243,7 @@ const Launcher = {
|
|||
|
||||
window.cordova.exec(onFileSelected, callback, 'FileChooser', 'choose');
|
||||
},
|
||||
|
||||
setGlobalShortcuts(appSettings) {},
|
||||
fingerprints: {
|
||||
config: {
|
||||
disableBackup: true,
|
||||
|
|
|
@ -921,10 +921,6 @@ class OpenView extends View {
|
|||
}
|
||||
const fileInfo = this.model.fileInfos.get(lastOpenFiles[this.currentSelectedIndex].id);
|
||||
this.showOpenFileInfo(fileInfo);
|
||||
|
||||
if (fileInfo && Launcher && Launcher.fingerprints) {
|
||||
this.openFileWithFingerprint(fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
moveOpenFileSelectionDown() {
|
||||
|
|
Loading…
Reference in New Issue