diff --git a/assets/controllers.json b/assets/controllers.json index 48203c9..293857f 100644 --- a/assets/controllers.json +++ b/assets/controllers.json @@ -1,5 +1,23 @@ { "controllers": { + "@spomky-labs/pwa-bundle": { + "connection-status": { + "enabled": true, + "fetch": "eager" + }, + "backgroundsync-form": { + "enabled": true, + "fetch": "eager" + }, + "sync-broadcast": { + "enabled": true, + "fetch": "eager" + }, + "prefetch-on-demand": { + "enabled": true, + "fetch": "eager" + } + }, "@symfony/ux-autocomplete": { "autocomplete": { "enabled": true, diff --git a/composer.json b/composer.json index 65056bb..17d2d7f 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "php-tmdb/api": "^4.1", "predis/predis": "^2.4", "runtime/frankenphp-symfony": "^0.2.0", + "spomky-labs/pwa-bundle": "^1.2", "stof/doctrine-extensions-bundle": "^1.14", "symfony/asset": "7.3.*", "symfony/console": "7.3.*", diff --git a/composer.lock b/composer.lock index 152f51d..1af60d7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bfbdc7ee820da20b824f4b1933fe967b", + "content-hash": "0f98dada0a01d471cebf4eb1b51b9006", "packages": [ { "name": "1tomany/rich-bundle", @@ -4866,6 +4866,127 @@ ], "time": "2025-06-13T08:35:04+00:00" }, + { + "name": "spomky-labs/pwa-bundle", + "version": "1.2.5", + "source": { + "type": "git", + "url": "https://github.com/Spomky-Labs/pwa-bundle.git", + "reference": "c24711ea8428d14a01132d9e42cb17d84218a1ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Spomky-Labs/pwa-bundle/zipball/c24711ea8428d14a01132d9e42cb17d84218a1ee", + "reference": "c24711ea8428d14a01132d9e42cb17d84218a1ee", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "phpdocumentor/reflection-docblock": "^5.3", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/asset": "^6.4|^7.0", + "symfony/asset-mapper": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/deprecation-contracts": "^3.5", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/routing": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "twig/twig": "^3.8" + }, + "require-dev": { + "dbrekelmans/bdi": "^1.1", + "ekino/phpstan-banned-code": "^1.0|^2.0|^3.0", + "ergebnis/phpunit-slow-test-detector": "^2.14", + "ext-sockets": "*", + "infection/infection": "^0.28|^0.29", + "matthiasnoback/symfony-config-test": "^5.1", + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpstan/extension-installer": "^1.1", + "phpstan/phpdoc-parser": "^1.28|^2.0", + "phpstan/phpstan": "^1.0|^2.0", + "phpstan/phpstan-beberlei-assert": "^1.0|^2.0", + "phpstan/phpstan-deprecation-rules": "^1.0|^2.0", + "phpstan/phpstan-phpunit": "^1.4|^2.0", + "phpstan/phpstan-strict-rules": "^1.0|^2.0", + "phpstan/phpstan-symfony": "^1.4|^2.0", + "phpunit/phpunit": "^10.1|^11.0", + "rector/rector": "^1.0|^2.0", + "staabm/phpstan-todo-by": "^0.1.27|^0.2", + "struggle-for-php/sfp-phpstan-psr-log": "^0.21.0|^0.22|^0.23", + "symfony/filesystem": "^6.4|^7.0", + "symfony/framework-bundle": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/monolog-bundle": "^3.10", + "symfony/panther": "^2.1", + "symfony/phpunit-bridge": "^6.4|^7.0", + "symfony/translation": "^7.0", + "symfony/yaml": "^6.4|^7.0", + "symplify/easy-coding-standard": "^12.0" + }, + "suggest": { + "ext-gd": "Required to generate icons (or Imagick).", + "ext-imagick": "Required to generate icons (or GD).", + "symfony/filesystem": "For generating and manipulating icons or screenshots", + "symfony/mime": "For generating and manipulating icons or screenshots", + "symfony/panther": "For generating screenshots directly from your application" + }, + "type": "symfony-bundle", + "extra": { + "thanks": { + "url": "https://github.com/spomky-labs/pwa-bundle", + "name": "spomky-labs/pwa-bundle" + } + }, + "autoload": { + "psr-4": { + "SpomkyLabs\\PwaBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florent Morselli", + "homepage": "https://github.com/Spomky" + }, + { + "name": "All contributors", + "homepage": "https://github.com/spomky-labs/pwa-bundle/contributors" + } + ], + "description": "Progressive Web App Manifest Generator Bundle for Symfony.", + "homepage": "https://github.com/spomky-labs", + "keywords": [ + "bundle", + "pwa", + "symfony", + "symfony-ux" + ], + "support": { + "issues": "https://github.com/Spomky-Labs/pwa-bundle/issues", + "source": "https://github.com/Spomky-Labs/pwa-bundle/tree/1.2.5" + }, + "funding": [ + { + "url": "https://www.buymeacoffee.com/FlorentMorselli", + "type": "custom" + }, + { + "url": "https://github.com/Spomky", + "type": "github" + }, + { + "url": "https://www.patreon.com/FlorentMorselli", + "type": "patreon" + } + ], + "time": "2024-12-16T08:02:21+00:00" + }, { "name": "stof/doctrine-extensions-bundle", "version": "v1.14.0", diff --git a/config/bundles.php b/config/bundles.php index b79badb..3b49b60 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -22,4 +22,5 @@ return [ Symfony\UX\Autocomplete\AutocompleteBundle::class => ['all' => true], SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true], Drenso\OidcBundle\DrensoOidcBundle::class => ['all' => true], + SpomkyLabs\PwaBundle\SpomkyLabsPwaBundle::class => ['all' => true], ]; diff --git a/config/packages/pwa.yaml b/config/packages/pwa.yaml new file mode 100644 index 0000000..a355e9e --- /dev/null +++ b/config/packages/pwa.yaml @@ -0,0 +1,21 @@ +pwa: + manifest: + enabled: true + name: "Torsearch" + short_name: "torsearch" + start_url: "/" + display: "standalone" + id: "/" + background_color: "#083344" + theme_color: "#f98e44" + description: Torsearch provides a simple and intuitive way to manage your personal media library. + icons: + - src: "icon.png" + sizes: [ 192 ] + - src: "icon.png" + sizes: [ 192 ] + purpose: maskable + categories: + - entertainment + - multimedia + - utilities \ No newline at end of file diff --git a/public/icon.png b/public/icon.png new file mode 100644 index 0000000..038ea7a Binary files /dev/null and b/public/icon.png differ diff --git a/symfony.lock b/symfony.lock index efb410a..f53f406 100644 --- a/symfony.lock +++ b/symfony.lock @@ -86,6 +86,9 @@ "phpstan.dist.neon" ] }, + "spomky-labs/pwa-bundle": { + "version": "1.2.5" + }, "stof/doctrine-extensions-bundle": { "version": "1.14", "recipe": { diff --git a/templates/bare.html.twig b/templates/bare.html.twig index 08b05b6..b03b45b 100644 --- a/templates/bare.html.twig +++ b/templates/bare.html.twig @@ -3,6 +3,7 @@
+ {{ pwa() }}