diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index c3f365a11b6e3..8d9e7aaf060ab 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -422,7 +422,7 @@ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $w * * @param string $app ID of the app * @psalm-suppress LessSpecificReturnStatement The content of the Manifest doesn't need to be described in the return type - * @return JSONResponse, display: string}, array{}>|JSONResponse + * @return JSONResponse, display_override: list, display: string}, array{}>|JSONResponse * * 200: Manifest returned * 404: App not found @@ -481,6 +481,7 @@ public function getManifest(string $app): JSONResponse { 'sizes' => '16x16' ] ], + 'display_override' => [$this->config->getSystemValueBool('theming.standalone_window.enabled', true) ? 'minimal-ui' : ''], 'display' => $this->config->getSystemValueBool('theming.standalone_window.enabled', true) ? 'standalone' : 'browser' ]; $response = new JSONResponse($responseJS); diff --git a/apps/theming/openapi.json b/apps/theming/openapi.json index 7ad7242d74469..bc316232ee84e 100644 --- a/apps/theming/openapi.json +++ b/apps/theming/openapi.json @@ -343,6 +343,7 @@ "background_color", "description", "icons", + "display_override", "display" ], "properties": { @@ -387,6 +388,12 @@ } } }, + "display_override": { + "type": "array", + "items": { + "type": "string" + } + }, "display": { "type": "string" } diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index 90dfca1b317f5..6dfbb72bb77c9 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -745,7 +745,7 @@ public function testGetManifest(bool $standalone): void { ['theming.Icon.getFavicon', ['app' => 'core'], 'favicon'], ]); $this->config - ->expects($this->once()) + ->expects($this->exactly(2)) ->method('getSystemValueBool') ->with('theming.standalone_window.enabled', true) ->willReturn($standalone); @@ -765,6 +765,7 @@ public function testGetManifest(bool $standalone): void { 'sizes' => '16x16' ] ], + 'display_override' => [$standalone ? 'minimal-ui' : ''], 'display' => $standalone ? 'standalone' : 'browser', 'short_name' => 'Nextcloud', 'theme_color' => null, diff --git a/core/img/manifest.json b/core/img/manifest.json index 04e77df7a59e1..5d2d7d8a2d2a0 100644 --- a/core/img/manifest.json +++ b/core/img/manifest.json @@ -10,5 +10,6 @@ "type": "image/svg+xml", "sizes": "16x16" }], + "display_override": ["minimal-ui"], "display": "standalone" }