diff options
author | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-02-08 15:40:41 +0100 |
---|---|---|
committer | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-03-09 13:14:48 +0100 |
commit | f5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb (patch) | |
tree | eb6857a1dd278275daa1da69a247d64e9a5eec9d /apps/settings | |
parent | d29551a46d379147c09af7251910765766bbf269 (diff) | |
download | nextcloud-server-f5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb.tar.gz nextcloud-server-f5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb.zip |
Create headings for settings pages
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'apps/settings')
4 files changed, 8 insertions, 4 deletions
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index a4addfc5b35..d0ed408df02 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -136,7 +136,7 @@ class AppSettingsController extends Controller { $params['bundles'] = $this->getBundles(); $this->navigationManager->setActiveEntry('core_apps'); - $templateResponse = new TemplateResponse('settings', 'settings-vue', ['serverData' => $params]); + $templateResponse = new TemplateResponse('settings', 'settings-vue', ['serverData' => $params, 'pageTitle' => $this->l10n->t('Apps')]); $policy = new ContentSecurityPolicy(); $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com'); $templateResponse->setContentSecurityPolicy($policy); diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 217abf0e156..89a850c1980 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -277,7 +277,7 @@ class UsersController extends Controller { $serverData['newUserRequireEmail'] = $this->config->getAppValue('core', 'newUser.requireEmail', 'no') === 'yes'; $serverData['newUserSendEmail'] = $this->config->getAppValue('core', 'newUser.sendEmail', 'yes') === 'yes'; - return new TemplateResponse('settings', 'settings-vue', ['serverData' => $serverData]); + return new TemplateResponse('settings', 'settings-vue', ['serverData' => $serverData, 'pageTitle' => $this->l10n->t('Users')]); } /** diff --git a/apps/settings/src/router.js b/apps/settings/src/router.js index 863bd49c32d..cf842475c5d 100644 --- a/apps/settings/src/router.js +++ b/apps/settings/src/router.js @@ -27,6 +27,7 @@ import Router from 'vue-router' import { generateUrl } from '@nextcloud/router' import { APPS_SECTION_ENUM } from './constants/AppsConstants.js' import store from './store/index.js' +import { setPageHeading } from '../../../core/src/OCP/accessibility.js' // Dynamic loading const Users = () => import(/* webpackChunkName: 'settings-users' */'./views/Users') @@ -126,6 +127,7 @@ router.afterEach(async (to) => { const metaTitle = await to.meta.title?.(to) if (metaTitle) { document.title = `${metaTitle} - ${baseTitle}` + setPageHeading(metaTitle) } else { document.title = baseTitle } diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php index 28d77dc3696..8d0dae223d3 100644 --- a/apps/settings/tests/Controller/AppSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php @@ -209,7 +209,8 @@ class AppSettingsControllerTest extends TestCase { 'appstoreEnabled' => true, 'bundles' => [], 'developerDocumentation' => '' - ] + ], + 'pageTitle' => 'Apps' ], 'user'); $expected->setContentSecurityPolicy($policy); @@ -243,7 +244,8 @@ class AppSettingsControllerTest extends TestCase { 'appstoreEnabled' => false, 'bundles' => [], 'developerDocumentation' => '' - ] + ], + 'pageTitle' => 'Apps' ], 'user'); $expected->setContentSecurityPolicy($policy); |