Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-08-16 22:39:55 +0300
committerszaimen <szaimen@e.mail.de>2021-08-24 12:42:04 +0300
commit0758e0258d5adfccdb7b71ef61916fb939a7bf48 (patch)
tree1ee0fcbe406a8c7087c5befb980916a07f71fe07 /apps/theming/lib/Controller
parent4f0101837a5a52de3673b16b0d1e472c520ac26c (diff)
improve webmanifest
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'apps/theming/lib/Controller')
-rw-r--r--apps/theming/lib/Controller/ThemingController.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index 1638f5bd957..270181e42d2 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -372,9 +372,29 @@ class ThemingController extends Controller {
*/
public function getManifest($app) {
$cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0');
+ if ($app === 'core' || $app === 'settings') {
+ $name = $this->themingDefaults->getName();
+ $shortName = $this->themingDefaults->getName();
+ $startUrl = $this->urlGenerator->getBaseUrl();
+ $description = $this->themingDefaults->getSlogan();
+ } else {
+ $info = $this->appManager->getAppInfo($app);
+ $name = $info['name'] . ' - ' . $this->themingDefaults->getName();
+ $shortName = $info['name'];
+ if (strpos($this->request->getRequestUri(), '/index.php/') !== false) {
+ $startUrl = $this->urlGenerator->getBaseUrl() . '/index.php/apps/' . $app . '/';
+ } else {
+ $startUrl = $this->urlGenerator->getBaseUrl() . '/apps/' . $app . '/';
+ }
+ $description = $info['summary'];
+ }
$responseJS = [
- 'name' => $this->themingDefaults->getName(),
- 'start_url' => $this->urlGenerator->getBaseUrl(),
+ 'name' => $name,
+ 'short_name' => $shortName,
+ 'start_url' => $startUrl,
+ 'theme_color' => $this->themingDefaults->getColorPrimary(),
+ 'background_color' => $this->themingDefaults->getColorPrimary(),
+ 'description' => $description,
'icons' =>
[
[