diff --git a/api/js/login.js b/api/js/login.js index dac9f16afb..aaddb60fd3 100644 --- a/api/js/login.js +++ b/api/js/login.js @@ -59,3 +59,14 @@ egw_LAB.wait(function() ]); }); }); + +// register service worker +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('./service-worker.js', {scope:"/egroupware/"}) + .then(function(registration) { + console.log('Registration successful, scope is:', registration.scope); + }) + .catch(function(error) { + console.log('Service worker registration failed, error:', error); + }); +} \ No newline at end of file diff --git a/api/templates/default/images/login_logo_512.png b/api/templates/default/images/login_logo_512.png new file mode 100644 index 0000000000..2f2969e1cb Binary files /dev/null and b/api/templates/default/images/login_logo_512.png differ diff --git a/api/templates/default/images/logo_512x512.png b/api/templates/default/images/logo_512x512.png new file mode 100644 index 0000000000..6d51f77d5f Binary files /dev/null and b/api/templates/default/images/logo_512x512.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000000..ef76a86da5 --- /dev/null +++ b/manifest.json @@ -0,0 +1,27 @@ +{ + "short_name": "EGroupware", + "name": "EGroupware", + "category": ["business", "education"], + "description": "EGroupware is an online open-source enterprise software for business use and provides the services by using cutting edge collaboration technologies which allow organisations to collaborate in a secure and function rich environment, supporting integrated project teams across and within organisation boundaries.", + "orientation": "landscape-primary", + "icons": [ + { + "src": "api/templates/default/images/logo_192x192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "api/templates/default/images/logo_512x512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": "index.php", + "background_color": "#fafafa", + "display": "standalone", + "scope": "/egroupware", + "theme_color": "#0073ae", + "serviceworker": { + "src": "/service-worker.js" + } +} \ No newline at end of file diff --git a/pixelegg/head.tpl b/pixelegg/head.tpl index c13f7defbc..0eda754bee 100644 --- a/pixelegg/head.tpl +++ b/pixelegg/head.tpl @@ -11,6 +11,7 @@ {pngfix} {meta_robots} + diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000000..7069a3a2e3 --- /dev/null +++ b/service-worker.js @@ -0,0 +1,12 @@ +/** + * EGroupware service worker + * + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @author Hadi Nategh + * @copyright (c) 2019 by Hadi Nategh + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + */ + +this.addEventListener('fetch', function (event) { + // temporary just to ommit error app not installable +}); \ No newline at end of file