2021-08-16 20:22:04 +00:00
|
|
|
<?php
|
|
|
|
namespace Zotlabs\Module;
|
|
|
|
|
|
|
|
use App;
|
|
|
|
use Zotlabs\Web\Controller;
|
|
|
|
use Zotlabs\Lib\System;
|
|
|
|
|
|
|
|
|
|
|
|
class Manifest extends Controller {
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
$ret = [
|
|
|
|
'name' => System::get_platform_name(),
|
|
|
|
'short_name' => System::get_platform_name(),
|
|
|
|
'icons' => [
|
|
|
|
[ 'src' => System::get_project_icon(), 'sizes' => '64x64' ],
|
2021-08-16 21:21:42 +00:00
|
|
|
[ 'src' => '/images/' . System::get_platform_name() . '.svg', 'sizes' => '192x192' ],
|
2021-08-16 20:22:04 +00:00
|
|
|
],
|
|
|
|
'scope' => '/',
|
2021-08-22 21:22:47 +00:00
|
|
|
'start_url' => z_root(),
|
2021-08-16 20:22:04 +00:00
|
|
|
'display' => 'fullscreen',
|
|
|
|
'orientation' => 'any',
|
|
|
|
'theme_color' => 'blue',
|
|
|
|
'background_color' => 'white',
|
|
|
|
'share_target' => [
|
|
|
|
'action' => '/rpost',
|
2021-08-16 21:21:42 +00:00
|
|
|
'method' => 'POST',
|
|
|
|
'enctype' => 'multipart/form-data',
|
|
|
|
'params' => [
|
|
|
|
'title' => 'title',
|
|
|
|
'text' => 'body',
|
|
|
|
'url' => 'url',
|
2021-08-22 21:22:47 +00:00
|
|
|
'files' => [
|
|
|
|
[ 'name' => 'userfile',
|
|
|
|
'accept' => [
|
|
|
|
'image/jpeg',
|
|
|
|
'image/gif',
|
|
|
|
'image/png',
|
|
|
|
'text/plain',
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
2021-08-16 21:21:42 +00:00
|
|
|
]
|
2021-08-16 20:22:04 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
json_return_and_die($ret,'application/manifest+json');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|