Initial
This commit is contained in:
commit
1759b4d932
16
composer.json
Normal file
16
composer.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "stuzer05/manifest",
|
||||||
|
"type": "roundcube-plugin",
|
||||||
|
"description": "Provides PWA manifest",
|
||||||
|
"license": "MIT",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"homepage": "https://stuzer.link",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Illya Marchenko",
|
||||||
|
"email": "dev@stuzer.link"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repositories": [],
|
||||||
|
"require": {}
|
||||||
|
}
|
15
manifest.json
Normal file
15
manifest.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "Roundcube Webmail",
|
||||||
|
"short_name": "Roundcube",
|
||||||
|
"start_url": "/",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"theme_color": "#37beff",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/skins/elastic/images/logo.svg",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/svg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
19
manifest.php
Normal file
19
manifest.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class manifest extends rcube_plugin
|
||||||
|
{
|
||||||
|
public $task = 'login|mail|settings|addressbook|calendar';
|
||||||
|
|
||||||
|
function init()
|
||||||
|
{
|
||||||
|
$this->add_hook('render_page', array($this, 'add_manifest'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add_manifest($p)
|
||||||
|
{
|
||||||
|
$manifest_url = $this->url('manifest.json');
|
||||||
|
$p['content'] = preg_replace('/<head>/', '<head>' . "\n" . ' <link rel="manifest" href="' . $manifest_url . '">', $p['content'], 1);
|
||||||
|
|
||||||
|
return $p;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user