forked from extern/egroupware
Introduce Progressive Web App feature to EGroupware
This commit is contained in:
parent
b760fcf857
commit
6e43453714
@ -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);
|
||||||
|
});
|
||||||
|
}
|
BIN
api/templates/default/images/login_logo_512.png
Normal file
BIN
api/templates/default/images/login_logo_512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 131 KiB |
BIN
api/templates/default/images/logo_512x512.png
Normal file
BIN
api/templates/default/images/logo_512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
27
manifest.json
Normal file
27
manifest.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,7 @@
|
|||||||
<meta name="author" content="EGroupware GmbH http://www.egroupware.org" />
|
<meta name="author" content="EGroupware GmbH http://www.egroupware.org" />
|
||||||
{pngfix}
|
{pngfix}
|
||||||
{meta_robots}
|
{meta_robots}
|
||||||
|
<link rel="manifest" href="{webserver_url}/manifest.json"/>
|
||||||
<link rel="icon" href="{img_icon}" type="image/x-ico" />
|
<link rel="icon" href="{img_icon}" type="image/x-ico" />
|
||||||
<link rel="shortcut icon" href="{img_shortcut}" />
|
<link rel="shortcut icon" href="{img_shortcut}" />
|
||||||
<link rel="stylesheet" href="{webserver_url}/api/js/offline/themes/offline-theme-slide.css">
|
<link rel="stylesheet" href="{webserver_url}/api/js/offline/themes/offline-theme-slide.css">
|
||||||
|
12
service-worker.js
Normal file
12
service-worker.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* EGroupware service worker
|
||||||
|
*
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
|
* @author Hadi Nategh <hn-At-egroupware.org>
|
||||||
|
* @copyright (c) 2019 by Hadi Nategh <hn-At-egroupware.org>
|
||||||
|
* @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
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user