Skip to content

Commit f9e7cd0

Browse files
szaimenhamza221
authored andcommitted
feat(theming): allow to disable standalone windows
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: Simon L. <szaimen@e.mail.de>
1 parent 7709129 commit f9e7cd0

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

apps/theming/lib/Controller/ThemingController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

apps/theming/tests/Controller/ThemingControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ public function testGetManifest() {
772772
'sizes' => '16x16'
773773
]
774774
],
775-
'display' => 'standalone',
775+
'display' => $standalone ? 'standalone' : 'browser',
776776
'short_name' => 'Nextcloud',
777777
'theme_color' => null,
778778
'background_color' => null,

config/config.sample.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,6 +1946,14 @@
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

0 commit comments

Comments
 (0)