Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/theming/lib/Controller/ThemingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $w
*
* @param string $app ID of the app
* @psalm-suppress LessSpecificReturnStatement The content of the Manifest doesn't need to be described in the return type
* @return JSONResponse<Http::STATUS_OK, array{name: string, short_name: string, start_url: string, theme_color: string, background_color: string, description: string, icons: list<array{src: non-empty-string, type: string, sizes: string}>, display: string}, array{}>|JSONResponse<Http::STATUS_NOT_FOUND, array{}, array{}>
* @return JSONResponse<Http::STATUS_OK, array{name: string, short_name: string, start_url: string, theme_color: string, background_color: string, description: string, icons: list<array{src: non-empty-string, type: string, sizes: string}>, display_override: list<string>, display: string}, array{}>|JSONResponse<Http::STATUS_NOT_FOUND, array{}, array{}>
*
* 200: Manifest returned
* 404: App not found
Expand Down Expand Up @@ -481,6 +481,7 @@ public function getManifest(string $app): JSONResponse {
'sizes' => '16x16'
]
],
'display_override' => [$this->config->getSystemValueBool('theming.standalone_window.enabled', true) ? 'minimal-ui' : ''],
'display' => $this->config->getSystemValueBool('theming.standalone_window.enabled', true) ? 'standalone' : 'browser'
];
$response = new JSONResponse($responseJS);
Expand Down
7 changes: 7 additions & 0 deletions apps/theming/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@
"background_color",
"description",
"icons",
"display_override",
"display"
],
"properties": {
Expand Down Expand Up @@ -387,6 +388,12 @@
}
}
},
"display_override": {
"type": "array",
"items": {
"type": "string"
}
},
"display": {
"type": "string"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/theming/tests/Controller/ThemingControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ public function testGetManifest(bool $standalone): void {
['theming.Icon.getFavicon', ['app' => 'core'], 'favicon'],
]);
$this->config
->expects($this->once())
->expects($this->exactly(2))
->method('getSystemValueBool')
->with('theming.standalone_window.enabled', true)
->willReturn($standalone);
Expand All @@ -765,6 +765,7 @@ public function testGetManifest(bool $standalone): void {
'sizes' => '16x16'
]
],
'display_override' => [$standalone ? 'minimal-ui' : ''],
'display' => $standalone ? 'standalone' : 'browser',
'short_name' => 'Nextcloud',
'theme_color' => null,
Expand Down
1 change: 1 addition & 0 deletions core/img/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"type": "image/svg+xml",
"sizes": "16x16"
}],
"display_override": ["minimal-ui"],
"display": "standalone"
}
Loading