Skip to content

Commit 5b857bc

Browse files
szaimenbackportbot[bot]
authored andcommitted
feat(theming): allow to disable standalone windows
Co-authored-by: Ferdinand Thiessen <[email protected]> Signed-off-by: Simon L. <[email protected]> [skip ci]
1 parent 3e93249 commit 5b857bc

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Diff for: apps/theming/lib/Controller/ThemingController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ public function getManifest(string $app): JSONResponse {
474474
'sizes' => '16x16'
475475
]
476476
],
477-
'display' => 'standalone'
477+
'display' => $this->config->getSystemValueBool('theming.standalone_window.enabled', true) ? 'standalone' : 'browser'
478478
];
479479
$response = new JSONResponse($responseJS);
480480
$response->cacheFor(3600);

Diff for: apps/theming/tests/Controller/ThemingControllerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ public function testGetManifest() {
745745
'sizes' => '16x16'
746746
]
747747
],
748-
'display' => 'standalone',
748+
'display' => $standalone ? 'standalone' : 'browser',
749749
'short_name' => 'Nextcloud',
750750
'theme_color' => null,
751751
'background_color' => null,

Diff for: config/config.sample.php

+8
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,14 @@
20792079
*/
20802080
'enforce_theme' => '',
20812081

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+
20822090
/**
20832091
* The default cipher for encrypting files. Currently supported are:
20842092
* - AES-256-CTR

0 commit comments

Comments
 (0)