File tree 3 files changed +24
-3
lines changed
3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ public function getManifest(string $app): JSONResponse {
474
474
'sizes ' => '16x16 '
475
475
]
476
476
],
477
- 'display ' => ' standalone '
477
+ 'display ' => $ this -> config -> getSystemValueBool ( ' theming.standalone_window.enabled ' , true ) ? ' standalone ' : ' browser '
478
478
];
479
479
$ response = new JSONResponse ($ responseJS );
480
480
$ response ->cacheFor (3600 );
Original file line number Diff line number Diff line change @@ -705,7 +705,15 @@ public function testGetLoginBackground() {
705
705
@$ this ->assertEquals ($ expected , $ this ->themingController ->getImage ('background ' ));
706
706
}
707
707
708
- public function testGetManifest () {
708
+ public static function dataGetManifest (): array {
709
+ return [
710
+ [true ],
711
+ [false ],
712
+ ];
713
+ }
714
+
715
+ /** @dataProvider dataGetManifest */
716
+ public function testGetManifest (bool $ standalone ) {
709
717
$ this ->config
710
718
->expects ($ this ->once ())
711
719
->method ('getAppValue ' )
@@ -729,6 +737,11 @@ public function testGetManifest() {
729
737
'touchicon ' ,
730
738
'favicon ' ,
731
739
);
740
+ $ this ->config
741
+ ->expects ($ this ->once ())
742
+ ->method ('getSystemValueBool ' )
743
+ ->with ('theming.standalone_window.enabled ' , true )
744
+ ->willReturn ($ standalone );
732
745
$ response = new Http \JSONResponse ([
733
746
'name ' => 'Nextcloud ' ,
734
747
'start_url ' => 'localhost ' ,
@@ -745,7 +758,7 @@ public function testGetManifest() {
745
758
'sizes ' => '16x16 '
746
759
]
747
760
],
748
- 'display ' => 'standalone ' ,
761
+ 'display ' => $ standalone ? 'standalone ' : ' browser ' ,
749
762
'short_name ' => 'Nextcloud ' ,
750
763
'theme_color ' => null ,
751
764
'background_color ' => null ,
Original file line number Diff line number Diff line change 2079
2079
*/
2080
2080
'enforce_theme ' => '' ,
2081
2081
2082
+
2083
+ /**
2084
+ * This setting allows to disable the PWA functionality that allows browsers to open web applications in dedicated windows.
2085
+ *
2086
+ * Defaults to ``true``
2087
+ */
2088
+ 'theming.standalone_window.enabled ' => true ,
2089
+
2082
2090
/**
2083
2091
* The default cipher for encrypting files. Currently supported are:
2084
2092
* - AES-256-CTR
You can’t perform that action at this time.
0 commit comments