File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed
Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ public function getManifest($app) {
436436 'sizes ' => '16x16 '
437437 ]
438438 ],
439- 'display ' => ' standalone '
439+ 'display ' => $ this -> config -> getSystemValueBool ( ' theming.standalone_window.enabled ' , true ) ? ' standalone ' : ' browser '
440440 ];
441441 $ response = new Http \JSONResponse ($ responseJS );
442442 $ response ->cacheFor (3600 );
Original file line number Diff line number Diff line change @@ -731,8 +731,15 @@ public function testGetLoginBackground() {
731731 $ expected ->setContentSecurityPolicy ($ csp );
732732 @$ this ->assertEquals ($ expected , $ this ->themingController ->getImage ('background ' ));
733733 }
734+ public static function dataGetManifest (): array {
735+ return [
736+ [true ],
737+ [false ],
738+ ];
739+ }
734740
735- public function testGetManifest () {
741+ /** @dataProvider dataGetManifest */
742+ public function testGetManifest (bool $ standalone ) {
736743 $ this ->config
737744 ->expects ($ this ->once ())
738745 ->method ('getAppValue ' )
@@ -756,6 +763,11 @@ public function testGetManifest() {
756763 'touchicon ' ,
757764 'favicon ' ,
758765 );
766+ $ this ->config
767+ ->expects ($ this ->once ())
768+ ->method ('getSystemValueBool ' )
769+ ->with ('theming.standalone_window.enabled ' , true )
770+ ->willReturn ($ standalone );
759771 $ response = new Http \JSONResponse ([
760772 'name ' => 'Nextcloud ' ,
761773 'start_url ' => 'localhost ' ,
@@ -772,7 +784,7 @@ public function testGetManifest() {
772784 'sizes ' => '16x16 '
773785 ]
774786 ],
775- 'display ' => 'standalone ' ,
787+ 'display ' => $ standalone ? 'standalone ' : ' browser ' ,
776788 'short_name ' => 'Nextcloud ' ,
777789 'theme_color ' => null ,
778790 'background_color ' => null ,
Original file line number Diff line number Diff line change 19461946 */
19471947'enforce_theme ' => '' ,
19481948
1949+
1950+ /**
1951+ * This setting allows to disable the PWA functionality that allows browsers to open web applications in dedicated windows.
1952+ *
1953+ * Defaults to ``true``
1954+ */
1955+ 'theming.standalone_window.enabled ' => true ,
1956+
19491957/**
19501958 * The default cipher for encrypting files. Currently supported are:
19511959 * - AES-256-CTR
You can’t perform that action at this time.
0 commit comments