File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -508,7 +508,7 @@ public function getManifest(string $app): JSONResponse {
508508 'sizes ' => '16x16 '
509509 ]
510510 ],
511- 'display ' => ' standalone '
511+ 'display ' => $ this -> config -> getSystemValueBool ( ' theming.standalone_window.enabled ' , true ) ? ' standalone ' : ' browser '
512512 ];
513513 $ response = new JSONResponse ($ responseJS );
514514 $ response ->cacheFor (3600 );
Original file line number Diff line number Diff line change @@ -745,7 +745,15 @@ public function testGetLoginBackground() {
745745 @$ this ->assertEquals ($ expected , $ this ->themingController ->getImage ('background ' ));
746746 }
747747
748- public function testGetManifest () {
748+ public static function dataGetManifest (): array {
749+ return [
750+ [true ],
751+ [false ],
752+ ];
753+ }
754+
755+ /** @dataProvider dataGetManifest */
756+ public function testGetManifest (bool $ standalone ) {
749757 $ this ->config
750758 ->expects ($ this ->once ())
751759 ->method ('getAppValue ' )
@@ -769,6 +777,11 @@ public function testGetManifest() {
769777 'touchicon ' ,
770778 'favicon ' ,
771779 );
780+ $ this ->config
781+ ->expects ($ this ->once ())
782+ ->method ('getSystemValueBool ' )
783+ ->with ('theming.standalone_window.enabled ' , true )
784+ ->willReturn ($ standalone );
772785 $ response = new Http \JSONResponse ([
773786 'name ' => 'Nextcloud ' ,
774787 'start_url ' => 'localhost ' ,
@@ -785,7 +798,7 @@ public function testGetManifest() {
785798 'sizes ' => '16x16 '
786799 ]
787800 ],
788- 'display ' => 'standalone ' ,
801+ 'display ' => $ standalone ? 'standalone ' : ' browser ' ,
789802 'short_name ' => 'Nextcloud ' ,
790803 'theme_color ' => null ,
791804 'background_color ' => null ,
Original file line number Diff line number Diff line change 20132013 */
20142014'enforce_theme ' => '' ,
20152015
2016+
2017+ /**
2018+ * This setting allows to disable the PWA functionality that allows browsers to open web applications in dedicated windows.
2019+ *
2020+ * Defaults to ``true``
2021+ */
2022+ 'theming.standalone_window.enabled ' => true ,
2023+
20162024/**
20172025 * The default cipher for encrypting files. Currently supported are:
20182026 * - AES-256-CTR
You can’t perform that action at this time.
0 commit comments