diff --git a/routes.php b/routes.php index 760a42e..0026f83 100644 --- a/routes.php +++ b/routes.php @@ -2,6 +2,7 @@ /** @var \Bramus\Router\Router $router */ use App\Helpers\ErrorHandler; +use App\Helpers\Misc; use App\Helpers\Wrappers; use App\Models\BaseTemplate; @@ -21,6 +22,35 @@ $router->get('/verify', function () { Wrappers::latte('verify', new BaseTemplate('verify')); }); +$router->get('/manifest', function () { + header('Content-Type: application/json'); + $data = [ + "name" => "ProxiTok", + "short_name" => "ProxiTok", + "description" => "Use TikTok with a privacy-friendly alternative frontend", + "lang" => "en-US", + "theme_color" => "#4040ff", + "background_color" => "#ffffff", + "display" => "standalone", + "orientation" => "portrait-primary", + "icons" => [ + [ + "src" => Misc::url('/android-chrome-192x192.png'), + "sizes" => "192x192", + "type" => "image/png" + ], + [ + "src" => Misc::url('/android-chrome-512x512.png'), + "sizes" => "512x512", + "type" => "image/png" + ] + ], + "start_url" => Misc::url('/'), + "scope" => Misc::url('/') + ]; + echo json_encode($data, JSON_PRETTY_PRINT); +}); + $router->get('/stream', 'ProxyController@stream'); $router->get('/download', 'ProxyController@download'); $router->get('/redirect', 'RedirectController@redirect'); diff --git a/site.webmanifest b/site.webmanifest deleted file mode 100644 index 3041e67..0000000 --- a/site.webmanifest +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "ProxiTok", - "short_name": "ProxiTok", - "description": "Use TikTok with a privacy-friendly alternative frontend", - "orientation": "portrait-primary", - "icons": [ - { - "src": "android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "id": "./", - "start_url": "./", - "theme_color": "#4040ff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/templates/components/head.latte b/templates/components/head.latte index 5373dc8..46a172c 100644 --- a/templates/components/head.latte +++ b/templates/components/head.latte @@ -5,7 +5,7 @@ - + {if isset($og, $og_content, $og_url)}