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

Cordova launcher formatting

This commit is contained in:
Alex Shpak 2017-03-29 00:25:16 +02:00
parent ad246ba180
commit 1b6ecd1e70

View File

@ -15,9 +15,7 @@ const Launcher = {
}, },
devTools: false, devTools: false,
// openDevTools: function() { }, // openDevTools: function() { },
getSaveFileName: function(defaultPath, callback) { getSaveFileName: function(defaultPath, callback) { /* skip in cordova */ },
// Not in cordova
},
getDataPath: function() { getDataPath: function() {
const storagePath = window.cordova.file.externalDataDirectory; const storagePath = window.cordova.file.externalDataDirectory;
return [storagePath].concat(Array.from(arguments)).filter(s => !!s); return [storagePath].concat(Array.from(arguments)).filter(s => !!s);
@ -128,15 +126,11 @@ const Launcher = {
exit: function() { exit: function() {
this.hideApp(); this.hideApp();
}, },
requestExit: function() { requestExit: function() { /* skip in cordova */ },
// skip in cordova
},
requestRestart: function() { requestRestart: function() {
window.location.reload(); window.location.reload();
}, },
cancelRestart: function() { cancelRestart: function() { /* skip in cordova */ },
// skip in cordova
},
setClipboardText: function(text) { setClipboardText: function(text) {
return document.execCommand('copy'); return document.execCommand('copy');
}, },
@ -150,27 +144,19 @@ const Launcher = {
this.hideApp(); this.hideApp();
}, },
canMinimize: function() { canMinimize: function() {
return true; return false;
}, },
updaterEnabled: function() { updaterEnabled: function() {
return false; return false;
}, },
// getMainWindow: function() { }, // getMainWindow: function() { },
resolveProxy: function(url, callback) { resolveProxy: function(url, callback) { /* skip in cordova */ },
// skip in cordova openWindow: function(opts) { /* skip in cordova */ },
}, hideApp: function() { /* skip in cordova */ },
openWindow: function(opts) {
// skip in cordova
},
hideApp: function() { // home button
// TODO
},
isAppFocused: function() { isAppFocused: function() {
return false; // skip in cordova return false; /* skip in cordova */
},
showMainWindow: function() {
// skip in cordova
}, },
showMainWindow: function() { /* skip in cordova */ },
// spawn: function(config) { }, // spawn: function(config) { },
openFileChooser: function(callback, button) { openFileChooser: function(callback, button) {
const onFileSelected = function(selected) { const onFileSelected = function(selected) {