mirror of https://github.com/keeweb/keeweb.git
Added separate html file for cordova apps
This commit is contained in:
parent
3f15c4a6b8
commit
b35edd8c9c
15
Gruntfile.js
15
Gruntfile.js
|
@ -155,6 +155,11 @@ module.exports = function(grunt) {
|
|||
dest: 'tmp/index.html',
|
||||
nonull: true
|
||||
},
|
||||
cordova: {
|
||||
src: 'app/cordova.html',
|
||||
dest: 'tmp/cordova.html',
|
||||
nonull: true
|
||||
},
|
||||
favicon: {
|
||||
src: 'app/favicon.png',
|
||||
dest: 'tmp/favicon.png',
|
||||
|
@ -237,7 +242,11 @@ module.exports = function(grunt) {
|
|||
inline: {
|
||||
app: {
|
||||
src: 'tmp/index.html',
|
||||
dest: 'tmp/app.html'
|
||||
dest: 'tmp/index_inline.html'
|
||||
},
|
||||
cordova: {
|
||||
src: 'tmp/cordova.html',
|
||||
dest: 'tmp/cordova_inline.html'
|
||||
}
|
||||
},
|
||||
htmlmin: {
|
||||
|
@ -247,7 +256,8 @@ module.exports = function(grunt) {
|
|||
},
|
||||
app: {
|
||||
files: {
|
||||
'dist/index.html': 'tmp/app.html'
|
||||
'dist/index.html': 'tmp/index_inline.html',
|
||||
'dist/cordova.html': 'tmp/cordova_inline.html'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -602,6 +612,7 @@ module.exports = function(grunt) {
|
|||
'clean',
|
||||
'eslint',
|
||||
'copy:html',
|
||||
'copy:cordova',
|
||||
'copy:favicon',
|
||||
'copy:touchicon',
|
||||
'copy:fonts',
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>KeeWeb</title>
|
||||
<meta name="kw-signature" content="">
|
||||
<meta name="kw-config" content="(no-config)">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="theme-color" content="#6386EC">
|
||||
<link rel="shortcut icon" href="favicon.png?__inline=true" />
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="touchicon.png?__inline=true">
|
||||
<link rel="stylesheet" href="css/main.css?__inline=true" />
|
||||
<script type="text/javascript" src="cordova.js"></script>
|
||||
<script src="js/vendor.js?__inline=true"></script>
|
||||
<script src="js/app.js?__inline=true"></script>
|
||||
</head>
|
||||
<body class="th-d">
|
||||
<noscript>
|
||||
<h1>KeeWeb</h1>
|
||||
<p>This app is written entirely in JavaScript. Please, enable JavaScript to run it.</p>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
|
@ -113,10 +113,20 @@ const StorageFile = StorageBase.extend({
|
|||
if (!fileWatchers[names.dir]) {
|
||||
this.logger.debug('Watch dir', names.dir);
|
||||
const fsWatcher = Launcher.createFsWatcher(names.dir);
|
||||
fsWatcher.on('change', this.fsWatcherChange.bind(this, names.dir));
|
||||
fileWatchers[names.dir] = { fsWatcher: fsWatcher, callbacks: [] };
|
||||
if (fsWatcher) {
|
||||
fsWatcher.on('change', this.fsWatcherChange.bind(this, names.dir));
|
||||
fileWatchers[names.dir] = {
|
||||
fsWatcher: fsWatcher,
|
||||
callbacks: []
|
||||
};
|
||||
}
|
||||
}
|
||||
fileWatchers[names.dir].callbacks.push({ file: names.file, callback: callback });
|
||||
|
||||
const fsWatcher = fileWatchers[names.dir];
|
||||
fsWatcher && fsWatcher.callbacks.push({
|
||||
file: names.file,
|
||||
callback: callback
|
||||
});
|
||||
},
|
||||
|
||||
unwatch: function(path) {
|
||||
|
|
Loading…
Reference in New Issue