diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index 983a738ea7025..c3f365a11b6e3 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -481,7 +481,7 @@ public function getManifest(string $app): JSONResponse { 'sizes' => '16x16' ] ], - 'display' => 'standalone' + 'display' => $this->config->getSystemValueBool('theming.standalone_window.enabled', true) ? 'standalone' : 'browser' ]; $response = new JSONResponse($responseJS); $response->cacheFor(3600); diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index 3c283fcb697ab..aeed2f747e3c3 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -734,6 +734,11 @@ public function testGetManifest(): void { ['theming.Icon.getTouchIcon', ['app' => 'core'], 'touchicon'], ['theming.Icon.getFavicon', ['app' => 'core'], 'favicon'], ]); + $this->config + ->expects($this->once()) + ->method('getSystemValueBool') + ->with('theming.standalone_window.enabled', true) + ->willReturn(true); $response = new JSONResponse([ 'name' => 'Nextcloud', 'start_url' => 'localhost', diff --git a/config/config.sample.php b/config/config.sample.php index f30bd92adbc46..bfda1609d751a 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -2129,6 +2129,14 @@ */ 'enforce_theme' => '', + +/** + * This setting allows to disable the PWA functionality that allows browsers to open web applications in dedicated windows. + * + * Defaults to ``true`` + */ +'theming.standalone_window.enabled' => true, + /** * The default cipher for encrypting files. Currently supported are: * - AES-256-CTR