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
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-09-14 12:24:11 +0300
committerVincent Petry <vincent@nextcloud.com>2022-09-14 16:05:35 +0300
commitda01494a372c5b780ee76807325001afd1190b11 (patch)
tree41192ee5a919603534df3fea65750ffc0ff17a99 /lib
parent7ea015f0d199e8637392921ea5938394f9b78e73 (diff)
Add accessibility entry in user menu
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/NavigationManager.php21
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php
index 7fd76850816..7e162e65a5d 100644
--- a/lib/private/NavigationManager.php
+++ b/lib/private/NavigationManager.php
@@ -201,12 +201,23 @@ class NavigationManager implements INavigationManager {
}
if ($this->userSession->isLoggedIn()) {
+ // Accessibility settings
+ if ($this->appManager->isEnabledForUser('theming', $this->userSession->getUser())) {
+ $this->add([
+ 'type' => 'settings',
+ 'id' => 'accessibility_settings',
+ 'order' => 2,
+ 'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index', ['section' => 'theming']),
+ 'name' => $l->t('Appearance and accessibility'),
+ 'icon' => $this->urlGenerator->imagePath('theming', 'accessibility-dark.svg'),
+ ]);
+ }
if ($this->isAdmin()) {
// App management
$this->add([
'type' => 'settings',
'id' => 'core_apps',
- 'order' => 4,
+ 'order' => 5,
'href' => $this->urlGenerator->linkToRoute('settings.AppSettings.viewApps'),
'icon' => $this->urlGenerator->imagePath('settings', 'apps.svg'),
'name' => $l->t('Apps'),
@@ -216,7 +227,7 @@ class NavigationManager implements INavigationManager {
$this->add([
'type' => 'settings',
'id' => 'settings',
- 'order' => 2,
+ 'order' => 3,
'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'),
'name' => $l->t('Personal settings'),
'icon' => $this->urlGenerator->imagePath('settings', 'personal.svg'),
@@ -226,7 +237,7 @@ class NavigationManager implements INavigationManager {
$this->add([
'type' => 'settings',
'id' => 'admin_settings',
- 'order' => 3,
+ 'order' => 4,
'href' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'overview']),
'name' => $l->t('Administration settings'),
'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'),
@@ -236,7 +247,7 @@ class NavigationManager implements INavigationManager {
$this->add([
'type' => 'settings',
'id' => 'settings',
- 'order' => 2,
+ 'order' => 3,
'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'),
'name' => $l->t('Settings'),
'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'),
@@ -261,7 +272,7 @@ class NavigationManager implements INavigationManager {
$this->add([
'type' => 'settings',
'id' => 'core_users',
- 'order' => 5,
+ 'order' => 6,
'href' => $this->urlGenerator->linkToRoute('settings.Users.usersList'),
'name' => $l->t('Users'),
'icon' => $this->urlGenerator->imagePath('settings', 'users.svg'),